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

Full Duplex Serial

kt88seampkt88seamp Posts: 112
edited 2009-11-22 02:00 in Propeller 1
Is this the correct syntax for recieving a byte and having the prop wait for the incoming data? The program I wrote compiles OK but the byte does not show up on the LEDs. All the external circutry I am using on to transmit the byte from my PC to the prop works because I tested it on an SX.


CON
_xinfreq = 5_000_000
_clkmode = xtal1 + pll16x


OBJ

BS2 : "BS2_Functions"
SER : "FullDuplexSerial"

PUB Main | buffer

dira[noparse][[/noparse]0..7] := 255
SER.Start(15, 14, 2, 9600)

repeat

  buffer := SER.rx
  outa[noparse][[/noparse]7..0] := buffer


Comments

  • DynamoBenDynamoBen Posts: 366
    edited 2009-11-22 01:36
    Make sure the FullDuplexSerial mode is set properly. Typically I use 0 but it depends on how your interfacing serial to your prop.
  • kt88seampkt88seamp Posts: 112
    edited 2009-11-22 02:00
    OOps I feel stupid for posting this now·blush.gif·. I just had the TX and RX reversed and the baud mode set incorrectly. Simple.
Sign In or Register to comment.