Serial Communications - PROFACE PL-5700 Series Manual

Table of Contents

Advertisement

Appendix
2

Serial Communications

This section explains how to perform serial communications with the PL.
RS-232C (COM1/COM2) Cable Connections
<Example 1>
PL
1
C D
2
RD
3
TD
4
DTR
5
GND
6
DS R
7
RTS
8
CTS
9
RI
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
main( ){
ir.h.ah
ir.h.al
ir.x.dx
int86 (0x14,&ir,&or) ;
ir.h.ah
ir.h.al
ir.x.dx
int86 (0x14,&ir,&or) ;
}
• Changing commands or parameters also changes function (mode setting, data reception, etc.).
PL-5700 Series User's Manual
Dsub 25-pin
1
FG
2
S D
3
R D
4
RTS
5
CTS
6
DS R
7
SG
8
CD
20
DTR
REGS
ir,or;
=
0x00 ;
=
0xe3 ;
=
0 ;
=
0x01 ;
=
0x32 ;
=
0 ;
<Example 2>
PL
1
C D
2
RD
3
TD
4
DTR
5
GND
6
DS R
7
R T S
8
C TS
9
RI
/* Initialization */
/* 9600bps,8bit,NONE,1stop */
/*
COM1
*/
/* 1 character output */
/*
'2'
*/
/*
COM1
*/
Dsub 25-pin
1
FG
2
S D
3
R D
4
RTS
5
CTS
6
DS R
7
S G
8
C D
20 DTR
App-5

Advertisement

Table of Contents
loading

Table of Contents