Fastest method of communicating with the computer?
Vaati
Posts: 712
What is the fastest method for the propeller to send data to the computer? FullDuplexSerial is too slow for my liking...
Comments
What type of speed do you need?
I don't know if this is possible anymore, after writing this all down...
The PropPlug is technically capable of communicating at up to 3Mb/s, you will need to write you own driver to get the speeds you are hoping for. I would suggest either a half-duplex driver or using two cogs to get full-duplex.
That USB code you linked to implements the HOST end of the USB protocol. In order to connect your Prop to the PC as a DEVICE you need to implement the DEVICe end of the Protocol, the HOST end being your PC.
There is a USB DEVICE implementation for the Prop here http://forums.parallax.com/showthread.php?97027-California-Dreamin
Edit: Improved versions here:http://forums.parallax.com/showthread.php?97328-USB-toys-to-play-with
I believe it can be used as a USB serial device. No idea about the maximum data throughput rate.
I have it connected like it is shown here except it now uses the USB propstick, and that picture shows it using the standard 3 pin tv interface. I have yet to take new pictures. ;-)
Essentially, I want to have a decent communication speed between the propeller and the computer so I can dump the contents of rom chips to a file.
So, for the pauses between addressing and the pause between display and the next cycle, how small can I make those? the datasheet says the minimum time between addressing and reading is 100 ns, which is 0.1 microseconds. Would I be safe doing that, or would that jeopardize the accuracy of the data I'm getting?
0.7 sounds like a great goal for a 64KByte rom... For that, would I just make the absolute minimum pauses in read cycles?
EDIT: What would I use to communicate using the prop plug? Just JonnyMac's code he posted? Also, I just realized that I have a total of 6 pins available for communication (P26 to P31), but I don't know if that'd make much difference.
Also, I couldn't get any data when the two pauses I have in my code were set to 1 microsecond... I think that's too fast for FDS to handle correctly.
Sometime ago I posted a thread with very compact assembly code for continuous serial ASCII communications at 5 Mb/s, and would write or read sequentially from hub ram. If that is interesting to you I would find that links for you.
Cheers,
Peter (pjv)
here is the link the pjv is talking about, I think! http://forums.parallax.com/showthread.php?120125-5Mbit-sec-ASCII-streaming-from-to-Hub-RAM
Jim
What happens if FTDI discontinues there USB to serial, and USB to FIFO chips? Then is there a good and reliable replacement for the next gen Prop Plug and the like?
Any USB IC that has a virtual com port driver should work fine.
JonnyMac, posted a couple of routines. I didn't look at the Receive, but I did look at the Transmit, and it's very close (identical almost) to one that I have been using that will go to 3Mpbs... and could probably be pushed a little further since I still had NOP overhead to throttle the output.
It's been awhile, but IIRC, in my testing (and it was completely anecdotal) when doing bi-directional communication, most of the serial objects would fall over at about 500kbps when reading large amounts of data. I may take a look at what Johnny has done when I get a chance. It would be nice to reclaim some pins
Though, I am sure you guys have much better skills with such matters than me I just decided to write something that worked for my project. It's the only communications channel I have had between the PC and prop that just let's you set the com port to it's maximum setting and everything "just works". YMMV
This would only be valid for Transmission from the Propeller at that speed, not sure it could keep up for Receiving.
The 'key' transmission loop in JonnyMac's code is copied below... the only difference I had was that the waitcnt was substituted with NOP's
I got back to working on this project yesterday, and I switched from using the simple_serial.spin to just the fullduplexserial.spin, and it cut off 6 seconds. (now it takes around 20 seconds to read it)
I had also tried using JonnyMac's tx object, but for some reason, it gives me either more or less data then the propeller is actually reading. I tried it twice just now and it gave me around 3Kbytes less the first time, and 20Kbytes more the second time.
I'll check some of the links you posted and see if those speed things up a bit.
Jonathan