ZILOG Z86E61

Z86E61/E63 Z8® MCU
16K/32K EPROM
P R E L I M I N A R Y
P RELIMINAR
WITH
YP RODUCT S PECIFICA
TION
Z86E61/E63
CMOS Z8® 16K/32K EPROM
MICROCONTROLLER
FEATURES
■
8-Bit CMOS Microcontroller
■
High Voltage Protection on High Voltage Inputs
■
40-Pin DIP, 44-Pin PLCC Style Packages
■
RAM and EPROM Protect
■
4.5V to 5.5V Operating Range
■
EPROM: 16 Kbytes Z86E61
32 Kbytes Z86E63
■
Clock Speeds: 16 and 20 MHz
■
■
Low Power Consumption: 275 mW (max)
■
Fast Instruction Pointer: 1.0 ms @ 12 MHz
256 Bytes Register File
- 236 Bytes of General-Purpose RAM
- 16 Bytes of Control and Status Registers
- 4 Bytes for Ports
■
Two Standby Modes: STOP and HALT
■
Two Programmable 8-Bit Counter/Timers Each
with 6-Bit Programmable Prescaler
■
32 Input/Output Lines
■
■
Full-Duplex UART
Six Vectored, Priority Interrupts from Eight
Different Sources
■
All Digital Inputs are TTL Levels
■
On-Chip Oscillator that Accepts a Crystal, Ceramic
Resonator, LC, or External Clock Drive
■
Auto Latches
GENERAL DESCRIPTION
The Z86E61/E63 microcontrollers are members of the Z8®
single-chip microcontroller family with 16K/32 Kbytes of
EPROM and 236 bytes of general-purpose RAM. Offered
in 40-pin DIP or 44-pin PLCC package styles, these devices are pin-compatible EPROM versions of the Z86C61/
63. The ROMless pin option is available on the 44-pin
versions only.
For applications demanding powerful I/O capabilities, the
Z86E61/E63 offers 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.
With 4 Kbytes of ROM and 236 bytes of general-purpose
RAM, the Z86E61/E63 offers fast execution, efficient use of
memory, sophisticated interrupts, input/output bit manipulation capabilities, and easy hardware/software system
expansion.
The Z86E61/E63 can address both external memory and
preprogrammed ROM, making it well suited for highvolume applications or where code flexibility is required.
1
Z86E61/E63 Z8® MCU
EPROM
P R E L I M I N A R Y
WITH 16K/32K
GENERAL DESCRIPTION (Continued)
There are three basic address spaces available to support
this configuration: Program Memory, Data Memory, and
236 general-purpose registers.
To unburden the system from coping with real-time tasks
such as counting/timing and serial data communication,
the Z86E61/E63 offers two on-chip counter/timers with a
large number of user selectable modes (Figure 1).
Output Input
Vcc
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:
Connection
Circuit
Device
Power
Ground
VCC
GND
VDD
VSS
GND
XTAL /AS /DS R//W /RESET
Machine Timing and
Instruction Control
Port 3
UART
ALU
Counter/
Timers
(2)
FLAGS
Interrupt
Control
Prg. Memory
16K/32K
Register
Pointer
Register File
256 x 8-Bit
Port 0
Port 2
4
I/O
(Bit Programmable)
Program
Counter
Port 1
4
Address or I/O
(Nibble Programmable)
8
Address/Data or I/O
(Byte Programmable)
Figure 1. Z86E61/E63 Functional Block Diagram
2
Z86E61/E63 Z8® MCU
16K/32K EPROM
P R E L I M I N A R Y
WITH
PIN DESCRIPTION
Standard Mode
Table 1. 40-Pin DIP Pin Identification
VCC
1
40
P36
XTAL2
2
39
P31
XTAL1
3
38
P27
P37
4
37
P26
P30
5
36
P25
/RESET
6
35
P24
R//W
7
34
P23
/DS
8
33
P22
/AS
9
32
P21
P35
10
31
P20
GND
11
30
P33
P32
12
29
P34
P00
13
28
P17
P01
14
27
P16
P02
15
26
P15
P03
16
25
P14
P04
17
24
P13
P05
18
23
P12
P06
19
22
P11
P07
20
21
P10
Z86E61
/E63
DIP
Standard Mode
Pin # Symbol
Function
1
2
3
4
5
VCC
XTAL2
XTAL1
P37
P30
Power Supply
Crystal, Oscillator Clock
Crystal, Oscillator Clock
Port 3, Pin 7
Port 3, Pin 0
Input
Output
Input
Output
Input
6
7
8
9
10
/RESET
R//W
/DS
/AS
P35
Reset
Read/Write
Data Strobe
Address Strobe
Port 3, Pin 5
Input
Output
Output
Output
Output
11
12
13-20
21-28
29
GND
P32
P07-P00
P17-P10
P34
Ground
Input
Port 3, Pin 2
Input
Port 0, Pins 0,1,2,3,4,5,6,7 In/Output
Port 1, Pins 0,1,2,3,4,5,6,7 In/Output
Port 3, Pin 4
Output
30
31-38
39
40
P33
P27-P20
P31
P36
Port 3, Pin 3
Input
Port 2, Pins 0,1,2,3,4,5,6,7 In/Output
Port 3, Pin 1
Input
Port 3, Pin 6
Output
Direction
Figure 2. 40-Pin DIP Pin Configuration
3
Z86E61/E63 Z8® MCU
EPROM
P R E L I M I N A R Y
WITH 16K/32K
VCC
2
1 44 43 42 41 40
P25
XTAL2
3
P26
XTAL1
4
P27
P37
5
P31
P30
6
P36
N/C
PIN DESCRIPTION (Continued)
Standard Mode
/RESET
7
39
NC
R//W
8
38
P24
/DS
9
37
P23
/AS
10
36
P22
P35
11
35
P21
34
P20
33
P33
GND
12
P32
13
P00
Z86E61/E63
PLCC
14
32
P34
P01
15
31
P17
P02
16
30
P16
R//RL
17
29
P15
N/C
P14
P13
P12
P11
P10
P07
P06
P05
P04
P03
18 19 20 21 22 23 24 25 26 27 28
Figure 3. 44-Pin PLCC Pin Configuration
Table 2. 44-Pin PLCC Pin Identification
Standard Mode
Pin #
Symbol
Function
Direction
Standard Mode
Pin #
Symbol
Function
Direction
1
2
3
4
VCC
XTAL2
XTAL1
P37
Power Supply
Crystal, Osc. Clock
Crystal, Osc. Clock
Port 3, Pin 7
Input
Output
Input
Output
14-16
17
18-22
23-27
P02-P00
R//RL
P07-P03
P10-P14
Port 0, Pins 0,1,2
ROM/ROMless control
Port 0, Pins 3,4,5,6,7
Port 1, Pins 0,1,2,3,4
In/Output
Input
In/Output
In/Output
5
6
7
8
P30
N/C
/RESET
R//W
Port 3, Pin 0
Not Connected
Reset
Read/Write
Input
Input
Input
Output
28
29-31
32
33
N/C
P17-P15
P34
P33
Not Connected
Port 1, Pins 5,6,7
Port 3, Pin 4
Port 3, Pin 3
Input
In/Output
Output
Input
9
10
11
12
13
/DS
/AS
P35
GND
P32
Data Strobe
Address Strobe
Port 3, Pin 5
Ground
Port 3, Pin 2
Output
Output
Output
Input
Input
34-38
39
40-42
43
44
P24-P20
N/C
P27-P25
P31
P36
Port 2, Pins 0,1,2,3,4
Not Connected
Port 2, Pins 5,6,7
Port 3, Pin 1
Port 3, Pin 6
In/Output
Input
In/Output
Input
Output
4
Z86E61/E63 Z8® MCU
16K/32K EPROM
P R E L I M I N A R Y
WITH
PIN DESCRIPTION
EPROM Mode
Table 3. 40-Pin DIP Pin Identification
VCC
1
40
N/C
XTAL2
2
39
/OE
XTAL1
3
38
/PGM
N/C
4
37
A14
/CE
5
36
A13
/RESET
6
35
A12
N/C
7
34
A11
N/C
8
33
A10
N/C
9
32
A9
31
A8
30
VPP
N/C
10
Z86E61
/E63
DIP
GND
11
EPM
12
29
N/C
A0
13
28
D7
A1
14
27
D6
A2
15
26
D5
A3
16
25
D4
A4
17
24
D3
A5
18
23
D2
A6
19
22
D1
A7
20
21
D0
EPROM Mode
Pin # Symbol
Function
1
2
3
4
VCC
XTAL2
XTAL1
N/C
Power Supply
Crystal, Osc. Clock
Crystal, Osc. Clock
Not Connected
5
6
7-10
11
/CE
/RESET
N/C
GND
Chip Enable
Reset
Not Connected
Ground
12
13-20
21-28
29
30
EPM
A7-A0
D7-D0
N/C
VPP
EPROM Prog Mode
Address 0,1,2,3,4,5,6,7
Data 0,1,2,3,4,5,6,7
Not Connected
Prog Voltage
31-37
38
39
40
A14-A8
/PGM
/OE
N/C
Address 8,9,10,11,12,13,14
Prog Mode
Output Enable
Not Connected
Direction
Input
Output
Input
Input
Input
Input
Input
Input
Input
Input
In/Output
Input
Input
Input
Input
Input
Input
Figure 4. 40-Pin DIP Pin Configuration
5
Z86E61/E63 Z8® MCU
EPROM
P R E L I M I N A R Y
WITH 16K/32K
XTAL2
VCC
3
2
1 44 43 42 41 40
N/C
A13
XTAL1
4
A14
N/C
5
/PGM
/CE
6
/OE
N/C
PIN DESCRIPTION (Continued)
EPROM Mode
/RESET
7
39
N/C
N/C
8
38
A12
N/C
9
37
A11
N/C
10
36
A10
N/C
11
35
A9
34
A8
33
VPP
Z86E61/E63
PLCC
GND
12
EPM
13
A0
14
32
N/C
A1
15
31
D7
A2
16
30
D6
N/C
17
29
D5
N/C
D4
D3
D2
D1
D0
A7
A6
A5
A4
A3
18 19 20 21 22 23 24 25 26 27 28
Figure 5. 44-Pin PLCC Pin Configuration
Table 4. 44-Pin PLCC Pin Identification
EPROM Mode
Pin #
Symbol
Function
1
2
3
4
VCC
XTAL2
XTAL1
N/C
Power Supply
Crystal, Osc. Clock
Crystal, Osc. Clock
Not Connected
5
6
7
8-11
/CE
N/C
/RESET
N/C
12
13
14-16
17
GND
EPM
A0-A2
N/C
6
EPROM Mode
Pin #
Symbol
Function
Direction
Input
Input
Input
Input
18-22
23-27
28
29-31
A7-A3
D4-D0
N/C
D7-D5
Address 3,4,5,6,7
Data 0,1,2,3,4
Not Connected
Data 5,6,7
Input
In/Output
Input
In/Output
Chip Enable
Not Connected
Reset
Not Connected
Input
Input
Input
Input
32
33
34-38
39
N/C
V PP
A12-A8
N/C
Not Connected
Prog Voltage
Address 8,9,10,11,12
Not Connected
Input
Input
Input
Input
Ground
EPROM Prog Mode
Address 0,1,2
Not Connected
Input
Input
Input
Input
40-41
42
43
44
A13-A14
/PGM
/OE
N/C
Address 13, 14
Prog Mode
Output Enable
Not Connected
Input
Input
Input
Input
Direction
P R E L I M I N A R Y
Z86E61/E63 Z8® MCU
16K/32K EPROM
WITH
PIN FUNCTIONS
ROMless (input, active Low). Connecting this pin to GND
disables the internal ROM and forces the device to function as a Z86C91 ROMless Z8 (see the Z86C91 product
specification for more information). When left unconnected
or pulled High to VCC, the device functions as a normal
Z86E61/E63 EPROM version. Note: This pin is only available on the 44-pin versions of the Z86E61/E63.
/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 can be placed in the highimpedance state along with Ports 0 and 1, Data Strobe,
and Read/Write.
XTAL2, XTAL1 Crystal 2, Crystal 1 (time-based input and
output, respectively). These pins connect a parallelresonant crystal, ceramic resonator, LC, or any external
single-phase 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.
/RESET (input, active Low). To avoid asynchronous and
noisy reset problems, the Z86E61/E63 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.
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 TpC/2. 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 nibbles) depending on the required address space.
If the address range requires 12 bits or less, the upper
nibble of Port 0 can be 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.
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 can include reconfiguration to eliminate this
extended timing mode (Figure 8).
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 Z86E61/E63,
these eight I/O lines can be programmed as input or output
lines or are 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 lines, P33 and P34, are
used as the handshake controls RDY1 and /DAV1.
Memory locations greater than 16384 (E61) or 32768 (E63)
are referenced through Port 1. To interface external memory,
Port 1 must be programmed 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 high-impedance state along with
Port 0, /AS, /DS, and R//W, allowing the MCU to share
common resources 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 9).
7
Z86E61/E63 Z8® MCU
EPROM
P R E L I M I N A R Y
WITH 16K/32K
PIN FUNCTIONS (Continued)
4
Port 0 (I/O)
Z86E61
/E63
MCU
4
Handshake Controls
/DAV0 and RDY0
(P32 and P35)
OEN
PAD
Out
TTL Level Shifter
In
Auto Latch
R ≈ 500 kΩ
Figure 6. Port 0 Configuration
8
Z86E61/E63 Z8® MCU
16K/32K EPROM
P R E L I M I N A R Y
8
WITH
Port 1
(AD7-AD0)
Z86E61
/E63
MCU
Handshake Controls
/DAV1 and RDY1
(P33 and P34)
OEN
PAD
Out
TTL Level Shifter
In
Auto Latch
R ≈ 500 kΩ
Figure 7. Port 1 Configuration
9
Z86E61/E63 Z8® MCU
EPROM
P R E L I M I N A R Y
WITH 16K/32K
PIN FUNCTIONS (Continued)
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 can be placed under handshake control. In this
Z86E61
/E63
MCU
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 8 and Table 5).
Port 2 (I/O)
Handshake Controls
/DAV2 and RDY2
(P31 and P36)
Open-Drain
OEN
PAD
Out
TTL Level Shifter
In
Auto Latch
R ≈ 500 kΩ
Figure 8. Port 2 Configuration
10
Z86E61/E63 Z8® MCU
16K/32K EPROM
P R E L I M I N A R Y
Port 3 (P37-P30). Port 3 is an 8-bit, CMOS compatible fourfixed input and four-fixed output port. These eight I/O lines
have four-fixed (P33-P30) input and four-fixed (P37-P34)
Z86E61
/E63
MCU
WITH
output ports. Port 3, when used as serial I/O, is programmed as serial in and serial out, respectively
(Figure 9).
Port 3
(I/O or Control)
Figure 9. Port 3 Configuration
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 TOUT),
Data Memory Select (/DM) and EPROM control signals
(P30 = /CE, P31 = /OE, P32 = EPM and P33 = VPP ).
Table 5. Port 3 Pin Assignments
Pin
I/O
CTC1
Int.
P30
P31
P32
P33
IN
IN
IN
IN
TIN
IRQ3
IRQ2
IRQ0
IRQ1
P34
P35
P36
P37
T0
T1
OUT
OUT
OUT
OUT
P0 HS
P1 HS
P2 HS
UART
Ext
Serial In
/CE
/OE
EPM
VPP
D/R
D/R
D/R
R/D
EPROM
DM
R/D
TOUT
R/D
Serial Out
IRQ4
IRQ5
Notes:
HS = Handshake Signals
D = Data Available
R = Ready
11
P R E L I M I N A R Y
Z86E61/E63 Z8® MCU
EPROM
WITH 16K/32K
UART OPERATION
Port 3 lines, P37 and P30, are programmed as serial I/O
lines for full-duplex serial asynchronous receiver/transmitter operation. The bit rate is controlled by Counter/
Timer0.
ted, 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.
The Z86E61/E63 automatically adds a start bit and two
stop bits to transmitted data (Figure 10). Odd parity is also
available as an option. Eight data bits are always transmit-
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.
Transmitted Data (No Parity)
Received Data (No Parity)
SP D7 D6 D5 D4 D3 D2 D1 D0 ST
SP SP D7 D6 D5 D4 D3 D2 D1 D0 ST
Start Bit
Start Bit
Eight Data Bits
Eight Data Bits
Two Stop Bits
One Stop Bit
Transmitted Data (With Parity)
SP SP
P
Received Data (With Parity)
D6 D5 D4 D3 D2 D1 D0 ST
SP
P
D6 D5 D4 D3 D2 D1 D0 ST
Start Bit
Start Bit
Seven Data Bits
Seven Data Bits
Odd Parity
Parity Error Flag
Two Stop Bits
One Stop Bit
Figure 10. Serial Data Formats
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 driven by any source.
Note: P33-P30 inputs differ from the Z86C61/C63 in that
there is no clamping diode to VCC because of the EPROM
high voltage detection circuits. Exceeding the VIH maximum specification during standard operating mode may
cause the device to enter EPROM mode
ADDRESS SPACE
Program Memory. The Z86E61/E63 can address 48
Kbytes (E61) or 32 Kbytes (E63) of external program
memory (Figure 11). 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 EPROM mode, byte 13 to byte
12
16383 (E61) or 32767 (E63) consists of on-chip EPROM. At
addresses 16384 (E61) or 32768 (E63) and above, the
Z86E61/E63 executes external program memory fetches.
In ROMless mode, the Z86E61/E63 can address up to 64
Kbytes of program memory. Program execution begins at
external location 000C (HEX) after a reset.
Z86E61/E63 Z8® MCU
16K/32K EPROM
P R E L I M I N A R Y
65535
16384 (E61)
32768 (E63)
16383 (E61)
32767 (E63)
Location of
First Byte of
Instruction
Executed
After RESET
Interrupt
Vector
(Lower Byte)
Interrupt
Vector
(Upper Byte)
External
ROM and RAM
On-Chip PROM
12
11
IRQ5
10
IRQ5
9
IRQ4
8
IRQ4
7
IRQ3
6
IRQ3
5
IRQ2
4
IRQ2
3
IRQ1
2
IRQ1
1
IRQ0
0
IRQ0
WITH
access registers directly or indirectly through an 8-bit
address field. The Z86E61/E63 also allows short 4-bit
register addressing using the Register Pointer (Figure 14).
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.
Stack. The Z86E61/E63 has a 16-bit Stack Pointer (R255R254) used for external stacks that reside anywhere in the
data memory for the ROMless mode, but only from 16384
(E61) or 32768 (E63) to 65535 in the EPROM mode. An
8-bit Stack Pointer (R255) is used for the internal stack that
resides within the 236 general-purpose registers (R239R4). The high byte of the Stack Pointer (SPH Bits 15-8) can
be use as a general purpose register when using internal
stack only.
65535
External
Data
Memory
Figure 11. Program Memory Configuration
Data Memory (/DM). The EPROM version can address up
to 48 Kbytes (E61) or 32 Kbytes (E63) of external data
memory space beginning at location 16384 (E61) or 32768
(E63). The ROMless version can address up to 64 Kbytes
of external data memory. External data memory may be
included with, or separated from, the external program
memory space. /DM, an optional I/O function that can be
programmed to appear on pin P34, is used to distinguish
between data and program memory space (Figure 12).
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.
Register File. The register file consists of four I/O port
registers, 236 general-purpose registers, and 16 control
and status registers (Figure 13). The instructions can
32768 (E63)
16384 (E61)
16383 (E61)
32767 (E63)
Not Addressable
0
Figure 12. Data Memory Configuration
13
Z86E61/E63 Z8® MCU
EPROM
P R E L I M I N A R Y
WITH 16K/32K
ADDRESS SPACE (Continued)
LOCATION
IDENTIFIERS
R255
Stack Pointer (Bits 7-0)
SPL
R254
Stack Pointer (Bits 15-8)
SPH
R253
Register Pointer
R252
Program Control Flags
FLAGS
R251
Interrupt Mask Register
IMR
R250
Interrupt Request Register
IRQ
r7 r6
RP
r5 r4
r3 r2
r1 r0
R253
(Register Pointer)
The upper nibble of the register file address
provided by the register pointer specifies
the active working-register group.
FF
Register Group F
R15 to R0
F0
IPR
R249
Interrupt Priority Register
R248
Ports 0-1 Mode
P01M
R247
Port 3 Mode
P3M
R246
Port 2 Mode
P2M
R245
T0 Prescaler
PRE0
R244
Timer/Counter0
R243
T1 Prescaler
R242
Timer/Counter1
R241
Timer Mode
TMR
2F
R240
Serial I/O
SIO
20
1F
T0
PRE1
T1
R239
•
•
•
•
•
•
•
•
•
•
•
•
•
•
10
0F
General-Purpose
Registers
Specified Working
Register Group
Register Group 1
R15 to R0
Register Group 0
R15 to R4
I/O Ports
00
R4
R3
Port 3
P3
R2
Port 2
P2
R1
Port 1
P1
R0
Port 0
P0
Figure 13. Register File
14
The lower nibble
of the register
file address
provided by the
instruction points
to the specified
register.
Figure 14. Register Pointer
R3 to R0
Z86E61/E63 Z8® MCU
16K/32K EPROM
P R E L I M I N A R Y
WITH
FUNCTIONAL DESCRIPTION
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 can divide 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 counters and prescalers reach the end of the count,
a timer interrupt request, IRQ4 (T0) or IRQ5 (T1), is
generated.
The counter is programmed to start, stop, restart to continue, or restart from the initial value. The counters can 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, are read at any time
without disturbing their value or count mode. The clock
source for T1 is user-definable and is 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 can be retriggerable or non-retriggerable,
or as a gate input for the internal clock. Port 3 line P36 also
serves as a timer output (TOUT) through which T0, T1, or the
internal clock can be output. The counter/timers are cascaded by connecting the T0 output to the input of T1.
Internal Data Bus
Write
OSC
Write
Read
PRE0
Initial Value
Register
T0
Initial Value
Register
6-Bit
Down
Counter
8-bit
Down
Counter
T0
Current Value
Register
÷2
÷4
Internal
Clock
IRQ4
Serial I/O
Clock
÷2
External Clock
TOUT
P36
Clock
Logic
÷4
Internal Clock
Gated Clock
Triggered Clock
Tin P31
Write
6-Bit
Down
Counter
8-Bit
Down
Counter
PRE1
Initial Value
Register
T1
Initial Value
Register
Write
IRQ5
T1
Current Value
Register
Read
Internal Data Bus
Figure 15. Counter/Timers Block Diagram
15
Z86E61/E63 Z8® MCU
EPROM
P R E L I M I N A R Y
WITH 16K/32K
FUNCTIONAL DESCRIPTION (Continued)
Interrupts. The Z86E61/E63 has six different interrupts
from eight different sources. The interrupts are maskable
and prioritized. The eight sources are divided as follows:
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 5).
All Z86E61/E63 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, saves 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 initialized 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
IRQ
IMR
6
Global
Interrupt
Enable
Interrupt
Request
IPR
PRIORITY
LOGIC
Vector Select
Figure 16. Interrupt Block Diagram
16
Z86E61/E63 Z8® MCU
16K/32K EPROM
P R E L I M I N A R Y
Clock. The Z86E61/E63 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; series resistance
(RS) is less than or equal to 100 Ohms. The crystal should
be connected across XTAL1 and XTAL2 using the recommended capacitors (10 pF < CL < 100 pF) from each pin
to ground (Figure 17). Note: Actual capacitor value specified by crystal manufacturer.
XTAL1
C1
C1
Pin 11
Pin 11
XTAL1
XTAL1
XTAL2
XTAL2
L
XTAL2
C2
WITH
C2
Pin 11
Ceramic Resonator
or Crystal
Pin 11
External Clock
LC Clock
Figure 17. Oscillator Configuration
HALT. Turns off the internal CPU clock but not the XTAL
oscillation. The counter/timers and external interrupts IRQ0,
IRQ1, IRQ2, and IRQ3 remain active. The devices are
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 = OFFH) immediately before the
appropriate SLEEP instruction. i.e.,
FF NOP
6F STOP
or
FF NOP
7F HALT
; clear the pipeline
; enter STOP mode
; clear the pipeline
; enter HALT mode
PROGRAMMING
Z86E61/E63 User Modes
The Z86E61/E63 uses separate AC timing cycles for the
different User Modes available. Table 6 shows the Z86E61/
E63 User Modes. Table 7 shows the timing of the programming waveforms.
User MODE 1 EPROM Read
The Z86E61/E63 EPROM read cycle is provided so that the
user may read the Z86E61/E63 as a standard 27128 (E61)
or 27256 (E63) EPROM. This is accomplished by driving
the /EPM pin (P32) to VH and activating /CE and /OE. /PGM
remains inactive. This mode is not valid after execution of
an EPROM protect cycle. Timing for the EPROM read cycle
is shown in Figure 18.
User MODE 2 EPROM Program
The Z86E61/E63 Program function conforms to the Intelligent programming algorithm. The device is programmed
with VCC at 6.0V and VPP = 12.5V. Programming pulses are
applied in 1 ms increments to a maximum of 25 pulses
before proper verification. After verification, a programming pulse of three times the duration of the cycles
necessary to program the device is issued to ensure
proper programming. After all addresses are programmed,
a final data comparison is executed and the programming
cycle is complete. Timing for the Z86E61/E63 programming cycle is shown in Figure 18.
17
Z86E61/E63 Z8® MCU
EPROM
P R E L I M I N A R Y
WITH 16K/32K
PROGRAMMING (Continued)
User Mode 3: PROM Verify
The Program Verify cycle is used as part of the intelligent
programming algorithm to insure data integrity under
worst-case conditions. It differs from the EPROM Read
cycle in that VPP is active and VCC must be driven to 6.0V.
Timing is shown in Figure 18.
User Modes 4 and 5: EPROM and RAM Protect
To extend program security, EPROM and RAM protect
cycles are provided for the Z86E61/E63. Execution of the
EPROM protect cycle prohibits proper execution of the
EPROM Read, EPROM Verify, and EPROM programming
cycles. Execution of the RAM protect cycle disables accesses to the upper 128 bytes of register memory (excluding mode and configuration registers), but first the user’s
program must set bit 6 of the IMR (R251). Timing is shown
in Figures 20 and 21.
User Modes. Table 6 shows the programming voltage of
each mode of the Z86E61/E63.
Table 6. OTP Programming Table
User/Test Mode
Device Pin No.
User Modes
P33
VPP
P32
EPM
EPROM Read
Program
Program Verify
EPROM Protect
RAM Protect
V IH
VPP
VPP
VPP
VPP
VH
X
X
VH
X
Device Pins
P30
P31
/CE
/OE
VIL
VIL
VIL
VH
VH
VIL
V IH
VIL
V IH
V IH
P20
/PGM
ADDR
VCC
Port 1
CNFG
Data
V IH
VIL
V IH
VIL
VIL
Addr
Addr
Addr
XX
XX
5.0V
6.0V
6.0V
6.0V
6.0V
Out
In
Out
XX
XX
Notes:
VPP = 12.0V ± 0.5V
VH = 12.0V ± 0.5V
VIH = 5V
VIL = 0V
XX = Irrelevant
IPP during programming = 40 mA maximum.
ICC during programming, verify, or read = 40 mA maximum.
Z86E63 Signal Description for EPROM
Program/Read
The following signals are required to correctly program or
read the Z86E63 device.
ADDR. The address must remain stable throughout the
program read cycle.
DATA. The I/O data bus must be stable during programming (/OE High, /PGM Low, VPP High). During read the data
bus outputs data.
XCLK. A clock is required to clock the /RESET signal into
the registers before programming.
A constant clock can be applied, or the XCLK input can be
toggled a minimum of 12 cycles before any programming
or verify function begins. The maximum clock frequency to
be applied when in the EPROM mode is 12 MHz.
18
/RESET. The reset input can be held to a constant Low or
High value throughout normal programming. It must be
held High to program the EPROM protect option bit. Also,
any time the /RESET input changes state the XCLK must be
clocked a minimum of 12 times to clock the /RESET
through the reset filter.
/OE. When the device is placed in EPROM mode, the /OE
input also serves as the precharge for the sense amp. The
precharge signal should be Low for the first half of the
stable address and High for the second half. The PRECHG
signal is inverted from the /OE signal so the /OE should be
High on the first half and Low on the second half, or stable
address. The EPROM output data should be sampled
during the second half of stable address.
The access time of the EPROM is defined in later sections.
This two part calculation of access time is required because this is a precharged sense amp with a precharge
clock.
Z86E61/E63 Z8® MCU
16K/32K EPROM
P R E L I M I N A R Y
WITH
Table 7. Timing of Programming Waveforms
Parameters
Name
Min
1
2
3
4
Address Setup Time
Data Setup Time
V PP Setup
V CC Setup Time
5
6
7
8
Chip Enable Setup Time
Program Pulse Width
Data Hold Time
/OE Setup Time
9
10
11
12
Data Access Time
Data Output Float Time
Overprogram Pulse Width
EPM Setup Time
13
14
15
/PGM Setup Time
Address to /OE Setup Time
Option Program Pulse Width
Max
Units
2
2
2
2
µs
µs
µs
µs
2
0.95
2
2
µs
ms
µs
µs
200
100
2.85
2
ns
ns
ms
µs
2
2
78
µs
µs
ms
VIH
Address
0 Min
VIH
Data
VIL
Address Stable
Address Stable
VIL
Invalid
Valid
Invalid
Valid
9
VH
VPP
VIL
VH
EPM
VIL
5.5V
12
VCC
4.5V
VIH
/CE
VIL
0 Min
VIH
/OE
VIL
16
VIH
/PGM
16
VIL
3
Figure 18. EPROM Read
19
Z86E61/E63 Z8® MCU
EPROM
P R E L I M I N A R Y
WITH 16K/32K
PROGRAMMING (Continued)
VIH
Address
Address Stable
VIL
1
VIH
Data
Data Stable
VIL
Data Out Valid
2
9
10
VH
VPP
VIH
3
VH
EPM
VIL
6V
VCC
4.5V
VIH
4
7
/CE
VIL
5
VIH
/OE
16
VIL
VIH
/PGM
VIL
6
8
11
Program Cycle
Verify Cycle
Figure 19. EPROM Program and Verify
20
Z86E61/E63 Z8® MCU
16K/32K EPROM
P R E L I M I N A R Y
WITH
VIH
Address
Address 003
VIL
VIH
Data
VIL
VH
VPP
VIH
3
6V
VCC
4.5V
4
VH
/CE
VIH
/OE
VH
14
5
VIH
VH
EPM
VIH
VIL
VIH
12
12
VIH
/PGM
VIL
15
15
ROM Protect
Programming
RAM Protect
Programming
Figure 20. Programming EPROM, RAM Protect and 4K Size Selection
21
Z86E61/E63 Z8® MCU
EPROM
P R E L I M I N A R Y
WITH 16K/32K
PROGRAMMING (Continued)
VIH
Address
Address 008
VIL
VIH
Data
VIL
VH
VPP
VIH
3
6V
VCC
4.5V
4
VH
/CE
VIH
/OE
VH
14
5
VIH
VH
EPM
VIH
VIL
VIH
12
12
VIH
/PGM
VIL
15
15
ROM Protect
Programming
RAM Protect
Programming
Figure 21. Programming EPROM, RAM Protect and 16K Size Selection
22
Z86E61/E63 Z8® MCU
16K/32K EPROM
P R E L I M I N A R Y
WITH
Start
Addr =
First Location
Vcc = 6.0V
Vpp = 12.5V
N=0
Program
1 ms Pulse
Increment N
Yes
N = 25 ?
No
Fail
Verify
One Byte
Verify Byte
Fail
Pass
Pass
Prog. One Pulse
3xN ms Duration
Increment
Address
No
Last Addr ?
Yes
Vcc = Vpp = 4.5V
Verify All
Bytes
Pass
Fail
Vcc = Vpp = 5.5V
Verify All
Bytes
Pass
Device Failed
Fail
Device Passed
Figure 22. Intelligent Programming Flowchart
23
Z86E61/E63 Z8® MCU
EPROM
P R E L I M I N A R Y
WITH 16K/32K
ABSOLUTE MAXIMUM RATINGS
Symbol
VCC
TSTG
TA
Description
Min
Max
Units
Supply Voltage*
Storage Temp
Oper Ambient Temp
–0.3
–65°
+ 7.0°
+150°
†
V
C
C
Notes:
* Voltages on all pins with respect to GND.
† See Ordering Information
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.
STANDARD TEST CONDITIONS
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 23).
From Output
Under Test
I
150 pF
Figure 23. Test Load Diagram
24
Z86E61/E63 Z8® MCU
16K/32K EPROM
P R E L I M I N A R Y
WITH
DC CHARACTERISTICS
TA = 0°C to +70°C
Min
Max
Sym
Parameter
V CH
V CL
Max Input Voltage
Max Input Voltage
Clock Input High Voltage
Clock Input Low Voltage
V IH
V IL
V OH
V OL
Input High Voltage
Input Low Voltage
Output High Voltage
Output Low Voltage
2.0
–0.3
2.4
V RH
V Rl
IIL
IOL
Reset Input High Voltage
Reset Input Low Voltage
Input Leakage
Output Leakage
3.8
–0.3
–10
–10
IIR
ICC
Reset Input Current
Supply Current
–50
50
60
ICC1
Standby Current
ICC2
Standby Current
15
20
20
20
3.8
–0.3
Typical
@ 25°C
Units
Conditions
7
13
VCC+ 0.3
0.8
V
V
V
V
IIN 250 µA
P33-P30 Only
Driven by External Clock Generator
Driven by External Clock Generator
VCC+ 0.3
0.8
0.4
V
V
V
V
IOH = –2.0 mA
IOL = +2.0 mA
VCC+ 0.3
0.8
10
10
V
V
µA
µA
0V VIN + 5.25V
0V VIN + 5.25V
25
35
µA
mA
mA
V CC= + 5.25V, VRL = 0V
@ 16 MHz
@ 20 MHz
5
10
5
5
mA
mA
µA
µA
HALT Mode VIN = 0V, VCC @ 16 MHz
HALT Mode V IN = 0V, VCC @ 20 MHz
STOP Mode VIN = 0V, VCC @ 16 MHz
STOP Mode VIN = 0V, VCC @ 20 MHz
Notes:
I CC2 requires loading TMR (%F1H) with any value prior to STOP execution.
Use this sequence:
LD TMR,#00
NOP
STOP
25
Z86E61/E63 Z8® MCU
EPROM
P R E L I M I N A R Y
WITH 16K/32K
AC CHARACTERISTICS
External I/O or Memory Read or Write Timing Diagram
R//W
13
12
Port 0, /DM
16
3
18
Port 1
A7 - A0
1
D7 - D0 IN
9
2
/AS
8
11
4
5
/DS
(Read)
6
17
10
Port 1
A7 - A0
D7 - D0 OUT
14
15
7
/DS
(Write)
17
Figure 24. External I/O or Memory Read/Write Timing
26
Z86E61/E63 Z8® MCU
16K/32K EPROM
P R E L I M I N A R Y
WITH
AC CHARACTERISTICS
External I/O or Memory Read and Write Timing Table
TA = 0°C to +70°C
16 MHz
20 MHz
Min
Max
Min
Max
No
Symbol
Parameter
1
2
3
4
TdA(AS)
TdAS(A)
TdAS(DR)
TwAS
Address Valid to /AS Rise Delay
/AS Rise to Address Float Delay
/AS Rise to Read Data Req’d Valid
/AS Low Width
20
30
35
36
5
6
7
8
TdAZ(DS)
TwDSR
TwDSW
TdDSR(DR)
Address Float to /DS Fall
/DS (Read) Low Width
/DS (Write) Low Width
/DS Fall to Read Data Req’d Valid
0
135
80
0
130
75
9
10
11
12
ThDR(DS)
TdDS(A)
TdDS(AS)
TdR/W(AS)
Read Data to /DS Rise Hold Time
/DS Rise to Address Active Delay
/DS Rise to /AS Fall Delay
R//W Valid to /AS Rise Delay
0
35
30
20
13
14
15
16
TdDS(R/W)
TdDW(DSW)
TdDS(DW)
TdA(DR)
/DS Rise to R//W Not Valid
Write Data Valid to /DS Fall (Write) Delay
/DS Rise to Write Data Not Valid Delay
Address Valid to Read Data Req’d Valid
30
25
30
17
18
TdAS(DS)
TdDM(AS)
/AS Rise to /DS Fall Delay
/DM Valid to /AS Fall Delay
40
30
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.0 V for a logic 1 and 0.8 V for a logic 0.
Units
Notes
ns
ns
ns
ns
[2,3]
[2,3]
[1,2,3]
[2,3]
ns
ns
ns
ns
[1,2,3]
[1,2,3]
[1,2,3]
0
48
36
32
ns
ns
ns
ns
[2,3]
[2,3]
[2,3]
[2,3]
36
40
40
ns
ns
ns
ns
[2,3]
[2,3]
[2,3]
[1,2,3]
ns
ns
[2,3]
[2,3]
26
28
180
160
75
100
200
200
48
36
Clock Dependent Formulas
Number
Symbol
Equation
1
2
3
4
TdA(AS)
TdAS(A)
TdAS(DR)
TwAS
0.40 TpC + 0.32
0.59 TpC – 3.25
2.83 TpC + 6.14
0.66 TpC – 1.65
6
7
8
10
TwDSR
TwDSW
TdDSR(DR)
TdDS(A)
2.33 TpC – 10.56
1.27 TpC + 1.67
1.97 TpC – 42.5
0.8 TpC
11
12
13
14
TdDS(AS)
TdR/W(AS)
TdDS(R/W)
TdDW(DSW)
0.59 TpC – 3.14
0.4 TpC
0.8 TpC – 15
0.4 sTpC
15
16
17
18
TdDS(DW)
TdA(DR)
TdAS(DS)
TdDM(AS)
0.88 TpC – 19
4 TpC – 20
0.91 TpC – 10.7
0.9 TpC – 26.3
27
Z86E61/E63 Z8® MCU
EPROM
P R E L I M I N A R Y
WITH 16K/32K
AC CHARACTERISTICS
Additional Timing Diagram
3
1
Clock
2
2
3
7
7
TIN
4
5
6
IRQN
8
9
Figure 25. Additional Timing
AC CHARACTERISTICS
Additional Timing Table
TA = 0°C to +70°C
16 MHz
20 MHz
Min
Max
Min
Max
No
Symbol
Parameter
1
2
3
4
TpC
TrC,TfC
TwC
TwTinL
Input Clock Period
Clock Input Rise & Fall Times
Input Clock Width
Timer Input Low Width
62.5
21
50
37
75
5
6
7
TwTinH
TpTin
TrTin,TfTin
Timer Input High Width
Timer Input Period
Timer Input Rise & Fall Times
5TpC
8TpC
100
5TpC
8TpC
100
8A
8B
9
TwIL
TwIL
TwIH
Interrupt Request Input Low Times
Interrupt Request Input Low Times
Interrupt Request Input High Times
70
5TpC
5TpC
50
5TpC
5TpC
Notes:
[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.
28
1000
10
50
1000
15
Units
Notes
ns
ns
ns
ns
[1]
[1]
[1]
[2]
ns
[2]
[2]
[2]
ns
[2,4]
[2,5]
[2,3]
Z86E61/E63 Z8® MCU
16K/32K EPROM
P R E L I M I N A R Y
WITH
AC CHARACTERISTICS
Handshake Timing Diagrams
Data In Valid
Data In
1
Next Data In Valid
2
3
/DAV
(Input)
Delayed DAV
4
5
RDY
(Output)
6
Delayed RDY
Figure 26. Input Handshake Timing
Data Out
Data Out Valid
Next Data Out Valid
7
/DAV
(Output)
Delayed DAV
8
11
9
10
RDY
(Input)
Delayed
RDY
Figure 27. Output Handshake Timing
29
Z86E61/E63 Z8® MCU
EPROM
P R E L I M I N A R Y
WITH 16K/32K
AC CHARACTERISTICS
Handshake Timing Table
30
No
Symbol
Parameter
1
2
3
4
TsDI(DAV)
ThDI(DAV)
TwDAV
TdDAVI(RDY)
Data In Setup Time
Data In Hold Time
Data Available Width
DAV Fall to RDY Fall Delay
5
6
7
8
TdDAVId(RDY)
TdRDY0(DAV)
TdD0(DAV)
TdDAV0(RDY)
DAV Rise to RDY Rise Delay
RDY Rise to DAV Fall Delay
Data Out to DAV Fall Delay
DAV Fall to RDY Fall Delay
9
10
11
TdRDY0(DAV)
TwRDY
TdRDY0d(DAV)
RDY Fall to DAV Rise Delay
RDY Width
RDY Rise to DAV Fall Delay
TA = 0°C to +70°C
16 MHz
20 MHz
Min
Max
Min
Max
0
145
110
0
145
110
115
115
115
0
115
0
TpC
0
TpC
0
115
110
115
110
115
115
Data
Direction
IN
IN
IN
IN
IN
IN
OUT
OUT
OUT
OUT
OUT
Z86E61/E63 Z8® MCU
16K/32K EPROM
P R E L I M I N A R Y
WITH
Z8 CONTROL REGISTER DIAGRAMS
R243 PRE1
R240 SIO
D7 D6 D5 D4 D3 D2 D1 D0
D7 D6 D5 D4 D3 D2 D1 D0
Count Mode
0 T1 Single Pass
1 T1 Modulo N
Serial Data (D0 = LSB)
Clock Source
1 T1 Internal
0 T1 External Timing Input
(TIN) Mode
Figure 28. Serial I/O Register
(F0H: Read/Write)
Prescaler Modulo
(Range: 1-64 Decimal
01-00 HEX)
R241 TMR
D7 D6 D5 D4 D3 D2 D1 D0
0
1
No Function
Load T0
0
1
Disable T0 Count
Enable T0 Count
0
1
No Function
Load T1
0
1
Disable T1 Count
Enable T1 Count
Figure 31. Prescaler 1 Register
(F3H: Write Only)
R244 T0
D7 D6 D5 D4 D3 D2 D1 D0
T0 Initial Value
(When Written)
(Range: 1-256 Decimal
01-00 HEX)
T0 Current Value
(When Read)
TIN Modes
00 External Clock Input
01 Gate Input
10 Trigger Input
(Non-retriggerable)
11 Trigger Input
(Retriggerable)
Figure 32. Counter/Timer 0 Register
(F4H: Read/Write)
TOUT Modes
00 Not Used
01 T0 Out
10 T1 Out
11 Internal Clock Out
R245 PRE0
Figure 29. Timer Mode Register
(F1H: Read/Write)
D7 D6 D5 D4 D3 D2 D1 D0
Count Mode
0 T0 Single Pass
1 T0 Modulo N
R242 T1
Reserved (Must be 0)
D7 D6 D5 D4 D3 D2 D1 D0
T1 Initial Value
(When Written)
(Range: 1-256 Decimal
01-00 HEX)
T1 Current Value
(When Read)
Prescaler Modulo
(Range: 1-64 Decimal
01-00 HEX)
Figure 33. Prescaler 0 Register
(F5H: Write Only)
Figure 30. Counter/Timer 1 Register
(F2H: Read/Write)
31
P R E L I M I N A R Y
Z86E61/E63 Z8® MCU
EPROM
WITH 16K/32K
Z8 CONTROL REGISTER DIAGRAMS (Continued)
R246 P2M
R248 P01M
D7 D6 D5 D4 D3 D2 D1 D0
D7 D6 D5 D4 D3 D2 D1 D0
P20 - P27 I/O Definition
0 Defines Bit as Output
1 Defines Bit as Input
P00 - P00 Mode
00 Output
01 Input
1X A11 - A8
Stack Selection
0 External
1 Internal
Figure 34. Port 2 Mode Register
(F6H: Write Only)
P17 - P10 Mode
00 Byte Output
01 Byte Input
10 AD7 - AD0
11 High-Impedance AD7 - DA0,
/AS, /DS, /R//W, A11 - A8,
A15 - A12, If Selected
R247 P3M
D7 D6 D5 D4 D3 D2 D1 D0
Reserved (Must be 0)
0 Port 2 Pull-Ups Open Drain
1 Port 2 Pull-Ups Active
P07 - P04 Mode
00 Output
01 Input
1X A 15 - A12
Reserved (Must be 0)
0 P32 = Input
P35 = Output
1 P32 = /DAV0/RDY0
P35 = RDY0//DAV0
Figure 36. Port 0 and 1 Mode Register
(F8H: Write Only)
00
P33 = Input
P34 = Output
01 P33 = Input
10 P34 = /DM
11 P33 = /DAV1/RDY1
P34 = RDY1//DAV1
R249 IPR
0 P31 = Input (TIN)
P36 = Output (TOUT)
1 P31 = /DAV2/RDY2
P36 = RDY2//DAV2
0
1
P30 = Input
P37 = Output
P30 = Serial In
P37 = Serial Out
0 Parity Off
1 Parity On
Figure 35. Port 3 Mode Register
(F7H: Write Only)
D7 D6 D5 D4 D3 D2 D1 D0
Interrupt Group Priority
Reserved = 000
C > A > B = 001
A > B > C = 010
A > C > B = 011
B > C > A = 100
C > B > A = 101
B > A > C = 110
Reserved = 111
IRQ1, IRQ4 Priority (Group C)
0 IRQ1 > IRQ4
1 IRQ4 > IRQ1
IRQ0, IRQ2 Priority (Group B)
0 IRQ2 > IRQ0
1 IRQ0 > IRQ2
IRQ3, IRQ5 Priority (Group A)
0 IRQ5 > IRQ3
1 IRQ3 > IRQ5
Reserved (Must be 0)
Figure 37. Interrupt Priority Register
(F9H: Write Only)
32
Z86E61/E63 Z8® MCU
16K/32K EPROM
P R E L I M I N A R Y
R250 IRQ
WITH
R253 RP
D7 D6 D5 D4 D3 D2 D1 D0
D7 D6 D5 D4 D3 D2 D1 D0
IRQ0 = P32
IRQ1 = P33
IRQ2 = P31
IRQ3 = P30
IRQ4 = T0
IRQ5 = T1
Input (D0 = IRQ0)
Input
Input
Input, Serial Input
Serial Output
0 Reserved (Must be 0)
r4
r5
Register Pointer
r6
Reserved (Must be 0)
r7
Figure 38. Interrupt Request Register
(FA H: Read/Write)
Figure 41. Register Pointer Register
(FDH : Read/Write)
R251 IMR
R254 SPH
D7 D6 D5 D4 D3 D2 D1 D0
D7 D6 D5 D4 D3 D2 D1 D0
1
Enables IRQ5-IRQ0
(D0 = IRQ0)
1
Enables RAM Protect
1
Enables Interrupts
Stack Pointer Upper
Byte (SP15 - SP8)
Figure 42. Stack Pointer Register
(FE H: Read/Write)
Figure 39. Interrupt Mask Register
(FB H: Read/Write)
R255 SPL
R252 FLAGS
D7 D6 D5 D4 D3 D2 D1 D0
D7 D6 D5 D4 D3 D2 D1 D0
User Flag F1
Stack Pointer Lower
Byte (SP7 - SP0)
User Flag F2
Half Carry Flag
Decimal Adjust Flag
Figure 43. Stack Pointer Register
(FFH : Read/Write)
Overflow Flag
Sign Flag
Zero Flag
Carry Flag
Figure 40. Flag Register
(FC H: Read/Write)
33
Z86E61/E63 Z8® MCU
EPROM
P R E L I M I N A R Y
WITH 16K/32K
DC CHARACTERISTICS
Supply Current
I CC (mA)
40
A
B
30
C
20
10
0
2
4
6
8
10
12
14
16
18
20
Frequency (MHz)
Legend:
A - Vcc = 5.6V
B - Vcc = 5.0V
C - Vcc = 4.4V
Figure 44. Typical ICC vs Frequency
34
Z86E61/E63 Z8® MCU
16K/32K EPROM
P R E L I M I N A R Y
WITH
DC CHARACTERISTICS
Standby Current
I CC1 (mA)
12
A
10
B
C
8
6
4
2
2
0
4
6
8
10
12
14
16
18
20
Frequency (MHz)
Legend:
A - Vcc = 5.6V
B - Vcc = 5.0V
C - Vcc = 4.4V
Figure 45. Typical ICC1 vs Frequency
35
Z86E61/E63 Z8® MCU
EPROM
P R E L I M I N A R Y
WITH 16K/32K
INSTRUCTION SET NOTATION
Addressing Modes. The following notation is used to
describe the addressing modes and instruction operations as shown in the instruction summary.
Symbol
Meaning
IRR
Indirect register pair or indirect working
register pair address
Indirect working register pair only
Indexed address
Direct address
Relative address
Immediate
Register or working register address
Working register address only
Indirect register or indirect
working register address
Indirect working register address only
Register pair or working register pair
address
Irr
X
DA
RA
IM
R
r
IR
Ir
RR
Symbols. The following symbols are used in describing
the instruction set.
Symbol
Meaning
dst
src
cc
@
SP
PC
FLAGS
RP
IMR
Destination location or contents
Source location or contents
Condition Code
Indirect address prefix
Stack Pointer
Program Counter
Flag Register (Control Register 252)
Register Pointer (R253)
Interrupt Mask Register (R251)
36
Flags. Control register (R252) contains the following six
flags:
Symbol
Meaning
C
Z
S
V
D
H
Carry flag
Zero flag
Sign flag
Overflow flag
Decimal-adjust flag
Half-carry flag
Affected flags are indicated by:
0
1
*
x
Clear to zero
Set to one
Set to clear according to operation
Unaffected
Undefined
Z86E61/E63 Z8® MCU
16K/32K EPROM
P R E L I M I N A R Y
WITH
CONDITION CODES
Value
Mnemonic
Meaning
Flags Set
1000
0111
1111
0110
1110
C
NC
Z
NZ
Always True
Carry
No Carry
Zero
Not Zero
C=1
C=0
Z=1
Z=0
1101
0101
0100
1100
0110
PL
MI
OV
NOV
EQ
Plus
Minus
Overflow
No Overflow
Equal
S=0
S=1
V=1
V=0
Z=1
1110
1001
0001
1010
0010
NE
GE
LT
GT
LE
Not Equal
Greater Than or Equal
Less than
Greater Than
Less Than or Equal
Z=0
(S XOR V) = 0
(S XOR V) = 1
[Z OR (S XOR V)] = 0
[Z OR (S XOR V)] = 1
1111
0111
1011
0011
0000
UGE
ULT
UGT
ULE
F
Unsigned Greater Than or Equal
Unsigned Less Than
Unsigned Greater Than
Unsigned Less Than or Equal
Never True (Always False)
C=0
C=1
(C = 0 AND Z = 0) = 1
(C OR Z) = 1
37
Z86E61/E63 Z8® MCU
EPROM
P R E L I M I N A R Y
WITH 16K/32K
INSTRUCTION FORMATS
OPC
dst
CCF, DI, EI, IRET, NOP,
RCF, RET, SCF
OPC
One-Byte Instructions
OPC
MODE
dst/src
OR
1110
dst/src
OPC
CLR, CPL, DA, DEC,
DECW, INC, INCW,
POP, PUSH, RL, RLC,
RR, RRC, SRA, SWAP
OPC
MODE
src
OR
1110
src
dst
OR
1110
dst
OR
1110
dst
src
OR
1110
src
dst
OR
1110
dst
ADC, ADD, AND, CP,
LD, OR, SBC, SUB,
TCM, TM, XOR
JP, CALL (Indirect)
dst
OR
1110
dst
OPC
MODE
dst
OPC
ADC, ADD, AND, CP,
LD, OR, SBC, SUB,
TCM, TM, XOR
VALUE
SRP
VALUE
MODE
OPC
MODE
dst
src
MODE
OPC
dst/src
src/dst
dst/src
OPC
ADC, ADD, AND, CP,
OR, SBC, SUB, TCM,
TM, XOR
LD, LDE, LDEI,
LDC, LDCI
OPC
MODE
OPC
dst/src
x
LD
LD
ADDRESS
src/dst
LD
OR
1110
src
cc
OPC
JP
DAU
dst
OPC
LD
DAL
VALUE
OPC
dst/CC
OPC
DJNZ, JR
DAL
RA
FFH
6FH
CALL
DAU
STOP/HALT
7FH
Two-Byte Instructions
Three-Byte Instructions
INSTRUCTION SUMMARY
Note: Assignment of a value is indicated by the symbol
“ ← ”. For example:
dst ← dst + src
indicates that the source data is added to the destination
data and the result is stored in the destination location. The
38
notation “addr (n)” is used to refer to bit (n) of a given
operand location. For example:
dst (7)
refers to bit 7 of the destination operand.
Z86E61/E63 Z8® MCU
16K/32K EPROM
P R E L I M I N A R Y
WITH
INSTRUCTION SUMMARY
Address Opcode
Mode
Byte
dst src (Hex)
Flags Affected
C Z S V D H
Instruction
and Operation
ADC dst, src
dst←dst + src +C
†
1[ ]
✻ ✻ ✻ ✻ 0 ✻
INC dst
dst←dst + 1
ADD dst, src
dst←dst + src
†
0[ ]
✻ ✻ ✻ ✻ 0 ✻
AND dst, src
dst←dst AND src
†
5[ ]
-
✻ ✻ 0
- -
CALL dst
SP←SP – 2
@SP←PC,
PC←dst
DA
IRR
D6
D4
-
-
-
-
- -
EF
✻ -
-
-
- -
Instruction
and Operation
CCF
C←NOT C
CLR dst
dst←0
R
IR
B0
B1
-
-
-
- -
COM dst
dst←NOT dst
R
IR
60
61
-
✻ ✻ 0
- -
CP dst, src
dst – src
†
A[ ]
✻ ✻ ✻ ✻ - -
DA dst
dst←DA dst
R
IR
40
41
✻ ✻ ✻ X - -
DEC dst
dst←dst – 1
R
IR
00
01
-
DECW dst
dst←dst – 1
RR
IR
80
81
-
✻ ✻ ✻ - -
8F
-
-
-
-
- -
rA
r=0-F
-
-
-
-
- -
DI
IMR(7)←0
DJNZr, dst
r←r – 1
if r ≠ 0
PC←PC + dst
Range: +127,
–128
RA
-
INCW dst
dst←dst + 1
9F
-
-
-
-
- -
HALT
7F
-
-
-
-
- -
Flags Affected
C Z S V D H
r
-
✻ ✻ ✻ - -
R
IR
rE
r=0–F
20
21
RR
IR
A0
A1
-
✻ ✻ ✻ - -
BF
✻ ✻ ✻ ✻ ✻ ✻
cD
c=0–F
30
-
-
-
-
- -
cB
c=0–F
-
-
-
-
- -
-
-
-
-
- -
IRET
FLAGS←@SP;
SP←SP + 1
PC←@SP;
SP←SP + 2;
IMR(7)←1
JP cc, dst
if cc is true,
PC←dst
DA
JR cc, dst
if cc is true,
PC←PC + dst
Range: +127,
–128
RA
LD dst, src
dst←src
r
r
R
Im
R
r
r
X
r
Ir
R
R
R
IR
IR
X
r
Ir
r
R
IR
IM
IM
R
rC
r8
r9
r=0–F
C7
D7
E3
F3
E4
E5
E6
E7
F5
LDC dst, src
dst←src
r
Irr
C2
-
-
-
-
- -
LDCI dst, src
dst←src
r←r + 1;
rr←rr + 1
Ir
Irr
C3
-
-
-
-
- -
✻ ✻ ✻ - -
EI
IMR(7)←1
Address Opcode
Mode
Byte
dst src (Hex)
IRR
39
Z86E61/E63 Z8® MCU
EPROM
P R E L I M I N A R Y
WITH 16K/32K
INSTRUCTION SUMMARY (Continued)
Address Opcode
Mode
Byte
dst src (Hex)
Instruction
and Operation
NOP
Flags Affected
C Z S V D H
Instruction
and Operation
FF
-
-
-
- -
STOP
-
Address
Mode
dst src
Opcode
Byte
(Hex)
Flags Affected
C Z S V D H
6F
1 -
-
-
- -
2[ ]
[
[
[
1 [
X ✻ ✻ X - -
OR dst, src
dst←dst OR src
†
4[ ]
-
✻ ✻ 0
- -
SUB dst, src
dst←dst←src
†
POP dst
dst←@SP;
SP←SP + 1
R
IR
50
51
-
-
- -
SWAP dst
R
F0
IR
F1
PUSH src
SP←SP – 1;
@SP←src
R
IR
TCM dst, src
(NOT dst)
AND src
†
6[ ]
-
✻ ✻ 0
- -
TM dst, src
dst AND src
†
7[ ]
-
✻ ✻ 0
- -
XOR dst, src
dst←dst
XOR src
†
B[ ]
-
✻ ✻ 0
- -
-
RCF
C←0
CF
0 -
RET
PC←@SP;
SP←SP + 2
AF
RL dst
7
7
C
7
7
SRA dst
40
-
- - -
R
IR
90
91
✻ ✻ ✻ ✻ - -
R
IR
10
11
✻ ✻ ✻ ✻ - -
R
IR
E0
E1
✻ ✻ ✻ ✻ - -
R
IR
C0
C1
✻ ✻ ✻ ✻ - -
†
3[ ]
✻ ✻ ✻ ✻ 1 ✻
DF
1 -
SCF
C←1
SRP dst
RP←src
-
-
0
- -
0
SBC dst, src
dst←dst←src←C
7
-
-
3
† 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.
For example, the opcode of an ADC instruction using the addressing
modes r (destination) and Ir (source) is 13.
0
RRC dst
C
-
-
4
0
RR dst
C
-
-
0
RLC dst
C
-
7
70
71
C
-
[
R
IR
D0
D1
-
-
✻ ✻ ✻ 0
- - -
0
Im
31
- -
-
-
- -
Address Mode
dst
src
Lower
Opcode Nibble
r
r
[2]
r
Ir
[3]
R
R
[4]
R
IR
[5]
R
IM
[6]
IR
IM
[7]
Z86E61/E63 Z8® MCU
16K/32K EPROM
P R E L I M I N A R Y
WITH
OPCODE MAP
Lower Nibble (Hex)
0
1
2
3
4
5
Upper Nibble (Hex)
6
7
8
9
A
B
C
D
E
F
0
1
2
3
4
5
6
6.5
DEC
R1
6.5
RLC
R1
6.5
INC
R1
8.0
JP
IRR1
8.5
DA
R1
10.5
POP
R1
6.5
COM
R1
10/12.1
PUSH
R2
10.5
DECW
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
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
12/14.1
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
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
ADD
R1, IM
10.5
ADC
R1, IM
10.5
SUB
R1, IM
10.5
SBC
R1, IM
10.5
OR
R1, IM
10.5
AND
R1, IM
10.5
TCM
R1, IM
10.5
TM
R1, IM
7
8
6.5
10.5
LD
ADD
IR1, IM r1, R2
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
9
A
B
C
12/10.5 12/10.0 6.5
6.5
LD
JR
DJNZ
LD
r2, R1 r1, RA cc, RA r1, IM
D
E
12.10.0
JP
cc, DA
6.5
INC
r1
F
6.0
STOP
7.0
HALT
6.1
DI
6.1
EI
14.0
RET
10.5
10.5
10.5
10.5
CP
CP
CP
CP
R2, R1 IR2, R1 R1, IM IR1, IM
10.5
10.5
10.5
10.5
XOR
XOR
XOR
XOR
R2, R1 IR2, R1 R1, IM IR1, IM
10.5
LD
r1,x,R2
10.5
20.0
20.0
LD
CALL
CALL*
r2,x,R1
DA
IRR1
10.5
10.5
10.5
10.5
LD
LD
LD
LD
R2, R1 IR2, R1 R1, IM IR1, IM
10.5
LD
R2, IR1
2
3
16.0
IRET
6.5
RCF
6.5
SCF
6.5
CCF
6.0
NOP
2
3
1
Bytes per Instruction
Lower
Opcode
Nibble
Execution
Cycles
Pipeline
Cycles
4
Upper
Opcode
Nibble
First
Operand
A
10.5
CP
R1, R2
Mnemonic
Second
Operand
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
Note: Blank areas not defined.
*2-byte instruction appears as
a 3-byte instruction
41
P R E L I M I N A R Y
PACKAGE INFORMATION
40-Pin DIP Package Diagram
44-Pin PLCC Package Diagram
42
Z86E61/E63 Z8® MCU
EPROM
WITH 16K/32K
P R E L I M I N A R Y
Z86E61/E63 Z8® MCU
16K/32K EPROM
WITH
44-Pin QFP Package Diagram
43
Z86E61/E63 Z8® MCU
EPROM
P R E L I M I N A R Y
WITH 16K/32K
ORDERING INFORMATION
Z86E61
16 MHz
40-Pin DIP
Z86E6116PSC
20 MHz
44-Pin PLCC
Z86E6116VSC
40-Pin DIP
Z86E6120PSC
44-Pin PLCC
Z86E6316VSC
40-Pin DIP
Z86E6320PSC
44-Pin PLCC
Z86E6120VSC
44-Pin QFP
Z86E6116FEC
Z86E63
16 MHz
40-Pin DIP
Z86E6316PSC
20 MHz
44-Pin PLCC
Z86E6320VSC
For fast results, contact your local Zilog sales office for assistance in ordering the part desired.
CODES
Preferred Package
P = Plastic DIP
V = Plastic Chip Carrier
Temperature
S = 0°C to +70°C
Speeds
12 = 16 MHz
16 = 20 MHz
Environmental
C = Plastic Standard
Example:
Z 86E61 16 P S C
is an Z86E61, 16 MHz, DIP, 0°C to +70°C, Plastic Standard Flow
Environmental Flow
Temperature
Package
Speed
Product Number
Zilog Prefix
44