Shop OBEX P1 Docs P2 Docs Learn Events
Full Duplex Serial Question — Parallax Forums

Full Duplex Serial Question

Sniper KingSniper King Posts: 221
edited 2008-06-27 22:43 in Propeller 1
Is there a maximum number of bytes you can send with Full Duplex Serial?


Example:

bytemove(@strptr,String("Hi, My name is Michael King and i am testing the Full Duplex Serial Object"),73)

FDS.str(@strptr)

E/

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
·- Was it pin 11 or 26?· Hmmm....··I think the smell of smoke tells the whole story.· Must be 26.



Michael King
Application Engineer
R&D
Digital Technology Group

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-06-27 19:14
    The output buffer is only 16 bytes, but the output routine that fills the buffer waits until there's room before adding another character.
    In other words, there is no maximum number of bytes you can send with FullDuplexSerial. When you move a string to your own buffer (as in your example), make sure to include the terminating zero byte in the count. A string like "ABCD" is really 5 bytes in length if you include the terminator. In your example, you can transmit the constant string directly as in: FDS.str(string("ABCD"))
  • Larry MartinLarry Martin Posts: 94
    edited 2008-06-27 22:43
    If you don't want to wait for bytes to shift out, you might want to grab Mike's BB_FullDuplexSerial from http://obex.parallax.com/objects/27/

    It has a configurable FIFO size, defaulted to 64 bytes (i think)

    I was intermittently corrupting incoming 17-byte messages until I found this package.

    Thanks again, Mike
Sign In or Register to comment.