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
FUNCTIONAL DESCRIPTION
Address Space
Z86C21 MCU
WITH 8K ROM
Program Memory. The Z86C21 can address up to 56K
bytes of external program memory (Figure 10). The first 12
bytes of program memory are reserved for the interrupt
vectors. These locations contain six 16-bit vectors that
correspond to the six available interrupts. For ROM mode,
byte 13 to byte 8191 consists of on-chip ROM. At addresses 8192 and greater, the Z86C21 executes external
program memory fetches. In the ROMless mode, the
Z86C21 can address up to 64K bytes of external program
memory. Program execution begins at external location
000C (HEX) after a reset.
Location of
First Byte of
Instruction
Executed
After RESET
65535
8192
8191
12
11
10
9
External
ROM and RAM
On-Chip ROM
IRQ5
IRQ5
IRQ4
Data Memory (/DM). The ROM version can address up to
56K bytes of external data memory space beginning at
location 8192. The ROMless version can address up to
64K bytes of external data memory. External data memory
can be included with, or separated from, the external
program memory space. /DM, an optional I/O function that
can be programmed to appear on P34, is used to distinguish between data and program memory space (Figure
11). The state of the /DM signal is controlled by the type
instruction being executed. An LDC opcode references
PROGRAM (/DM inactive) memory, and an LDE instruction
references DATA (/DM active Low) memory.
65535
External
Data
Memory
Interrupt
Vector
(Lower Byte)
Interrupt
Vector
(Upper Byte)
8
7
6
5
4
3
2
1
0
IRQ4
IRQ3
IRQ3
IRQ2
IRQ2
IRQ1
IRQ1
IRQ0
IRQ0
Figure 10. Program Memory Configuration
8192
8191
Not Addressable
0
Figure 11. Data Memory Configuration
\12
Z86C21 MCU
WITH 8K ROM
Register File. The Register File consists of four I/O port
registers, 236 general-purpose registers and 16 control
and status registers (Figure 12). The instructions can
access registers directly or indirectly through an 8-bit
address field. The Z86C21 also allows short 4-bit register
addressing using the Register Pointer (Figure 13). In the
4-bit mode, the Register File is divided into 16 working
register groups, each occupying 16 continuous locations.
The Register Pointer addresses the starting location of the
active working-register group. For the reset and power-up
conditions of the Register File, see Figure 14.
Note: Register Bank E0-EF can only be accessed through
working registers and indirect addressing modes.
r7 r6 r5 r4R253
The upper nibble of the register file address
provided by the register pointer specifies
the active working-register group.
FF
F0
•
•
•
•
•
•
•
•
•
•
•
2F
20
1F
10
0F
00
Register Group F
Specified Working
Register Group
Register Group 1
Register Group 0
•
•
•
I/O Ports
r3 r2 r1 r0
(Register Pointer)
R15 to R0
The lower nibble
of the register
file address
provided by the
instruction points
to the specified
register.
R15 to R0
R15 to R4
R3 to R0
Figure 13. Register Pointer
Figure 12. Register File
13
FUNCTIONAL DESCRIPTION (Continued)
Z86C21 MCU
WITH 8K ROM
Working Register
Group Pointer
%FF
%F0
%7F
%0F
%00
Notes:
1. General-purpose registers are not reset
after Stop-Mode Recovery or after a Reset.
2. General-purpose registers are undefined
after Power-up.
U = Unknown
† = For ROMless (Z86C91) reset condition = 10110110
P0
1111UUUU
UUUUUUUU
UUUUUUUU
UUUUUUUU
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
U
0
0
0
0
U
U
U
U
1
0
1
1
0
0
0
0
1
1
1
1
0
U
U
U
U
U
U
U
0
0
U
U
U
U
U
U
0
0
0
0
Figure 14. RAM Register File Reset Condition
RAM Protect. The upper portion of the RAM’s address
spaces 80FH to EFH (excluding the control registers) can
be protected from reading and writing. The RAM Protect bit
option is mask-programmable and is selected by the
customer when the ROM code is submitted. After the mask
option is selected, the user activates from the internal ROM
code to turn off/on the RAM Protect by loading a bit D6 in
the IMR register to either a 0 or a 1, respectively. A 1 in D6
indicates RAM Protect enabled.
ROM Protect. The first 8 Kbytes of program memory is
mask programmable. A ROM protect feature prevents
dumping of the ROM contents by inhibiting execution of
LDC, LDCI, LDE, and LDEI instructions to Program Memory
in all modes.
\14
The ROM Protect option is mask-programmable, to be
selected by the customer at the time when the ROM code
is submitted.
Note: With RAM/ROM protect on, the Z86C21 cannot
access the memory space.
Stack. The Z86C21 has a 16-bit Stack Pointer (R254R255) used for external stack that resides anywhere in the
data memory for the ROMless mode, but only from 8192
to 65535 in the ROM mode. An 8-bit Stack Pointer (R255)
is used for the internal stack that resides within the 236
general-purpose registers (R4-R239). The high byte of the
Stack Pointer (SPH-Bit 8-15) is used as a general-purpose
register when using internal stack only.
Z86C21 MCU
WITH 8K ROM
Counter/Timers. There are two 8-bit programmable
counter/timers (T0-T1), each driven by its own 6-bit programmable prescaler. The T1 prescaler is driven by internal or external clock sources; however, the T0 prescaler is
driven by the internal clock only (Figure 15).
The 6-bit prescalers divides the input frequency of the
clock source by any integer number from 1 to 64. Each
prescaler drives its counter, which decrements the value
(1 to 256) that has been loaded into the counter. When both
the counter and prescaler reach the end of the count, a
timer interrupt request, IRQ4 (T0) or IRQ5 (T1), is generated.
The counter can be programmed to start, stop, restart to
continue, or restart from the initial value. The counters can
WriteWriteRead
OSCPRE0
Initial Value
Register
also be programmed to stop upon reaching zero (single
pass mode) or to automatically reload the initial value and
continue counting (modulo-n continuous mode).
The counter, but not the prescalers, can be read at any
time without disturbing their value or count mode. The
clock source for T1 is user-definable and can be either the
internal microprocessor clock divided by four, or an external signal input through Port 3. The Timer Mode register
configures the external timer input (P31) as an external
clock, a trigger input that is retriggerable or nonretriggerable, or as a gate input for the internal clock. Port
3, line P36, also serves as a timer output (T
) through
OUT
which T0, T1 or the internal clock is output. The counter/
timers are cascaded by connecting the T0 output to the
input of T1.
Internal Data Bus
T0
Initial Value
Register
T0
Current Value
Register
÷2
Clock
Logic
TIN P31
Internal
Clock
External Clock
÷4
Internal Clock
Gated Clock
Triggered Clock
6-Bit
÷4
WriteWriteRead
Down
Counter
6-Bit
Down
Counter
PRE1
Initial Value
Register
8-bit
Down
Counter
8-Bit
Down
Counter
T1
Initial Value
Register
Internal Data Bus
÷2
T1
Current Value
Register
IRQ4
Serial I/O
Clock
Tout
P36
IRQ5
Figure 15. Counter/Timers Block Diagram
15
FUNCTIONAL DESCRIPTION (Continued)
Z86C21 MCU
WITH 8K ROM
Interrupts. The Z86C21 has six different interrupts from
eight different sources. The interrupts are maskable and
prioritized. The eight sources are divided as follow: four
sources are claimed by Port 3, lines P33-P30; one in Serial
Out, one in Serial In, and two in the counter/timers (Figure
16). The Interrupt Mask Register globally or individually
enables or disables the six interrupt requests. When more
than one interrupt is pending, priorities are resolved by a
programmable priority encoder that is controlled by the
Interrupt Priority register. (Refer to Table 4.)
All Z86C21 interrupts are vectored through locations in the
program memory. When an interrupt machine cycle is
activated, an interrupt request is granted. Thus, this disables all of the subsequent interrupts, save the Program
Counter and Status Flags, and then branches to the
program memory vector location reserved for that interrupt. This memory location and the next byte contain the
16-bit address of the interrupt service routine for that
particular interrupt request.
To accommodate polled interrupt systems, interrupt inputs are masked and the Interrupt Request register is
polled to determine which of the interrupt requests need
service. Software initialed interrupts are supported by
setting the appropriate bit in the Interrupt Request Register
(IRQ).
Internal interrupt requests are sampled on the falling edge
of the last cycle of every instruction, and the interrupt
request must be valid 5TpC before the falling edge of the
last clock cycle of the currently executing instruction.
For the ROMless mode, when the device samples a valid
interrupt request, the next 48 (external) clock cycles are
used to prioritize the interrupt, and push the two PC bytes
and the FLAG register on the stack. The following nine
cycles are used to fetch the interrupt vector from external
memory. The first byte of the interrupt service routine is
fetched beginning on the 58th TpC cycle following the
internal sample point, which corresponds to the 63rd TpC
cycle following the external interrupt sample point.
IRQ0 - IRQ5
Interrupt
Request
IRQ
IMR
Global
Interrupt
Enable
IPR
PRIORITY
LOGIC
Vector Select
Figure 16. Interrupt Block Diagram
6
\16
Z86C21 MCU
WITH 8K ROM
Clock. The Z86C21 on-chip oscillator has a high-gain,
parallel-resonant amplifier for connection to a crystal, LC,
ceramic resonator, or any suitable external clock source
(XTAL1 = Input, XTAL2 = Output). The crystal should be AT
cut, 1 MHz to 16 MHz max, and series resistance (RS) is
less than or equal to 100 Ohms. The crystal should be
connected across XTAL1 and XTAL2 using the recom-
XTAL1
C1
Pin 11
XTAL2
C2
Pin 11
Ceramic Resonator
or Crystal
C1
Pin 11
C2
LC Clock
Figure 17. Oscillator Configuration
mended capacitors (10 pF < CL < 300 pF) from each pin
11, ground instead of just system ground. This prevents
noise injection into the clock input (Figure 17).
Note: Actual capacitor value is specified by the crystal
manufacturer.
XTAL1
L
XTAL2
Pin 11
External Clock
XTAL1
XTAL2
HALT. Turns off the internal CPU clock but not the XTAL
oscillation. The counter/timers and the external interrupts
IRQ0, IRQ1, IRQ2, and IRQ3 remain active. The device
is recovered by interrupts, either externally or internally
generated. An interrupt request must be executed (enabled) to exit HALT mode. After the interrupt service
routine, the program continues from the instruction after
the HALT.
STOP. This instruction turns off the internal clock and
external crystal oscillation and reduces the standby current to 5 µA (typical) or less. The STOP mode is terminated
by a reset which causes the processor to restart the
application program at address 000C (HEX).
In order to enter STOP (or HALT) mode, it is necessary to
first flush the instruction pipeline to avoid suspending
execution in mid-instruction. To do this, the user must
execute a NOP (opcode=0FFH) immediately before the
appropriate sleep instruction. i.e.,
FF NOP; clear the pipeline
6F STOP; enter STOP mode
or
FF NOP; clear the pipeline
7F HALT; enter HALT mode
17
ABSOLUTE MAXIMUM RATINGS
Z86C21 MCU
WITH 8K ROM
Symbol DescriptionMinMaxUnits
V
CC
T
STG
T
A
Notes:
* Voltages on all pins with respect to GND.
† See Ordering Information
The characteristics listed below apply for standard test
conditions as noted. All voltages are referenced to GND.
Positive current flows into the referenced pin (Figure 18).
Stresses greater than those listed under Absolute Maximum Ratings may cause permanent damage to the device. This is a stress rating only; operation of the device at
any condition above those indicated in the operational
sections of these specifications is not implied. Exposure to
absolute maximum rating conditions for an extended period may affect device reliability.
+5V
2.1 KΩ
From Output
Under Test
150 pF
9.1 kΩ
Figure 18. Test Load Diagram
\18
DC CHARACTERISTICS
TA = 0°C TA = –40°C
to +70°C to +105°CTypical
Sym ParameterMinMaxMinMax@ 25°CUnitsConditions
Max Input Voltage77VIIN < 250 µA
V
Clock Input High Voltage3.8V
CH
V
Clock Input Low Voltage–0.30.8–0.30.8VDriven by External Clock Generator
CL
V
Input High Voltage2V
IH
V
Input Low Voltage–0.30.8–0.30.8V
IL
V
Output High Voltage2.42.4VIOH = –2.0 mA
OH
V
Output High VoltageV
OH
V
Output Low Voltage0.40.4VIOL = +5.0 mA
OL
V
Reset Input High Voltage3.8VCC+0.33.8V
RH
V
Reset Input Low Voltage–0.30.8–0.30.8V
Rl
I
Input Leakage–22–22µAVIN = 0V, V
IL
I
Output Leakage–22–22µAVIN = 0V, V
OL
I
Reset Input Current–80–80µAVRL = 0V
IR
I
Supply Current303020mA[1] @ 12 MHz
CC
–100 mVV
CC
+0.33.8VCC+0.3VDriven by External Clock Generator
CC
+0.32.0V
CC
–100 mVVIOH = –100 µA
CC
+0.3V
CC
+0.3V
CC
CC
CC
353524mA[1] @ 16 MHz
Z86C21 MCU
WITH 8K ROM
I
Standby Current6.56.54mA[1] HALT mode VIN = OV, VCC@ 12 MHz
CC1
I
Standby Current10201µA[1] STOP mode VIN = OV, V
CC2
I
Auto Latch Low Current–1010–14145µA
ALL
Note:
[1] All inputs driven to either 0V or VCC, outputs floating.
774.5mA[1] HALT mode V
= OV, VCC@ 16 MHz
IN
CC
19
AC CHARACTERISTICS
External I/O or Memory Read or Write Timing Diagram
R//W
Z86C21 MCU
WITH 8K ROM
Port 0, /DM
Port 1
/AS
/DS
(Read)
Port 1
12
16
18
3
13
A7 - A0D7 - D0 IN
1
4
2
811
5
17
6
9
10
D7 - D0 OUTA7 - A0
/DS
(Write)
14
7
17
Figure 19. External I/O or Memory Read/Write Timing
1TdA(AS)Address Valid to /AS Rise Delay35253525ns[2,3]
2TdAS(A)/AS Rise to Address Float Delay45354535ns[2,3]
3TdAS(DR)/AS Rise to Read Data Req’d Valid250180250180ns[1,2,3]
4TwAS/AS Low Width55405540ns[2,3]
5TdAZ(DS)Address Float to /DS Fall0000 ns
6TwDSR/DS (Read) Low Width185135185135ns[1,2,3]
7TwDSW/DS (Write) Low Width1108011080ns[1,2,3]
8TdDSR(DR)/DS Fall to Read Data Req’d Valid1307513075ns[1,2,3]
9ThDR(DS)Read Data to /DS Rise Hold Time0000 ns[2,3]
10TdDS(A)/DS Rise to Address Active Delay65506550ns[2,3]
11TdDS(AS)/DS Rise to /AS Fall Delay45354535ns[2,3]
12TdR/W(AS)R//W Valid to /AS Rise Delay30203325ns[2,3]
13TdDS(R/W)/DS Rise to R//W Not Valid50355035ns[2,3]
14TdDW(DSW) Write Data Valid to /DS Fall (Write) Delay35253525ns[2,3]
15TdDS(DW)/DS Rise to Write Data Not Valid Delay55355535ns[2,3]
16TdA(DR)Address Valid to Read Data Req’d Valid310230310230ns[1,2,3]
17TdAS(DS)/AS Rise to /DS Fall Delay65456545ns[2,3]
18TdDM(AS)/DM Valid to /AS Rise Delay50305030ns[2,3]
Notes:
[1] When using extended memory timing add 2 TpC.
[2] Timing numbers given are for minimum TpC.
[3] See clock cycle dependent characteristics table.
Standard Test Load
All timing references use 2.0V for a logic 1 and 0.8V for a logic 0.
[1] Clock timing references use 3.8V for a logic 1 and 0.8V for a logic 0.
[2] Timing references use 2.0V for a logic 1 and 0.8V for a logic 0.
[3] Interrupt references request through Port 3.
[4] Interrupt request through Port 3 (P33-P31).
[5] Interrupt request through Port 30.
= –40°C to +105°C
A
\22
AC CHARACTERISTICS
Handshake Timing Diagrams
Z86C21 MCU
WITH 8K ROM
(Output)
Data Out
/DAV
(Output)
RDY
(Input)
Data In
/DAV
(Input)
RDY
1
7
Data In Valid
2
3
Delayed DAV
4
Figure 21. Input Handshake Timing
Data Out Valid
89
10
Next Data In Valid
Delayed RDY
Delayed RDY
5
Next Data Out Valid
Delayed DAV
6
11
Figure 22. Output Handshake Timing
AC CHARACTERISTICS
Handshake Timing Table
TA = 0°C to +70°CT
12 MHz16 MHz 12 MHz16 MHzData
NoSymParameterMinMaxMinMaxMinMaxMinMaxDirection
1TsDI(DAV)Data In Setup Time0000 IN
2ThDI(DAV)Data In Hold Time145145145145IN
3TwDAVData Available Width110110110110IN
4TdDAVI(RDY)DAV Fall to RDY Fall Delay115115115115IN
5TdDAVId(RDY)DAV Rise to RDY Rise Delay115115115115IN
6TdRDYO(DAV)RDY Rise to DAV Fall Delay0000 IN
7TdD0(DAV)Data Out to DAV Fall DelayTpCTpCTpCTpCOUT
8TdDAV0(RDY)DAV Fall to RDY Fall Delay0000 OUT
9TdRDY0(DAV)RDY Fall to DAV Rise Delay115115115115OUT
10TwRDYRDY Width110110110110OUT
11TdRDY0d(DAV)RDY Rise to DAV Fall Delay115115115115OUT
1110NENot EqualZ = 0
1001GEGreater Than or Equal(S XOR V) = 0
0001LTLess than(S XOR V) = 1
1010GTGreater Than[Z OR (S XOR V)] = 0
0010LELess Than or Equal[Z OR (S XOR V)] = 1
1111UGEUnsigned Greater Than or EqualC = 0
0111ULTUnsigned Less ThanC = 1
1011UGTUnsigned Greater Than(C = 0 AND Z = 0) = 1
0011ULEUnsigned Less Than or Equal(C OR Z) = 1
0000FNever True (Always False)
JP cc, dstDAcD-----if cc is truec = 0 – F
PC←dstIRR30
JR cc, dstRAcB-----if cc is true,c = 0 – F
PC←PC + dst
Range: +127,
–128
LD dst, srcrImrC-----dst←srcrRr8
Rr r9
r = 0 – F
rX C7
Xr D7
rIr E3
IrrF3
RR E4
RIR E5
RIM E6
IRIME7
IRRF5
LDC dst, srcrIrrC2------
LDCI dst, srcIrIrrC3------
dst←src
r←r +1;
rr←rr + 1
HALT7F------
\30
INSTRUCTION SUMMARY (Continued)
Z86C21 MCU
WITH 8K ROM
Address
InstructionModeOpcodeFlags Affected
and Operationdst srcByte (Hex) C Z S V D H
NOPFF------
OR dst, src†4[ ]-✻✻0- -
dst←dst OR src
POP dstR50-----dst←@SP;IR51
SP←SP + 1
PUSH srcR 70-----SP←SP – 1;IR71
@SP←src
RCFCF0-----
C←0
RETAF-----PC←@SP;
SP←SP + 2
RL dstR90✻✻✻✻--
C70
IR91
RLC dstR10✻✻✻✻--
C70
IR11
Address
InstructionModeOpcodeFlags Affected
and Operationdst srcByte (Hex) C Z S V D H
STOP6F------
SUB dst, src†2[ ]✻✻✻✻1 ✻
dst←dst←src
SWAP dstRF0X✻✻X- -
7430
IRF1
TCM dst, src†6[ ]-✻✻0- -
(NOT dst)
AND src
TM dst, src†7[ ]-✻✻0- -
dst AND src
XOR dst, src†B[ ]-✻✻0- -
dst←dst
XOR src
† These instructions have an identical set of addressing modes, which
are encoded for brevity. The first opcode nibble is found in the instruction
set table above. The second nibble is expressed symbolically by a ‘[ ]’
in this table, and its value is found in the following table to the left of the
applicable addressing mode pair.
RR dstRE0✻✻✻✻--
C70
IRE1
RRC dstRC0✻✻✻✻--
C70
IRC1
SBC dst, src†3[ ]✻✻✻✻1 ✻
dst←dst←src←C
SCFDF1-----
C←1
SRA dstRD0✻✻✻0- -
C70
IRD1
SRP srcIm 31-----RP←src
For example, the opcode of an ADC instruction using the addressing
modes r (destination) and Ir (source) is 13.
Address ModeLower
dstsrcOpcode Nibble
rr[2]
rIr[3]
RR[4]
RIR[5]
RIM[6]
IRIM[7]
31
OPCODE MAP
0123456789ABCDE F
6.5
0
DEC
R1
6.5
1
RLC
R1
6.5
2
INC
R1
8.0
3
JP
IRR1
8.5
4
DA
R1
10.5
5
POP
R1
6.5
6
COM
R1
12/14.1
10/12.1
7
PUSH
R2
10.5
8
DECW
9
A
B
C
D
E
F
RR1
6.5
RL
R1
10.5
INCW
RR1
6.5
CLR
R1
6.5
RRC
R1
6.5
SRA
R1
6.5
RR
R1
8.5
SWAP
R1
Upper Nibble (Hex)
6.5
DEC
IR1
6.5
RLC
IR1
6.5
INC
IR1
6.1
SRP
IM
8.5
DA
IR1
10.5
POP
IR1
6.5
COM
IR1
PUSH
IR2
10.5
DECW
IR1
6.5
RL
IR1
10.5
INCW
IR1
6.5
CLR
IR1
6.5
RRC
IR1
6.5
SRA
IR1
6.5
RR
IR1
8.5
SWAP
IR1
6.5
ADD
r1, r2
6.5
ADC
r1, r2
6.5
SUB
r1, r2
6.5
SBC
r1, r2
6.5
OR
r1, r2
6.5
AND
r1, r2
6.5
TCM
r1, r2
6.5
TM
r1, r2
12.0
LDE
r1, Irr2
12.0
LDE
r2, Irr1
6.5
CP
r1, r2
6.5
XOR
r1, r2
12.0
LDC
r1, Irr2
12.0
LDC
r1, Irr2
6.5
ADD
r1, Ir2
6.5
ADC
r1, Ir2
6.5
SUB
r1, Ir2
6.5
SBC
r1, Ir2
6.5
OR
r1, Ir2
6.5
AND
r1, Ir2
6.5
TCM
r1, Ir2
6.5
TM
r1, Ir2
18.0
LDEI
Ir1, Irr2
18.0
LDEI
Ir2, Irr1
6.5
CP
r1, Ir2
6.5
XOR
r1, Ir2
18.0
LDCI
Ir1, Irr2
18.0
LDCI
Ir1, Irr2
6.5
LD
r1, IR2
6.5
LD
Ir1, r2
10.5
ADD
R2, R1
10.5
ADC
R2, R1
10.5
SUB
R2, R1
10.5
SBC
R2, R1
10.5
OR
R2, R1
10.5
AND
R2, R1
10.5
TCM
R2, R1
10.5
TM
R2, R1
10.5
CP
R2, R1
10.5
XOR
R2, R1
20.0
CALL*
IRR1
10.5
LD
R2, R1
10.5
ADD
IR2, R1
10.5
ADC
IR2, R1
10.5
SUB
IR2, R1
10.5
SBC
IR2, R1
10.5
OR
IR2, R1
10.5
AND
IR2, R1
10.5
TCM
IR2, R1
10.5
TM
IR2, R1
10.5
CP
IR2, R1
10.5
XOR
IR2, R1
10.5
LD
IR2, R1
10.5
LD
R2, IR1
Lower Nibble (Hex)
10.5
10.5
ADD
ADD
IR1, IM
R1, IM
ADC
R1, IM
R1, IM
R1, IM
R1, IM
AND
R1, IM
TCM
R1, IM
R1, IM
R1, IM
R1, IM
CALL
R1, IM
10.5
10.5
SUB
10.5
SBC
10.5
OR
10.5
10.5
10.5
TM
10.5
CP
10.5
XOR
20.0
DA
10.5
LD
10.5
ADC
IR1, IM
10.5
SUB
IR1, IM
10.5
SBC
IR1, IM
10.5
OR
IR1, IM
10.5
AND
IR1, IM
10.5
TCM
IR1, IM
10.5
TM
IR1, IM
10.5
CP
IR1, IM
10.5
XOR
IR1, IM
10.5
LD
r1,x,R2
10.5
LD
r2,x,R1
10.5
LD
IR1, IM
6.5
LD
r1, R2
6.5
LD
r2, R1
12/10.5
DJNZ
r1, RA
12/10.0
JR
cc, RA
6.5
LD
r1, IM
12.10.0
JP
cc, DA
Z86C21 MCU
WITH 8K ROM
6.5
INC
r1
6.0
STOP
7.0
HALT
6.1
DI
6.1
EI
14.0
RET
16.0
IRET
6.5
RCF
6.5
SCF
6.5
CCF
6.0
NOP
\32
23231
Bytes per Instruction
Execution
Upper
Opcode
Nibble
Cycles
A
Lower
Opcode
Nibble
4
10.5
CP
R1, R2
Pipeline
Cycles
Mnemonic
Legend:
R = 8-bit Address
r = 4-bit Address
R1 or r1 = Dst Address
R2 or r2 = Src Address
Sequence:
Opcode, First Operand,
Second Operand
First
Operand
Second
Operand
Note: Blank areas not defined.
*2-byte instruction appears as
a 3-byte instruction
PACKAGE INFORMATION
Z86C21 MCU
WITH 8K ROM
40-Pin PDIP Package Diagram
44-Pin PLCC Package Diagram
33
PACKAGE INFORMATION (Continued)
Z86C21 MCU
WITH 8K ROM
44-Pin QFP Package Diagram
\34
ORDERING INFORMATION
Z86C21
Z86C21 MCU
WITH 8K ROM
12 MHz
40-pin DIP44-pin PLCC44-pin QFP
Z86C2112PSCZ86C2112VSCZ86C2112FSC
16 MHz
40-pin DIP44-pin PLCC44-pin QFP
Z86C2116PSCZ86C2116VSCZ86C2116FSC
Z86C2112PECZ86C2112VECZ86C2112FEC
For fast results, contact your local Zilog Sales Office for assistance in ordering the part desired.
is a Z89C21, 12 MHz, DIP, 0°C to +70°C, Plastic Standard Flow
Environmental Flow
Temperature
Package
Speed
Product Number
Zilog Prefix
Zilog’s products are not authorized for use as critical components in life support devices or systems unless a specific written
agreement pertaining to such intended use is executed between
the customer and Zilog prior to use. Life support devices or
systems are those which are intended for surgical implantation
into the body, or which sustains life whose failure to perform,
when properly used in accordance with instructions for use
provided in the labeling, can be reasonably expected to result in
significant injury to the user.
Zilog, Inc. 210 East Hacienda Ave.
Campbell, CA 95008-6600
Telephone (408) 370-8000
Telex 910-338-7621
FAX 408 370-8056
Internet: http://www.zilog.com
35
Loading...
+ 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.