Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

RS 232 (RTS CTS) Flow control management.

Status
Not open for further replies.

ejjall

New Member
Hello,
I need to implement a layer to manage the RTS/CTS signals for RS232 communciation using an infineon XE166.
This layer is used to manage the communication with a GSM modem.
The problem is that the Flow control specification is not very clear.
so i have some questions to ask:
In DTE-DCE communication, why DCE is always allowed to send data to the DTE, whereas the DTE should Raise RTS and wait CTS before sending DATA to the DCE.
The other question is, when DTE is sending data to the DCE and in the middle of the transmission process the modem clear the CTS, transmission should be continued or not ??
If anywone can answer me i'll be thankfull.
 
hi,
Its a case of Master and Slave data exchange.
DTE is the master[ controller] and the DCE is the slave.

The Modem clearing clearing its CTS when its sending data should not disable data transmission from the DCE to DTE

Serial (RS232) port pinout and signals
 
Last edited:
Thank you ericgibbs for answering.
"The Modem clearing clearing its CTS when its sending data should not disable data transmission from the DCE to DTE". Honestly, I didn't get it, I propose an example :
DTE wants to send 100 bytes.
It checks CTS, when CTS is checked its start sending data, at the byte 60 (for one reason or another) the DCE clear its CTS.
In this case what should do the DTE ??
continue sending data, wait until CTS become set and send the remaining data, stop definitely the transmission.. ??
 
Thank you ericgibbs for answering.
"The Modem clearing clearing its CTS when its sending data should not disable data transmission from the DCE to DTE". Honestly, I didn't get it, I propose an example :
DTE wants to send 100 bytes.
It checks CTS, when CTS is checked its start sending data, at the byte 60 (for one reason or another) the DCE clear its CTS.
In this case what should do the DTE ??
continue sending data, wait until CTS become set and send the remaining data, stop definitely the transmission.. ??

hi,
I thought you meant the other 'sense' for the CTS.
If CTS is cleared by the receiving equipment, the sending equipment should suspend the transmission until the CTS is re-enabled.

Is this what you are asking.?
 
hi,
yes it is that what i want to kwow.
Thank's ericgibbs.
Did you have an idea why almost all documents for (RTS/CTS) flow control discut only one side of the transmission control (from DTE to DCE) ?? is it because DTE is assumed to receive data wirthout problems ??
 
hi,
yes it is that what i want to kwow.
Thank's ericgibbs.
Did you have an idea why almost all documents for (RTS/CTS) flow control discut only one side of the transmission control (from DTE to DCE) ?? is it because DTE is assumed to receive data wirthout problems ??

hi,
If you assumed that the DTE was say a computer and the DCE was a modem, then a PC would be able to receive data much faster than most modems could send it.
The PC could send data at too higher rate than the modem could receive it, so the if the modem was programmed to control RTS and the PC was programmed to detect CTS, the modem will disable the CTS line when its internal RX buffer was almost full.

The problem is that there are so many combinations of wiring conventions and programming options that usually the cables and program are application specific.

For example, PC to PC cables are often wired as null modems, this means the handshaking lines are connected back onto themselves in the connector, so no data transfer control exists. They rely on the speed of the PC's to capture the data thru all of the standard Baud rates.

What application are you working on.??

EDIT:
I must add there is a software control option, XON, XOFF, which IMO is unsuitable for most apps.
 

Attachments

  • RS232Con1.png
    RS232Con1.png
    5.8 KB · Views: 290
Last edited:
i'm working on an embedded application on a µc infineon XE167.
I have to develop a layer wich will be able to manage the communication between the µc and a GSM modem using the RTS/CTS flow control. (the object is to send and receive SMS).
In my logic the µc must be the DTE, isn't it ??
i almost understand the one way of controlling the flow :
when the µc want to send :
1- set RTS
2- wait for CTS
3- If CTS = 1 ==> send Data (byte by byte) until data is totaly sent. (sending bytes is already functional)
4- If the CTS = 0 at the middle of transmitting ==> stop sending
5- at the end : Clear RTS.
Is it true ??
for reception i didn't find the logic steps to follow.
have u an idea ??
thx :))
 
i'm working on an embedded application on a µc infineon XE167.
I have to develop a layer wich will be able to manage the communication between the µc and a GSM modem using the RTS/CTS flow control. (the object is to send and receive SMS).
In my logic the µc must be the DTE, isn't it ??
i almost understand the one way of controlling the flow :
when the µc want to send :
1- set RTS
2- wait for CTS
3- If CTS = 1 ==> send Data (byte by byte) until data is totaly sent. (sending bytes is already functional)
4- If the CTS = 0 at the middle of transmitting ==> stop sending
5- at the end : Clear RTS.
Is it true ??
for reception i didn't find the logic steps to follow.
have u an idea ??
thx :))

hi,
I would say the mcu [DTE] would be the faster of the two devices, so I would program that to test the CTS line that the GSM modem is controlling its RTS out.
Your flow chart text is the way to go.
 
Last edited:
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top