Prop Baudrates
tom90
Posts: 55
Hey All,
Im using FullDuplex for data output and the highest baudrate I could manage was 460_800. Is there anyway I can get a higher baud rate out of FullDuplex, and if not is there any other object I can use that will accomplish a higher baud rate?
Thanks
Tom
Im using FullDuplex for data output and the highest baudrate I could manage was 460_800. Is there anyway I can get a higher baud rate out of FullDuplex, and if not is there any other object I can use that will accomplish a higher baud rate?
Thanks
Tom
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Toys are microcontroled.
Robots are microcontroled.
I am microcontroled.
If it's not Parallax then don't even bother. :-)
·
Mini-Din/PS2 connectors are for sale! 5 for $1! PM me if you wish to make an order.
Cheap·shipping unless specified!··········150 left!!··
[noparse][[/noparse]Edit] Added wait(b) and waitstr(pntr) to jm_rxserial; increased size of buffers.
Post Edited (JonnyMac) : 7/16/2009 9:35:44 PM GMT
obex.parallax.com/objects/340/
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
April, 2008: when I discovered the answers to all my micro-computational-botherations!
Tom, there are routines that have been optimized for higher baud rates as mentioned but they do suffer from imprecise timing at the higher speeds. This may not be a problem in some instances especially a simple point-to-point connection but using this to talk to another prop may cause problems.
Dedicating a cog to rx will achieve much higher data rates as I spec my drivers to 1Mbaud but I believe Hanno has some that run around 3M.
If your communication is essentially half-duplex you can use the one cog but have a modified serial routine that doesn't try to multitask but either receives or transmits. But in all this I must ask you, what hardware driver are you testing this speed with. I hope it's not RS-232 because you have probably max'd what the chip itself can do.
*Peter*
Cool code! Doesn't look like it'd be easy to convert into a one-cog half-duplex driver. I've been wanting a rs232 driver that can drive the 1Mbaud plus speeds that the FTDI usb-serial chips support. This looks like a good option.
Lawson
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Lunch cures all problems! have you had lunch?
*Peter*
FASTSERIAL FEATURES:
Timing accurate to 1Mbit (main feature)
Compiler time setting for data bits and stop bits.
Parity
Auto half-duplex (once it's transmitting or receiving it won't try to do both which suits most actual communications)
Binary variable receive buffer size (any binary multiple as is practical)
ANSI commands (draw lines, boxes etc)
FINAL VERSION GOALS:
run time selection of databits, stopbits, parity, baud.
break detection and generation
receive gap reporting
auto checksum
Full parity control
RS-485 on two pins (RXD/TXD + TE/RE) (previously removed)
*Peter*
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Nyamekye,
The next step after this is to have any arbitrary size passed in the start parameter list.
*Peter*
I have been busy lately but will soon test out all of your suggestions.
-Tom
I've been running High Speed drivers 2Mb (1cogTx,1cogRx) since early last year. I found
articles that showed how to setup Windows to use the 2Mb and 3Mb settings of the FTDI chip.
Then I found that when setting these baud rates (any baud rates) for the windows driver
actually causes the FTDI chip to then change it's Rx/Tx rates to the propeller. This caused
me to first load a cog with an autobaud routine (simple one) then once it determines the rate
the cog is reloaded with the Rx routine which is then followed by another cog being loaded
with the Tx routine. I'm running with 80MHz clock and was not able to code a working 3Mb in
both directions (Tx works, Rx doesn't). However, now that we are
clocking > 80MHz (100MHz with new 6.25MHz crystals), we can likely get to full 3Mbit in
both directions.
I had a need to watch a communications bus and get all of the traffic logged to the PC without
doing much buffering in the propeller RAM. This took me to these speeds. They work very well.
There's more write-up here: new-serial-driver-testing-results
I thought I'd posted the routines but off-hand, I'm not finding the posts in my quick search.
[noparse][[/noparse]edit] Found the post! http://forums.parallax.com/showthread.php?p=720623
Let me know if this encourages, or you need more info, etc.
Regards,
Stephen, KZ0Q
--
Post Edited (Stephen Moraco) : 7/21/2009 7:56:07 AM GMT
Lawson
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Lunch cures all problems! have you had lunch?
Post Edited (Lawson) : 7/21/2009 5:48:23 PM GMT
@Stephen Moraco
I've been able to break your serial RX code. The attached serial terminal is something I found on the 'net to let me send and receive binary bytes over rs232 without having to resort to programming. When I set it to a custom baud rate of 2_000_000 baud, type something into the transmit text box and hit send, garbage sometimes comes back. This terminal program won't do this when I tell it to "send file". My best guess is that whatever text is in the send box is dumped into the TX buffer of the FTDI chip in one block so the FTDI outputs RS232 bytes with no gaps. (setting 2 stop bits helps but won't fix this)
@JonnyMac
I can get your "jm_rxserial" to receive garbage too at 2_000_000 baud and 2 stop bits. With some small tweeks though I've been able to get the code working at 1_500_000 baud and 2 stop bits. (commented out a waitcnt after the ASM byte receive loop, and boosted the RX buffer)
My prop is clocked at 80Mhz.
Lawson
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Lunch cures all problems! have you had lunch?
Thanks for the testing and feedback. Good work!
I'd like to recreate your break and find out what needs "tuning" [noparse]:)[/noparse]
Are you using the autobaud routine? If so, are you sending the CR(s)
up-front that it needs?
In short, tell me how to recreate the failure and I'll hang a logic analyzer off of my
test platform to see what's happening... Then I should be able to fix it.
Again, thanks for the problem report!
Stephen, KZ0Q
Lawson
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Lunch cures all problems! have you had lunch?