
PT-20 Programming Guide
Communication Ports
void clear_com(int port);
This routine is used to clear all data stored in the receive buffer. This can be
used to avoid mis-interpretation when overrun or other error occurred. Use
the argument “port” as the connect port which is chosen to open . You can
choose 1(RS232).
To close specified communication port
void close_com(int port);
The close_com disables the communication port specified. Use the
argument “port” as the connect port which is chosen to open . You can
choose 1(RS232).
if (com_cts(1) = = 0) _printf(“COM 1 CTS is space);
else _printf(“COM 1 CTS is mark”);
This routine is used to check current CTS level. Use the argument “port” as
the connect port which is chosen to open. Now we only can choose
1(RS232).
1 : allow to deliver
0 : not allow to deliver
To see if any COM port transmission in process (End Of Transmission)
while (com_eot(1) != 0x00); write_com(1,”NEXT STRING”);
Comentários a estes Manuais