Shop OBEX P1 Docs P2 Docs Learn Events
FullDuplexSerial baud rates — Parallax Forums

FullDuplexSerial baud rates

RsadeikaRsadeika Posts: 3,837
edited 2008-01-13 01:36 in Propeller 1
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.

Thanks

Ray·

Comments

  • deSilvadeSilva Posts: 2,967
    edited 2008-01-12 15:52
    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
  • RsadeikaRsadeika Posts: 3,837
    edited 2008-01-12 16:29
    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.
  • Mike CookMike Cook Posts: 829
    edited 2008-01-12 17:27
    From the notes that I've collected on this forum, according to Mike Green:

    "The FullDuplexSerial routines should work to at least 384 kB"

    http://forums.parallax.com/showthread.php?p=609488



    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Mike
  • deSilvadeSilva Posts: 2,967
    edited 2008-01-12 20:30
    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...
  • HarleyHarley Posts: 997
    edited 2008-01-12 22:13
    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. yeah.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Harley Shanko
  • RsadeikaRsadeika Posts: 3,837
    edited 2008-01-12 22:29
    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 in two directions simultaneously. For example, a telephone is a full-duplex device because both parties can talk at once. In contrast, a walkie-talkie is a half-duplex device because only one party can transmit at a time. <EDIT1




    Post Edited (Rsadeika) : 1/14/2008 10:49:28 AM GMT
  • deSilvadeSilva Posts: 2,967
    edited 2008-01-13 01:08
    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 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
  • Paul BakerPaul Baker Posts: 6,351
    edited 2008-01-13 01:36
    Rsadeika,

    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
    Propeller Applications Engineer

    Parallax, Inc.
Sign In or Register to comment.