
CHAPTER 4 SERIAL PORTS
Page 9
Figure 4-1 Serial port and jumper locations
DESCRIPTION
The RPC -52 has two serial ports that can be used for
interfacing to a printer, terminal, RS-485 network, or
other ser ial devices. This chapte r descr ibes their
characteristics and how to use them. Frequent
references are made to commands listed in the BASIC-52
Programming Manual or RPBA SIC-52 Software
Supplement in this manual. Please refer to these
manuals for m ore inform ation about these comm ands.
Serial por ts are num bered C OM 0 and CO M1. COM 0 is
RS232 only and is used for progr am development.
During r un time, it can be used for other functions.
COM1 is a general purpose port and can be used as
either RS-232 or RS-422/485.
Each port has a 256 character interrupt driven input and
output buffer. This allows characters to be sent out
(using PRINT) without slowing down program
execution. However, if the PRINT buffer fills, program
execution is suspended until all characters are in the
buffer. Both ports have a 256 character input buffer.
When more than 256 char acters are r eceived, excess
ones are ignored.
Your circuit board may have COM0 and COM1 marked
as COM1 and COM2. If this is the case, the silkscreen
is wrong and this manual should be followed.
COM0 SERIAL PORT
This port uses a VTC-9F serial cable to connect external
serial devices to the por t. The cable consists of a 10 pin
IDC connector wired one-to-one to a DB-9 connector.
Line 10 is sim ply cut off. The pin out is designed so it
plugs directly into the 9 pin serial port connector on a
PC.
COM 0 does not use hardware handshake lines. T he
CTS line is pulled high in case external equipment uses
this line.
This port is normally used for program ming. D uring
run time it may be used as a general purpose seria l port.
When used for programming or with the INPUT
statement, it will accept ASCII character values from 0
to 127. When used with the GET function, it will return
ASCII values from 0 to 255.
COM1 SERIAL PORT
COM 1 is either an RS-232 or RS-422/ 485 port. A
VTC-9F serial cable, descr ibed above, is used for RS-
232 level communications. RS-485 is from screw
terminals. COM 1 is identical to COM0 except that
COM 1 has 2 hardware handshaking lines, C TS and
RTS. When RTS goes low, the RPC-52 is held off from
transmitting out COM1. The status of this port is read
by the LINE B statement. The example below returns
the status of the RTS line:
100 B = LINEB(2,5).AND.64
If B = 64, transmission is held off.
The CTS line may be set high or low to hold off
comm unication. Line 400 sets CTS high and 500 sets it
low, or to hold off.
400 LINEB2,2,0A5H
500 LINEB2,2,0B5H
Jumper W1 determines if COM 1 receive is RS-232 or
RS-422/485.
[1-2] RS-485
[2-3] RS-232 (default)
COM1 default is RS-232. Use the CONFIG BAUD
statement to set it to RS-422 or RS-485. When set to
RS-422, the transmitter is always on. RS-485 mode
turns on the transmitter only when sending.
RS-422/485 Termination network
When the RPC-52 is the last physical unit on a network
(RS-485), or it is the only unit (RS-422), the receiver
must be terminated to prevent ringing. Jumper block
W2 installs or removes this network. Set W2 according
to the table below:
Commentaires sur ces manuels