9
;
; COM0IN: Return a char in ACC from COM0
;
COM0IN:
JNB RI,$
; Wait for receiver flag.
CLR RI
; Clear receiver flag.
MOV A,SBUF
; Read character.
RET
;
; COM0OUT: Output the char in ACC to COM0
;
COM0OUT:
JNB TI,$
; WAIT TILL BUFFER EMPTY
CLR TI
; CLEAR FLAG
MOV SBUF,A
; SEND THE CHAR
RET
For more information on this serial interface, see section 3.4 of the SAB 80515/80535 Single-Chip Microcontroller User's Manual included
in the appendices.
COM0 HANDSHAKE LINES
An input and output handshake line is available with the standard RS-232 option which allows you to implement software handshaking.
The input line is connected to P5.7 and you will read a 0 or 1 for a + or - RS-232 level, respectively (note that if 0 has been written to P5.7,
1 must be written to it to make it an input). The output line is connected to P5.6, and similarly a 0 or 1 output will produce a + or - RS-232
level, respectively.
When the RS-422 option is installed, an output of 1 on P5.6 enables the transmitter and a 0 disables.
COM1 AND COM2
These ports are in the SC26C92 with COM1 and COM2 corresponding to channel A and
channel B respectively. The ports are very versatile as seen in the following list of features:
Quadruple buffered receiver data registers
Programmable data format
5 to 8 data bits plus parity
odd, even, no parity or force parity
1, 1.5 or 2 stop bits programmable in 1/16-bit increments
Programmable baud rate for each receiver and transmitter selectable from:
18 fixed rates: 50 to 38400 baud
non-standard rates to 115200 baud
one user defined rate derived from programmable timer/counter
external 1X or 16X clock
Parity, framing, and overrun error detection
False start bit detection
Line break, and mid character break detection
Programmable channel mode
Normal (full-duplex)
Automatic echo
Local loopback
Remote loopback
Automatic wake-up mode for multidrop applications
(RS-232 CONFIGURATION)
COM1 (CHANNEL A)
1
2 CN2
n.c.
o o
n.c.
Tx
o o
handshake in (IP4)
Rx
o o
handshake out (OP0)
n.c.
o o
n.c.
GND
o o
n.c.
9
10
COM2 (CHANNEL B)
1
2 CN3
n.c.
o o
n.c.
Tx
o o
handshake in (IP5)
Rx
o o
handshake out (OP1)
n.c.
o o
n.c.
GND
o o
n.c.
9
10
(RS-485 CONFIGURATION)
CN2 & CN3
1
2
n.c.
o o
n.c.
TxA
o o
RxB
TxB
o o
RxA
n.c.
o o
n.c.
GND
o o
n.c.
9
10
Содержание MicroPac 535
Страница 22: ...APPENDIX D MicroPac 535 Schematics...
Страница 23: ......
Страница 24: ......
Страница 25: ......
Страница 26: ......