Simple DMA example

Do you live and breathe hexadecimal? Do you like speaking to hardware directly?

Moderator: Programming Moderators

User avatar
gavin1969
Posts: 6
Joined: Sun Jul 16, 2017 8:20 pm

Re: Simple DMA example

Post by gavin1969 » Fri May 11, 2018 9:58 am

I've had a go at getting the DMA example running via Zeus ParaSys. My USB-TTL cable arrived in the post and I just couldn't resist attempting to get it to work, but I've so far failed...
I've tried connecting the pins as seems logical, matching those in KevB's RS232 post, but as I connected the VCC line, the board powered up VERY BRIGHTLY and ANGRY! Argh! Panic! So I only allowed that line to be connected for just a moment!
I've ordered the cable linked to from Amazon earlier in this thread, and a subsequent test confirmed there's a 5V supply coming down the cable from the PC end. The amazon details shows contradictory info, 3.3V AND 5V - so beware.
I've attempted to just connect the GND, TXD and RXD with no luck.
I'm not sure what Zeus should look like if ParaSys is working, it gives no clues.
I've prepared a test version of the program to run on the Next, with helpful border colour flashes, to check where it gets to, and yes - it's just waiting for bytes to come down, but nothing arrives.
Worried I'd blown up the board already, I've put the WIFI adapter back in, and thankfully that all checks out fine! <what a relief!>
So my current guess is the (sample?) cable linked to earlier isn't safe for Next use and I shouldn't connect the 5V to the board?
Any hints would be gratefully received! :)

User avatar
SevenFFF
Posts: 211
Joined: Mon Jun 05, 2017 5:30 pm
Location: USA

Re: Simple DMA example

Post by SevenFFF » Fri May 11, 2018 12:22 pm

I’m sorry, was sick and completely forgot to write this up.

For now - DON’T connect VCC!! Just TX, RX and GND.
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel Spectron 2084blog

User avatar
SevenFFF
Posts: 211
Joined: Mon Jun 05, 2017 5:30 pm
Location: USA

Re: Simple DMA example

Post by SevenFFF » Fri May 11, 2018 12:36 pm

TTL levels on the cable I linked are 3v3, which is compatible with the GPIO pins on the FPGA. The cable also supplies 5v so the cable can power an arduino, etc, without needing an external power supply. The Next is obviously already powered! VCC on the ESP socket is (I expect) for powering the ESP module, not incoming power.
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel Spectron 2084blog

User avatar
KevB
Posts: 57
Joined: Tue Dec 19, 2017 6:34 pm
Location: Yorkshire, United Kingdom
Contact:

Re: Simple DMA example

Post by KevB » Fri May 11, 2018 2:44 pm

gavin1969 wrote:
Fri May 11, 2018 9:58 am
My USB-TTL cable arrived in the post and I just couldn't resist attempting to get it to work, but I've so far failed...
I've tried connecting the pins as seems logical, matching those in KevB's RS232 post, but as I connected the VCC line, the board powered up VERY BRIGHTLY and ANGRY! Argh! Panic! So I only allowed that line to be connected for just a moment!
Hi, sorry you are having problems with the USB link. As explained in my thread, I was very careful when connecting my Next to the PC as I knew that it could be risky. The chip and wiring works for my set up but then I'm using oldskool RS232 and not USB.

I can only provide feedback on my own set up. I would look into using a chip that reflects the voltage of the Next's VCC pin (3.3v).

Hope you get somewhere with the DMA too.
128K+, +2, +3, MF3, TBBlue 2A (2MB). ZX Spectrum fan since 1985. Next developer https://twitter.com/9bitcolor :: http://www.9bitcolor.com/

User avatar
gavin1969
Posts: 6
Joined: Sun Jul 16, 2017 8:20 pm

Re: Simple DMA example

Post by gavin1969 » Fri May 11, 2018 3:51 pm

SevenFFF wrote:
Fri May 11, 2018 12:22 pm
I’m sorry, was sick and completely forgot to write this up.

For now - DON’T connect VCC!! Just TX, RX and GND.
Sorry to hear you've been ill, hope you're better now.

Yes, worked out pretty quickly not to connect the VCC! :shock:

Wanted to post mainly so other impatient types (like me) didn't make the same mistake.

User avatar
gavin1969
Posts: 6
Joined: Sun Jul 16, 2017 8:20 pm

Re: Simple DMA example

Post by gavin1969 » Fri May 11, 2018 4:02 pm

KevB wrote:
Fri May 11, 2018 2:44 pm
gavin1969 wrote:
Fri May 11, 2018 9:58 am
My USB-TTL cable arrived in the post and I just couldn't resist attempting to get it to work, but I've so far failed...
I've tried connecting the pins as seems logical, matching those in KevB's RS232 post, but as I connected the VCC line, the board powered up VERY BRIGHTLY and ANGRY! Argh! Panic! So I only allowed that line to be connected for just a moment!
Hi, sorry you are having problems with the USB link. As explained in my thread, I was very careful when connecting my Next to the PC as I knew that it could be risky. The chip and wiring works for my set up but then I'm using oldskool RS232 and not USB.

I can only provide feedback on my own set up. I would look into using a chip that reflects the voltage of the Next's VCC pin (3.3v).

Hope you get somewhere with the DMA too.
Absolutely, I recognised there were different approaches going on, that's why I had the VCC tightly gripped in my fingers as I introduced it to the board. I'd previously tried to determine if a voltage from the board was needed to power the receiving side of the chip, and evidence seemed to suggest that it may - reality was different! :)

At least the TX, RX were 3.3V, and SevenFFF's explaination that the 5V is to power board makes complete sense too - as does the Amazon listing, once you ignore the image showing 3.3V on the listing and read the description.

Did the full connecting to google.com wifi test, just to be 100% sure the board wasn't damanged, and that all worked fine.
Then found an example of a similar cable being used with a Pi and no VCC connection, wish I'd found that earlier!

So my problem is either missing something in the cable driver settings, or missing something in Zeus. I've tried TX/RX both ways round, and couldn't spot any difference.

User avatar
KevB
Posts: 57
Joined: Tue Dec 19, 2017 6:34 pm
Location: Yorkshire, United Kingdom
Contact:

Re: Simple DMA example

Post by KevB » Fri May 11, 2018 4:30 pm

I don't know what to suggest at this moment. Maybe start a new thread or add it to my original RS232 thread as this was Robin's original DMA example and it seems to be the current place for several non connected topics. I know my RX/TX were swapped because of the cable but you've tried that already.

RS232 Thread: viewtopic.php?f=6&t=895
128K+, +2, +3, MF3, TBBlue 2A (2MB). ZX Spectrum fan since 1985. Next developer https://twitter.com/9bitcolor :: http://www.9bitcolor.com/

User avatar
SevenFFF
Posts: 211
Joined: Mon Jun 05, 2017 5:30 pm
Location: USA

Re: Simple DMA example

Post by SevenFFF » Fri May 11, 2018 4:51 pm

I know what the problem is. There is a special bleeding edge version of Zeus here. You also need to upgrade your core to .31 (TBU is inside that zip file) to support the new prescaled way of specifying baud rates.

I might need to update the DMA example for it to work, will check that when I wrote it up properly later this evening.

Other than that, it's just a question of having the right settings in Zeus. I will document them.

If you have a 100pf cap handy, put it across RX and GND (the orange and black wires if you're using that Moyina cable, but it's the two ESP socket pins next to each other, the pair at the bottom if you're holding the board so the text is the right way up. Helps stop getting bad bits from noise.
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel Spectron 2084blog

User avatar
gavin1969
Posts: 6
Joined: Sun Jul 16, 2017 8:20 pm

Re: Simple DMA example

Post by gavin1969 » Fri May 11, 2018 4:59 pm

Thanks, I'll give all that a try! :)

User avatar
SevenFFF
Posts: 211
Joined: Mon Jun 05, 2017 5:30 pm
Location: USA

Re: Simple DMA example

Post by SevenFFF » Fri May 11, 2018 5:01 pm

gavin1969 wrote:
Fri May 11, 2018 4:02 pm
as does the Amazon listing, once you ignore the image showing 3.3V on the listing and read the description.
Some of these cables are switchable to deliver either voltage on VCC. A different cable I have gives you a jumper on the miniature FTDI board inside the USB plug. So I think they just stole the wrong generic image to put on the listing :D This cable might have that too... if I was able to remove the moulded sleeve.
Last edited by SevenFFF on Fri May 11, 2018 5:30 pm, edited 2 times in total.
Robin Verhagen-Guest
SevenFFF / Threetwosevensixseven / colonel32
NXtel Spectron 2084blog

Post Reply