Shop OBEX P1 Docs P2 Docs Learn Events
FullDuplexSerial Receive only — Parallax Forums

FullDuplexSerial Receive only

Capn_DaveCapn_Dave Posts: 20
edited 2008-08-07 16:44 in Propeller 1
Is there a way to initialize the FullDuplexSerial object to not consume a transmit pin.
I am using the RF ID TAG READER and do not need a·transmit pin.
freaked.gif

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Caught in the PropWash

Comments

  • TimmooreTimmoore Posts: 1,031
    edited 2008-08-07 06:20
    Set the pin to -1
  • AribaAriba Posts: 2,685
    edited 2008-08-07 08:58
    Here is an Serial-Receiver only object. It has lower byte count, supports higher baudrates, and can also receive 9 databits (i.e for a parity bit).

    Andy
  • Capn_DaveCapn_Dave Posts: 20
    edited 2008-08-07 13:19
    I tried using -1. It becomes pin 31, killing recevie on the pin 31.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Caught in the PropWash
  • Capn_DaveCapn_Dave Posts: 20
    edited 2008-08-07 13:20
    Ariba,
    Thanks. I thought of doing that but wanted to have just one serial object in my library.
    Thanks again

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Caught in the PropWash
  • TimmooreTimmoore Posts: 1,031
    edited 2008-08-07 15:48
    try pcfullduplexserial4fc from object exchange that definitely supports -1 since I did it.
    http://obex.parallax.com/objects/340/
  • Capn_DaveCapn_Dave Posts: 20
    edited 2008-08-07 16:09
    Thanks, I'll give that a try.

    I think the -1 becomes a 31 in the ··· ·shl···· txmask,t2··· instruction.



    I verified this must be happening with the following code transmitting on pin 30

    com.start(31,-2,0,9600)

    com.str(string("TRANSMITTING USING PIN -2"))··






    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Caught in the PropWash
  • Capn_DaveCapn_Dave Posts: 20
    edited 2008-08-07 16:20
    I found the easiest way to get around my problem.

    I used mode = 4 for open drain on TX
    I still used -1 as the TX for readability

    OBJ
    · com:"fullduplexserial"
    · reader:"fullduplexserial"

    PUB START
    ··com.start(31,30,0,9600)···· ' start com port
    · reader.start(0,-1,4,9600)··· ' start reader port

    TNANX


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Caught in the PropWash
  • TimmooreTimmoore Posts: 1,031
    edited 2008-08-07 16:22
    There is explicit code in the 4 port version that checks for -1. The tradeoffs are its bigger in code but supports up to 4 ports with 1 cog. Does check for -1, optionally supports cts/rts flow control. You can access the ports from multiple objects at the same time thouh you have to handle any interleaving rx/tx issues. If you want > 4 ports you have to do some work (copy and modify 1 variable) but it increases code size.
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-08-07 16:44
    Why not use the same pin number for send and receive and use open baud mode?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.