User`s manual
XP8000 Series (PLCBus
TM
)
Z-World 530-757-3737 13
There are 14 internal registers, 7 of which you can read and 9 of
which you can write:
A2 A1 A0 Read Write
0 0 0 MR1, MR2 MR1, MR2
0 0 1 SR CSR
010 Reserved CR
0 1 1 RHR THR
100 Reserved ACR
1 0 1 ISR IMR
1 1 0 CTU CTUR
1 1 1 CTL CTLR
If the UART is being read, one set of registers is addressed. If it
is being written, the other set is addressed.
Refer to the Signetics SCC2691 product description.
How to Use the RS232 Board
Generally, this is what you do:
1 Initially, send a reset command to the PLCBus.
2 Place the address of one of the RS232 board’s registers on
the bus. Write a reset command to an RS232 board’s CTRL
register.
3 As needed, write to the internal registers of the board’s UART
to control the UART. Read the UART’s internal registers to
find out how things are going.
4 Read the RHR (receive holding register) or write to the THR
(transmit holding register) to communicate.
Connections
There are two RS232 connectors on the board, a 10-pin header,
H1, and a 6-wire “phone jack,” H2. You can use either one.
2
4
1
3
65
87
109
TXD /IN (CTS)
RXD /OUT (RTS)
GND
12345
TXD
/IN (CTS)
RXD
/OUT (RTS)
GND
6
Header H1 Jack H2
Addressing the board
There are two registers on an RS232 board, the control register
and the data register. Each is addressable on the PLCBus. The
address of an RS232 board register is determined by jumper J1.
J1 can be set four different ways, giving up to 4 RS232 boards
per bus. Each register’s 15-bit address has this format:
00100 00000 xy00R
R = 0 for CTRL register, 1 for DATA register
y = 1 when J1 pins 3-4 are not connected
x = 1 when J1 pins 1-2 are not connected.
Software gives RS232 expansion boards logical addresses, 0–3,
according to the following formula:
logical address = xy
where x and y are described above. Observe that, for any RS232
board, the DATA address = CTRL address + 1.
Reading and Writing to the UART
The PLCBus cycles have specific meaning when addressing an
RS232 board.
BUSWR Write data to either CTRL or DATA register.
BUSRD0 Read RS232 board status. Bit 0 (when 0) indicates the
presence of an RS232 board. Bit 1 (when set) indicates
that the
UART needs servicing. This read is valid only
when the board’s
CTRL register has been addressed.
BUSRD1 Read the UART internal register selected by the board’s
CTRL register. This read is valid only when the board’s
DATA register has been addressed.
BUSRESET Resets all expansion cards on the PLCBus. However, an
RS232 board does not respond to this. The UART is re-
set with the RESET bit of the CTRL register.
Controlling the UART
To control the UART on the RS232 board, you send data to, or
read data from, one of its internal registers. This uses the
board’s control and data registers. This is the control register:
RESET A1
LT1180
ON
A2A0CE
——
/CE Enables the UART chip when low. The UART must be
enabled to read from it or write to it.
A0–A2 Select one of the UART’s internal registers. The register
selection depends also on whether you are reading or
writing and whether
MR1 or MR2 has been selected.
RESET Resets the UART.
LT1180 ON When set, enables the LT1180 RS232 driver. When
clear, reduces power consumption.
The RS232 board can communicate with any RS232 device.
When a modem is used with the RS232 board, TX of the RS232
board must be connected to RX of the modem and vice versa.
Connecting a null modem between the RS232 board and the
modem takes care of this.
Interrupts from the RS232 Board
The RS232 expansion board has the capability of interrupting
your controller through the INT1 line whenever
1 a character has been received (RXRDY)
2 the transmit buffer is empty (TXEMT)
When such an interrupt occurs, your program may check for er-
rors (parity, framing, and overrun errors).
The /AT line of the PLCBus is connected to INT1 of the Z180.
There may be more than one interrupting device on the
PLCBus. An interrupt service function must check all devices
that could possibly have caused the interrupt, and service the
devices that need service.
You can also test whether an RS232 expansion card is interrupt-
ing by executing a BUSRD0 cycle. If you get a zero result, the
board generated no interrupt.
RS232 Board Specifications
Board Size 2.835 × 3.525 × 0.75
Operating Temp –40°C to +70°C
Humidity 95% r. h., non-condensing
Power
24VDC, 80 mA
Provides One full-duplex RS232 port. Up to 57,600 bps.