View Full Version : FullDuplexSerial baud rates
01-12-2008, 10:48 PM
I just did a search, and looked at the object file, but I do not see any reference to what baud rates the FullDuplexSerial program supports. Maybe I missed the tuturial or the disscusion·about this. Is there a list of all the baud rates that this program supports, available somewhere.
01-12-2008, 10:52 PM
It supports all baud rates you can think of, and even more.. That's the beauty of doing all in software... The limit is around 1 MBit/sec
01-12-2008, 11:29 PM
I am only familiar with the standard rates, numbers like·4800, 19k2, 57600 ..., etc. I guess the next qustion is how do you·translate 1 MBit/sec, so it fits into the format of ...start(0, 1, 0, xxxxx). My project is going to be, two propellers talking to each other. I remember seeing some posts where this has been done, but the code was unavailable or the code was·not clear enough for me to understand, so I will roll my own.
01-13-2008, 12:27 AM
From the notes that I've collected on this forum, according to Mike Green:
"The FullDuplexSerial routines should work to at least 384 kB"
01-13-2008, 03:30 AM
It sometimes helps to look into the code... the maximum instructions used in a bitcell are 15 = 750 ns which will allow receiving and transmitting at 1,2 MBit/second at the same time. Of course there is handling of bytes which has to fit into the stop bit to uphold that rate (or to be ready to receicve). Those take about 1µs so a burst rate of 1MBit is possible.
@Rsadeike: As I have not the slightest idea what the obstacles could be which keep you away from just DOING this seriel communication, I can't help you at the moment...
But I gave a small program snippet to a BS2 programmer some hours ago...
01-13-2008, 05:13 AM
I have been using 115200 baud between two Props for months now. Originally started at 38400. I'm not using any long strings of bytes, maybe only up to about 8. And all is initiated with some key press, so only a burst, then none for many seconds to minutes, normally.
Another interface one Prop has is with another board with a PIC, which has a nominal 35714 baud speed. I was so pleased to see FullDuplexSerial support such non-standard rate. Thank you, whoever programmed FDS. http://forums.parallax.com/images/smilies/yeah.gif
01-13-2008, 05:29 AM
Well, maybe my question was so obvious to evertbody else, but it was not obvious to me. For the benifit of some other person like myself, I will share the following.·I guess the first definition: BAUD = bits per second. I am probably going to run a test program, using pins 31, and 32 on the Propeller, connecting back to the Hyperterminal program. After looking at the Hyperterminal baud rate selection window, the following is what you will see:
110, 300, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800, 921600
It falls short of the 1_000_000 bps that the Propeller might be capable of doing, so I will have to figure out a different way of testing the higher values. Now, the thing to remember is that these values are standard in a program like Hyperterminal, but with the FullDuplexSerial program you can use values like (this is my supposition) 100, 1900, 100000, 910000, as long as you have a matching number on the other end. For whatever reason I thought that everything used a standard value as shown in the Hyperterminal selection area. I could still be wrong about this.
The next step will probably be hooking up two Propellers, with one displaying eveything it has received in a Hyperterminal window, I guess a couple of small ·LCD units would be handier. That way I know that at least one side will be working correctly.
EDIT1> I found this explanation, for full-duplex and half-duplex, which I thought was pretty good.
adj.) Refers to the transmission of data (http://www.webopedia.com/TERM/f/data.html) in two directions simultaneously. For example, a telephone is a full-duplex device (http://www.webopedia.com/TERM/f/device.html) because both parties can talk at once. In contrast, a walkie-talkie is a half-duplex (http://www.webopedia.com/TERM/f/half_duplex.html) device because only one party can transmit at a time. <EDIT1
Post Edited (Rsadeika) : 1/14/2008 10:49:28 AM GMT
01-13-2008, 08:08 AM
Using the "standard" values has technical reasons when you design a simple UART. It has also historic reasons. And there is really no need to use other values, except if you fall short of reaching a high rate, but you could go with 80% of it... why should you constrain yourself to 50%?
Most PCs will have their problems when you state 460,800 or 921,600 http://forums.parallax.com/images/smilies/smile.gif
And as the Propeller will of course send with 921_600, receiving at that rate will overextend the main program. When you use SPIN eventually for generating or handling received data, even 115_200 is a very advanced speed...
Post Edited (deSilva) : 1/13/2008 9:01:08 PM GMT
01-13-2008, 08:36 AM
If you are looking for the fastest serial Prop to Prop communication possible, take a look at Beau's High Speed Serial code: http://forums.parallax.com/showthread.php?p=691952
Paul Baker (mailto:email@example.com)
Propeller Applications Engineer
Parallax, Inc. (http://www.parallax.com)