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);
Summary of Contents for Industio C114HI
Page 1: ...C114HI 3 in 1 RS 232 422 485 Industrial Serial Board Apr 1998 2nd Edition All Rights Reserved...
Page 6: ......
Page 10: ...Introduction l l Chapter 1 4...
Page 20: ...Software Installation l l Chapter 3 14...
Page 26: ...For Windows NT Users l l Chapter 4 20...
Page 38: ...For DOS Users l l Chapter 7 32...
Page 42: ...For Windows 3 x Users l l Chapter 8 36...
Page 46: ...Chapter 9 l l RS 232 RS 422 RS 482 Programming 40...