Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/28/01 02:55
Read: times


 
#16986 - RE: RS232 Hardware Flow Control
Hi Joachim,

I know that your confusion is mostly generated by which line is which and how should be connected.
The communications and control lines used in a RS232 connection are all unidirectional, meaning that they are output by one side of the connection and input on the other. Each signal has a particular orientation that depends mostly on wether a device is is DCE or DTE. It is difficult to remember the direction of the TD and RD lines (is it really ?). TD has the ambiguous name of Transmitted Data, which could refer to either side of the connection because both are transmitting data. For these lines (any many other RS232 lines stated as output at their side) you should always take the point of view of the DTE (DataTerminalEquipment) device, which is ussualy the terminal or PC you will working on. So, TD refers to data that is being transmitted from your PC. RD refers to data that is being received by your PC.

Now you can link one 8052 with another or one 8052 to PC. Either one or another type of connection, the RTS (RequestToSend) has the same behavior. For example, if one 8052 is receiving data from another, it may stop reading data RS232 from internal buffer while it performes some critical events. As more data comes in, the input buffer will continue to receive data from another 8052 while servicing interrupts, placing it in danger of overflowing. The first 8052 alerts the second one of this condition by droping the RTS line. When the buffer has been emptied, RTS can once again be asserted which tell the other 8052 is ready to handle more data. That is, you have to define one bit of the 8052 port as output RTS and other like input CTS (ClearToSend) and link them in cross with the second 8052 lines or PC. If you define a input buffer of 16 bytes for example, in your interrupt service routine you will dropp the RTS line when 16 bytes are received (or less) informing the other 8052 to stop transmission. When the buffer has been emptied, you again asserts the RTS. On the other hand if you want to transmite, first you have to check your own CTS and if hasn't be dropped by other RTS line you can inform the other side that you want to transmit by asserting your own RTS linked with CTS at other side. Seems realy confusing isn't ?

I don't want to be selective but you can read more at:
ftp://ftp.dwp42.org/pub/dwp/bazaar/si/docs/serial13.zip or the same as: http://gladstone.uoregon.edu/~tsinger/...RS232.html Credits due to Christian Blum.

Regards,
Silviu


List of 11 messages in thread
TopicAuthorDate
RS232 Hardware Flow Control            01/01/70 00:00      
RE: RS232 Hardware Flow Control            01/01/70 00:00      
RE: RS232 Hardware Flow Control            01/01/70 00:00      
RE: RS232 Hardware Flow Control            01/01/70 00:00      
RE: RS232 Hardware Flow Control            01/01/70 00:00      
RE: RS232 Hardware Flow Control            01/01/70 00:00      
RE: RS232 -- the Standard            01/01/70 00:00      
RE: RS232 Hardware Flow Control            01/01/70 00:00      
RE: RS232 Hardware Flow Control            01/01/70 00:00      
RE: RS232 Hardware Flow Control            01/01/70 00:00      
RE: RS232 Hardware Flow Control            01/01/70 00:00      

Back to Subject List