Shop OBEX P1 Docs P2 Docs Learn Events
FullDuplexSerial issue — Parallax Forums

FullDuplexSerial issue

AKruzelAKruzel Posts: 25
edited 2011-06-07 10:30 in Propeller 1
I'm trying to run a simple code transmitting serial data from propeller to BS2. I'm not quite sure what i'm missing and/or doing wrong. I'm trying to make sense of the fullduplexserial code itself due to it's popularity but i'm having trouble understanding it due to a large part of it being assembly code. My goal is just to be able to transmit and receive one character at a time. If someone could help in explaining what i'm doing wrong it would be greatly appreciated. i have pin 0 of the propeller connected to pin 1 of the bs2 with a 2.2k in series. attached is my code and below are the results i get on the basic stamp 2 terminal when i let the code run for a little while:

127063126031125062124015123061122030121060120007119059118029117058116014115

Comments

  • John AbshierJohn Abshier Posts: 1,116
    edited 2011-06-06 15:41
    I don't think FullDuplexSerial allows TX and RX on same pin.

    John Abshier
  • Dave HeinDave Hein Posts: 6,347
    edited 2011-06-06 16:11
    I think it's OK to use the same pin number for RX and TX, but you could try different pin numbers. The dira[0..3]~~ will cause problems since the FDS cog will be driving pin 0. Use dira[1..3]~~ instead. The 115_000 baudrate passed to StartPST isn't exactly standard. Did you intend to use 115_200?
  • AKruzelAKruzel Posts: 25
    edited 2011-06-07 10:30
    yes, i did intend to use 115_200 in case i wanted to display information on the prop terminal. i did get serial comm working tho but using the simple_serial code. i used:

    simple_serial.init(-1,0,-9600), so i thought the issue was that i didn't have the mode selected in the fullduplexserial initialize set to invert tx and i was right. however i changed the mode to invert tx, by setting mode to 1, and i still get the same output as i mentioned above.

    i've also removed the line using dira to set pin 0 to an output. any other ideas?
Sign In or Register to comment.