Main Site Documentation

FEZ Panda II: serial port hardware handshake RTS dosn't work


#1

FEZ Panda II

I just tried to switch serial communication (COM2) to hardware handshake

UART.Handshake = Handshake.RequestToSend;

.
For testing I made a loopback and watched the data I received. To control the data flow I connected RTS to another IO-Port and set it to false. Just before sending I tried to set it to true - but it always stays at false (verified by reading the RTS pin). I didn’t receive any datas.
Does hardware handshake on COM2 really works? Thank you for your answers.


#2

RTS is set by the sender when it wants want to send data. The CTS pin is set by the receiver when it is ready to receive data.

RTS (Request to send) is an output. CTS (Clear to send) is an input.

You should be toggling the signal to the CTS pin.


#3

Thanks for the quick reply :). When I toggle CTS, I am able to control the flow!
Question: in case of loopback I am sender and receiver at the same time. Therefore I thought I could control RTS, in order NOT to send any data out, when RTS is low?


#4

Wire RTS to CTS.


#5

RTS can’t be set by coding?


#6

Normally you do not manually control RTS. This is left to the serial driver. The serial driver toggles RTS according to how much free space is in its receive internal buffer. In the micro framework there is not a method to manually control RTS.

RTS means the remote end is allowed to send. That is why it is connect to CTS.

What are you trying to achieve by fooling with RTS?


#7

Hi, I wanted to connect COM2 via an SM34 convert to an RS485 bus and connect RTS of COM2 to TEN (transmit enabled) of SM34 and then control RTS. With this configuration it would be possible to receive all sent datas as echo (and may be verified). Since RTS doesn’t do our need, I’ll taka any any other digital pin.
Thanks for your replies!