Serial Programming Tools |
ADDC™
ADDC™ is the best method for switching between transmission and receiving when using
When using ADDC™, additional code is not required to switch between data transmitting and receiving, since the switching mechanism is managed automatically by the board’s
RTS
To ensure precise timing control when using
There are 2 methods for controlling
Method 1
The following method is commonly used for
sio_SetWriteTimeouts(port, 0); | /* Set sio_write() into block mode if for Windows NT and |
| Windows 95/98 */ |
sio_RTS(port, 1); | /* Turn on RTS signal. The |
| transmitting data. */ |
sio_write(port, buff, 10); | /* Write 10 byte characters in "buff". The function blocks |
| until the last character is transmitted */ |
sio_RTS(port, 0); | /* Turn off RTS signal. The |
| receiving data. */ |
sio_read(port, buff, 10); | /* Read 10 bytes */ |
Method 2
The PComm or
sio_putb_x(port, buff, tick ); | /* 1. Turn on RTS and ready for transmitting data. |
| 2. Send data. |
| 3. Wait for tick time. |
| 4. Turn off RTS and ready for receiving data. */ |
To see more detailed information about these functions, refer to the PComm library’s