Using software flow control. The operation of s/w flow control depends on the specific protocol being used and the type of data being sent.
For teletype like operation (sending/receiving ASCII characters) the XON and XOFF characters (11h and 13h) are sent by the receiver to tell the transmitter to turn on or off. If the data is binary, some other handshaking must be incorporated into the protocol so that the sender can properly handshake with the receiver to ensure data integrity, no buffer overflows, etc.
Paul Hovnanian mailto:Paul@Hovnanian.com
If the protocol is designed correctly you don't need flow control. Viz CAN bus, I2C et. al..
There are RS232RS485 boxes that carry through all the '232 logical signals, shifting them to '485 levels. Sort of a 50 wire RS485 ...
-- Nicholas O. Lindan, Cleveland, Ohio Consulting Engineer: Electronics; Informatics; Photonics. Remove spaces etc. to reply: n o lindan at net com dot com psst.. want to buy an f-stop timer? nolindan.com/da/fstop/
The directional control is usually built into the protocol, meaning all nodes track all messages and know when a message starts and stops. Then some busses have fixed message length, while others have a length field in the message.
Note that a PC prefers RS422 over RS485. RS422 has the master (PC) continously on while the peripheral nodes share the other pair towards the PC. In this case the PC doesn't have to switch the direction.
Actually, this not a 422 but a mixed 485/422 system. 422 transmitters are not meant to be tri-stated or cope with voltages on their outputs outside their supply lines.
- The wiring is two pairs + one GND line (ye olde PTT wiring with one extra blank wire for GND is perfect). Both lines double terminated. PC receiver side biased so you get a '1' when the slaves are off.
- The PC transmitter is always on and can be 422 or 485.
- The 'slaves' only respons when asked, then turn on their 485 (!) tranmitter.
I designed a lot of these systems and I used to explain it as "full-duplex RS485" or "multi-slave 422" to non-techical customers, whatever they grasped best.
Of course nowadays one only designs with RS485 TX/RX, even for connecting to older 422 systems.
Regards, Arie de Muynck
P.S. Never forget to prepare for the biasing resistors...