The Z86C21 microcontroller is a member of the Z8 singlechip microcontroller family with 8 Kbytes of ROM and
236 bytes of RAM. The device is packaged in a 40-pin DIP,
44-pin PLCC, or a 44-pin QFP with a ROMless pin option
available on the 44-pin versions only. With the ROM/
ROMless feature selectively, the Z86C21 offers both external memory and preprogrammed ROM, making it wellsuited for high-volume applications or where code flexibility is required.
Zilog’s CMOS microcontroller offers fast execution, efficient use of memory, sophisticated interrupts, input/output
bit manipulation capabilities, and easy hardware/software
system expansion along with low cost and low power
consumption.
■Full-Duplex UART
■All Digital Inputs are TTL Levels
■Auto Latches
■RAM and ROM Protect
■Two Programmable 8-Bit Counter/Timers each with
6-Bit Programmable Prescaler.
■Six Vectored, Priority Interrupts from Eight Different
Sources
■Clock Speeds: 12 and 16 MHz
■On-Chip Oscillator that Accepts a Crystal, Ceramic
Resonator, LC, or External Clock Drive.
The Z86C21 architecture is characterized by Zilog’s 8-bit
microcontroller core. The device offers a flexible I/O
scheme, an efficient register and address space structure,
multiplexed capabilities between address/data, I/O, and a
number of ancillary features that are useful in many industrial and advanced scientific applications.
For applications demanding powerful I/O capabilities, the
Z86C21 provides 32 pins dedicated to input and output.
These lines are grouped into four ports. Each port consists
of eight lines, and is configurable under software control to
provide timing, status signals, serial or parallel
I/O with or without handshake, and an address/data bus
for interfacing external memory. There are three basic
address spaces available to support this configuration:
Program Memory, Data Memory, and 236 general-purpose registers.
1
GENERAL DESCRIPTION (Continued)
Z86C21 MCU
WITH 8K ROM
To unburden the program from coping with the real-time
tasks, such as counting/timing and serial data communication, the Z86C21 offers two on-chip counter/timers with
a large number of user selectable modes, and an on-board
UART.
Output Input
Port 3
UART
Counter/
Timers
(2)
Interrupt
Control
VccGNDXTAL
FLAGS
Register
Pointer
Register File
256 x 8-Bit
Notes:
All Signals with a preceding front slash, "/", are active Low, e.g.,
B//W (WORD is active Low); /B/W (BYTE is active Low, only).
Power connections follow conventional descriptions below:
/ROMless (input, active Low). This pin, when connected to
GND, disables the internal ROM and forces the device to
function as a Z86C91 ROMless Z8. For more details on the
ROMless version, refer to the Z86C91 product specification. (Note: When left unconnected or pulled high to VCC,
the part functions as a normal Z86C21 ROM version). This
pin is only available on the 44-pin versions of the Z86C21.
/DS (output, active Low). Data Strobe is activated once for
each external memory transfer. For a READ operation,
data must be available prior to the trailing edge of /DS. For
WRITE operations, the falling edge of /DS indicates that
output data is valid.
/AS (output, active Low). Address Strobe is pulsed once at
the beginning of each machine cycle. Address output is
through Port 1 for all external programs. Memory address
transfers are valid at the trailing edge of /AS. Under
program control, /AS is placed in the high-impedance
state along with Ports 0 and 1, Data Strobe, and Read/
Write.
XTAL1, XTAL2
output, respectively). These pins connect a parallel-resonant crystal, ceramic resonator, LC, or any external singlephase clock to the on-chip oscillator and buffer.
R//W (output, write Low). The Read/Write signal is Low
when the MCU is writing to the external program or data
memory.
Crystal 1, Crystal 2
(time-based input and
On the fifth clock after the /RESET is detected, an internal
RST signal is latched and held for an internal register count
of 18 external clocks, or for the duration of the external
/RESET, whichever is longer. During the reset cycle, /DS is
held active Low while /AS cycles at a rate of TpC2. When
/RESET is deactivated, program execution begins at location 000C (HEX). Power-up reset time must be held Low for
50 ms, or until VCC is stable, whichever is longer.
Port 0 (P07-P00). Port 0 is an 8-bit, nibble programmable,
bidirectional, TTL compatible port. These eight I/O lines
can be configured under software control as a nibble I/O
port, or as an address port for interfacing external memory.
When used as an I/O port, Port 0 may be placed under
handshake control. In this configuration, Port 3, lines P32
and P35 are used as the handshake control /DAV0 and
RDY0 (Data Available and Ready). Handshake signal
assignment is dictated by the I/O direction of the upper
nibble P07-P04. The lower nibble must have the same
direction as the upper nibble to be under handshake
control.
For external memory references, Port 0 can provide address bits A11-A8 (lower nibble) or A15-A8 (lower and
upper nibble) depending on the required address space.
If the address range requires 12 bits or less, the upper
nibble of Port 0 is programmed independently as I/O while
the lower nibble is used for addressing. If one or both
nibbles are needed for I/O operation, they must be configured by writing to the Port 0 Mode register.
/RESET (input, active Low). To avoid asynchronous and
noisy reset problems, the Z86C21 is equipped with a reset
filter of four external clocks (4TpC). If the external /RESET
signal is less than 4TpC in duration, no reset occurs.
In ROMless mode, after a hardware reset, Port 0 lines are
defined as address lines A15-A8, and extended timing is
set to accommodate slow memory access. The initialization routine includes reconfiguration to eliminate this extended timing mode (Figure 5).
\6
Z86C21 MCU
WITH 8K ROM
4
Port 0 (I/O)
OEN
Out
In
Z86C21
MCU
TTL Level Shifter
4
Handshake Controls
/DAV0 and RDY0
(P32 and P35)
PAD
R ≈ 500 KΩ
Figure 5. Port 0 Configuration
Auto Latch
7
PIN FUNCTIONS (Continued)
Z86C21 MCU
WITH 8K ROM
Port 1 (P17-P10). Port 1 is an 8-bit, byte programmable,
bidirectional, TTL compatible port. It has multiplexed Address (A7-A0) and Data (D7-D0) ports. For Z86C21, these
eight I/O lines can be programmed as Input or Output lines
or can be configured under software control as an address/data port for interfacing external memory. When
used as an I/O port, Port 1 can be placed under handshake
control. In this configuration, Port 3 line P33 and P34 are
used as the handshake controls RDY1 and /DAV1.
Memory locations greater than 8192 are referenced through
Port 1. To interface external memory, Port 1 is programmed
8
Z86C21
MCU
for the multiplexed Address/Data mode. If more than 256
external locations are required, Port 0 must output the
additional lines.
Port 1 can be placed in a high-impedance state along with
Port 0, /AS, /DS and R//W, allowing the MCU to share
common resource in multiprocessor and DMA applications. Data transfers are controlled by assigning P33 as a
Bus Acknowledge input, and P34 as a Bus request output
(Figure 6).
Port 1
(AD7-AD0)
Handshake Controls
/DAV1 and RDY1
(P33 and P34)
OEN
Out
In
PAD
TTL Level Shifter
Auto Latch
R ≈ 500 KΩ
Figure 6. Port 1 Configuration
\8
Z86C21 MCU
WITH 8K ROM
Port 2 (P27-P20). Port 2 is an 8-bit, bit programmable,
bidirectional, CMOS compatible port. Each of these eight
I/O lines can be independently programmed as an input or
output or globally as an open-drain output. Port 2 is always
available for I/O operation. When used as an I/O port,
Port 2 may be placed under handshake control. In this
Z86C21
MCU
Open-Drain
configuration, Port 3 lines P31 and P36 are used as the
handshake control lines /DAV2 and RDY2. The handshake
signal assignment for Port 3 lines P31 and P36 is dictated
by the direction (input or output) assigned to P27
(Figure 7).
Port 2 (I/O)
Handshake Controls
/DAV2 and RDY2
(P31 and P36)
OEN
Out
In
PAD
TTL Level Shifter
Auto Latch
R ≈ 500 KΩ
Figure 7. Port 2 Configuration
9
PIN FUNCTIONS (Continued)
Z86C21 MCU
WITH 8K ROM
Port 3 (P37-P30). Port 3 is an 8-bit, CMOS compatible four-
fixed-input and four-fixed-output port. These eight I/O lines
have four-fixed input (P33-P30) and four fixed output
(P37-P34) ports. Port 3, when used as serial I/O, is programmed as serial in and serial out, respectively (Figure 8
and Table 4) Port 3 pins have Auto Latches only.
Port 3 is configured under software control to provide the
following control functions: handshake for Ports 0 and 2
(/DAV and RDY); four external interrupt request signals
(IRQ3-IRQ0); timer input and output signals (TIN and T
OUT
and Data Memory Select (/DM).
UART Operation. Port 3 lines P30 and P37, are be programmed as serial I/O lines for full-duplex serial asynchro-
Z86C21
MCU
nous receiver/transmitter operation. The bit rate is controlled by the Counter/Timer0.
The Z86C21 automatically adds a start bit and two stop bits
to transmitted data (Figure 9). Odd parity is also available
as an option. Eight data bits are always transmitted,
regardless of parity selection. If parity is enabled, the
eighth bit is the odd parity bit. An interrupt request (IRQ4)
is generated on all transmitted characters.
),
Received data must have a start bit, eight data bits and at
least one stop bit. If parity is on, bit 7 of the received data
is replaced by a parity error flag. Received characters
generate the IRQ3 interrupt request.
Port 3
(I/O or Control)
\10
In
Out
Port 3 Output Configuration
R ≈ 500 KΩ
Port 3 Input Configuration
Figure 8. Port 3 Configuration
PAD
PAD
Auto Latch
Z86C21 MCU
WITH 8K ROM
Table 4. Port 3 Pin Assignments
PinI/OCTC1Int.P0 HSP1 HSP2 HSUARTExt
P30INIRQ3Serial In
P31INT
IN
IRQ2D/R
P32INIRQ0D/R
P33INIRQ1D/R
P34OUTR/DDM
P35OUTR/D
P36OUTT
OUT
R/D
P37OUTSerial Out
T0IRQ4
T1IRQ5
Notes:
HS = Handshake Signals; D = Data Available; R = Ready
Auto Latch. The Auto Latch puts valid CMOS levels on all
CMOS inputs that are not externally driven. This reduces
excessive supply current flow in the input buffer when it is
not been driven by any source.
Low EMI Option. The Z86C21 is available in a Low EMI
option. This option is mask-programmable, to be selected
by the customer at the time when the ROM code is
submitted. Use of this feature results in:
Transmitted Data (No Parity)
SP SPST
Transmitted Data (With Parity)
SP SPST
D7 D6 D5 D4 D3 D2 D1 D0
Start Bit
Eight Data Bits
Two Stop Bits
P D6D5D4D3D2D1D0
Start Bit
Seven Data Bits
Odd Parity
Two Stop Bits
■The pre-drivers slew rate reduced to 10 ns typical.
■Low EMI output drivers have resistance of 200 Ohms
typical.
■Oscillator divide-by-two circuitry is eliminated.
■Internal SCLK/TCLK operation is limited to a maximum
of 4 MHz (250 ns cycle time)
Received Data (No Parity)
D7 D6 D5 D4 D3 D2 D1 D0
SPST
Start Bit
Eight Data Bits
One Stop Bit
Received Data (With Parity)
PD6D5D4D3D2D1D0
STSP
Start Bit
Seven Data Bits
Parity Error Flag
One Stop Bit
Figure 9. Serial Data Formats
11
Loading...
+ 24 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.