Shop OBEX P1 Docs P2 Docs Learn Events
Full Duplex 4 advanced help — Parallax Forums

Full Duplex 4 advanced help

Zap-oZap-o Posts: 452
edited 2009-07-23 16:09 in Propeller 1
I am using the Full Duplex 4 object and I am not sure what states the RTS and CTS are considered in the object. I suppose in order to set it up correctly and with confidence, I need to understand it better.

My ideal situation: The host will always use the RTS (low) to indicate to the propeller, that it is ready to send data. The Propeller should always set the CTS (low) to tell the host that it is able to receive data.

Can some one that knows this object or knows assembly code help me out. Currently I have it set up as this and as a null modem:


Ser.AddPort(1, BT_TX, BT_RX, BT_CTS, BT_RTS, 0, %010000, 9600) 





Thanks again

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2009-07-23 15:28
    RTS will be high if there's room in the receive buffer. It will go low when the room in the buffer is below a threshold (rtsthreshold). There is a mode bit (xxx#INVERTRTS) that will invert the sense of the RTS bit.

    CTS is an input. If it's high, the transmit routine will transmit. If it's low, the transmit routine will not transmit. There's a mode bit (xxx#INVERTCTS) that will invert the sense of this input.

    Both RTS and CTS are optional as you've seen.
  • Zap-oZap-o Posts: 452
    edited 2009-07-23 15:45
    Mike
    Do you know what the threshold limit is I think it is 64? Is that in bytes also?
  • Mike GreenMike Green Posts: 23,101
    edited 2009-07-23 16:09
    If you supply an invalid threshold (0 or > 64), the routines use 48 (3/4 of the buffer size). The supplied size of the receive buffer is 64 bytes. It could be changed, but not easily.
Sign In or Register to comment.