Shop OBEX P1 Docs P2 Docs Learn Events
Help with rxtime — Parallax Forums

Help with rxtime

steprogsteprog Posts: 227
edited 2010-10-28 14:01 in Propeller 1
Hello Late Nighters,
I need a little help in how does one use the rxtime function in FullDuplexSerialPlus. I need a timeout waiting for data transfer. Anyone have an example?
Thanks,
Greg

Comments

  • kwinnkwinn Posts: 8,697
    edited 2010-10-28 07:42
    Here is a code snippet using rxtime. The line with " k := uarts.rxtime(0, 50)" waits 50mS to receive a byte, and returns with the variable "k" set to that byte or -1 if no byte was received after 50mS.

    This code uses pcFullDuplexSerial4FC, but FullDuplexSerialPlus is very similar. The line would read "k := uarts.rxtime(50)" in that case.
  • steprogsteprog Posts: 227
    edited 2010-10-28 14:01
    Thanks for this. I will give it a shot.
    Greg
Sign In or Register to comment.