Specifications

Chapter 9 l l RS-232/RS-422/RS-482 Programming
38
outportb(BASE + 4, 3);
Or use the following function in API-232 library:
sio_RTS(port, 1);
A statement as following will clear the RTS signal and turn off the transmitter :
outportb(BASE + 4, 0);
Or use the following function in API-232 library:
sio_RTS(port, 0);
Besides, the following function in API-232 library is provided especially for
RS-485 programming:
sio_putb_x();
Please refer to API-232 User's Manual for more details.
2. REG
The transmitter(or receiver) is controlled by the control register BASE + 7 bit 1
(or bit 0), where BASE is the base I/O address of the port. When the
corresponding bit is set to "1", the transmitter/receiver is enabled. Setting the bit
to "0" will turn the transmitter/receiver off to high impedance status and the
16x50 UART chip will not transmit/receive any signal. In Turbo C language, a
statement as following will turn on the transmitter :
outportb(BASE + 7, 1);
A statement as following will turn on the receiver:
outportb(BASE + 7, 2);
A statement as following will turn off both the transmitter and receiver:
outportb(BASE + 7, 0);