Appendix
App-5
PL-5700 Series User’s Manual
2
Serial Communications
This section explains how to perform serial communications with the PL.
RS-232C (COM1/COM2) Cable Connections
<Example 1>
<Example 2>
PL
Dsub 25-pin
PL
Dsub 25-pin
Sample output program
Below is a sample program for sending 1 character from the RS-232C connector.
• Because the PL uses an AT-compatible BIOS, the serial communication BIOS (INT
14 h) does not support communications by interrupt. Therefore, install a reception
interrupt function in the application.
#include <stdio.h>
#include <dos.h>
union REGS ir,or;
main( ){
ir.h.ah
=
0x00 ;
/* Initialization */
ir.h.al
=
0xe3 ;
/* 9600bps,8bit,NONE,1stop */
ir.x.dx
=
0 ;
/* COM1 */
int86 (0x14,&ir,&or) ;
ir.h.ah
=
0x01 ;
/* 1 character output */
ir.h.al
=
0x32 ;
/* ‘2’ */
ir.x.dx
=
0 ;
/* COM1 */
int86 (0x14,&ir,&or) ;
}
• Changing commands or parameters also changes function (mode setting, data reception, etc.).
1
C D
1
FG
1
C D
1
FG
2
RD
2
S D
2
RD
2
S D
3
TD
3
R D
3
TD
3
R D
4
DTR
4
RTS
4
DTR
4
RTS
5
GND
5
CTS
5
GND
5
CTS
6
DS R
6
DS R
6
DS R
6
DS R
7
RTS
7
SG
7
R TS
7
S G
8
CTS
8
CD
8
C TS
8
C D
9
RI
20
DTR
9
RI
20
DTR