User`s manual

PK2100
System Development s 4-9
For example, to read and write from serial port 0:
char ch;
ch = inport( RDR0 );
outport( TDR0, ch );
Ports may be polled or interrupt-driven. The interrupt vectors are given in
Table D-4, Appendix D.
Attainable Baud Rates
The serial ports built into the Z180 can generate standard baud rates when
the clock frequency is 6.144 MHz or 9.216 MHz or a small multiple, for
example, 3.072, 4.608, 6.144, 9.216, or 12.288 MHz. A crystal is
stamped with twice the clock frequency.
Z180 Serial Ports
The Z180 has two independent, full-duplex asynchronous serial channels,
with a separate baud-rate generator for each channel. The baud rate can
be divided down from the microprocessor clock or from an external clock
for either or both channels.
The serial ports have a multiprocessor communications feature that can be
enabled. When enabled, an extra bit is included in the transmitted
character (where the parity bit would normally go). Receiving Z180s can
be programmed to ignore all received characters except those with the
extra multiprocessing bits enabled. This provides a 1-byte attention
message that can be used to wake up a processor without the processor
having to monitor (intelligently) all traffic on a shared communications
link.
Figure 4-2 shows the configuration for Serial Channel 0. The configura-
tion for Serial Channel 1 is similar, but modem control lines RTS1 and
DCD0 are not available. Five of the seven registers shown are accessible
directly as internal registers.
Microprocessor Internal Bus
RDR0 TDR0
RSR0 TSR0RXA0 TXA0
Shift Register OutShift Register In
Baud-Rate
Generator
CLKA0
CNTLA0
STAT0
CNTLB0
RTS0
CTS0
DCD0
Figure 4-2. Z180 Serial Channel 0 Configuration