View Full Version : Full Duplex 4 advanced help

07-23-2009, 09:52 PM
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

Mike Green
07-23-2009, 10:28 PM
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.

07-23-2009, 10:45 PM
Do you know what the threshold limit is I think it is 64? Is that in bytes also?

Mike Green
07-23-2009, 11:09 PM
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.