ZiLOG Z08617 User manual

1
Z08617 NMOS Z8
®
8-BIT MCU
KEYBOARD CONTROLLER
FEATURES
C
USTOMER
P
ROCUREMENT
S
PECIFICA TION
■Low Power Consumption - 750 mW
■32 Input/Output Lines
■Digital Inputs NMOS Levels with
Internal Pull-Up Resistors
■4 Kbytes ROM
■Four Direct Connect LED Drive Pins
■124 Bytes of RAM
■Hardware Watch-Dog Timer (WDT)
■Two Programmable 8-Bit Counter/Timers,
Each with 6-Bit Programmable Prescaler
■Six Vectored, Priority Interrupts from
Six Different Sources
■On-Chip RC Oscillator
■Clock Frequency: Up to 5MHz
■Low EMI Emission
GENERAL DESCRIPTION
The Z08617 Keyboard Controller is a member of the
Z8®single-chip microcontroller family with 4 Kbytes
of ROM. The device is housed in a 40-pin DIP package,
and is manufactured in NMOS technology. The Z08617
microcontroller offers fast execution, efficient use of
memory, sophisticated interrupt, input/output bit-
manipulation capabilities, and easy hardware/soft-
ware system expansion along with low cost and low
power consumption.
The Z08617 architecture is characterized by a flex-
ible I/O scheme, an efficient register, I/O, and a
number of ancillary features that are useful in many
industrial and advanced scientific applications.
For applications which demand powerful I/O capabili-
ties, the Z08617 provides 32 pins dedicated to input
and output. These lines are grouped into four ports,
each port consists of 8 lines, and are configurable
under software control to provide timing, status
signals, and serial or parallel I/O ports.
The Z08617 offers low EMI emission which is achieved
by means of several modifications in the output
drivers and clock circuitry of the device.
There are two basic address spaces which are avail-
able to support this wide range of configurations:
Program Memory and 124 General-Purpose Registers.
The Z08617 offers two on-chip counter/timers with
a large number of user-selectable modes. This unbur-
dens the program from coping with real-time prob-
lems such as counting/timing (Figure 1).
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 VCC VDD
Ground GND VSS
DS96KEY0300
Z08617
NMOS Z8®8-BIT MCU
KEYBOARD CONTROLLER

Z08617 NMOS Z8
®
8-BIT MCU
KEYBOARD CONTROLLER
2
GENERAL DESCRIPTION (Continued)
Port 3
Counter/
Timers (2)
Interrupt
Control
Port 2
I/O
(Bit Programmable)
ALU
Flags
Register
Pointer
Register File
124 x 8-Bit
Machine Timing
& Instruction Control
Program
Memory
Program
Counter
Vcc GND
Output Input
Port 0 Port 1
I/O
Output Open-Drain
(Nibble Programmable)
I/O
Output Open-Drain
(Byte Programmable)
44 8
WDT
POR
/WDTOUT
/RESET
XTAL2
XTAL1
Figure 1. Z08617 Functional Block Diagram

3
Z08617 NMOS Z8
®
8-BIT MCU
KEYBOARD CONTROLLER
PIN IDENTIFICATION
Figure 2. 40-Pin DIP Pin Configuration
Pin # Symbol Function Direction
1V
CC Power Supply Input
2 CLK Out Clock Out Output
3 RC In Z8 Clock Input
4 P37 Port 3, Pin 7 Output
5 P30 Port 3, Pin 0 Input
6 /RESET Reset Input
*7 GND Ground
*8 N/C Not Connected
9 /WDTOUT Watch-Dog Timer Output
10 P35 Port 3, Pin 5 Output
Pin # Symbol Function Direction
11 GND Ground
12 P32 Port 3, Pin 2 Input
13-20 P07-P00 Port 0, Pins 0,1,2,3,4,5,6,7 In/Output
21-28 P17-P10 Port 1, Pins 0,1,2,3,4,5,6,7 In/Output
29 P34 Port 3, Pin 4 Output
30 P33 Port 3, Pin 3 Input
31-38 P27-P20 Port 2, Pins 0,1,2,3,4,5,6,7 In/Output
34-38 P24-P20 Port 2, Pins 0, 1, 2, 3, 4 In/Output
39 P31 Port 3, Pin 1 Input
40 P36 Port 3, Pin 6 Output
Table 1. 40-Pin DIP Pin Identification
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
VCC
CLK Out
RC In
P37
P30
/RESET
*GND
*N/C
/WDTOUT
P35
GND
P32
P00
P01
P02
P03
P04
P05
P06
P07
P36
P31
P27
P26
P25
P24
P23
P22
P21
P20
P33
P34
P17
P16
P15
P14
P13
P12
P11
P10
40
39
38
37
36
35
34
33
32
31
30
29
28
27
26
25
24
23
22
21
Z08617
DIP
Note:
* Pin 8 is connected to the chip, although used only for testing.
This pin
must
float. Pin 7 is a test pin and
must
be grounded.

Z08617 NMOS Z8
®
8-BIT MCU
KEYBOARD CONTROLLER
4
ABSOLUTE MAXIMUM RATINGS
Symbol Description Min Max Units
VCC Supply Voltage* –0.3 +7.0 V
TSTG Storage Temp –65 +150 C
TAOper Ambient Temp † †
Notes:
* Voltage 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 condi-
tions for extended periods may affect device reliabil-
ity.
STANDARD TEST CONDITIONS
The characteristics listed here apply for standard test
conditions as noted. All voltages are referenced to
GND. Positive current flows into the referenced pin
(Figure 17).
From Output
Under Test
150 pF
Figure 17. Test Load Diagram
STANDARD TEST CONDITIONS
TA= 25°C, VCC = GND = 0V, f = 1.0 MHz, unmeasured pins returned to ground.
Parameter Max
Input capacitance 12 pF
Output capacitance 12 pF
I/O capacitance 12 pF

5
Z08617 NMOS Z8
®
8-BIT MCU
KEYBOARD CONTROLLER
DC CHARACTERISTICS
VCC = 4.75V to 5.25V @ 0°C to -55°C
Sym Parameter Min Max Typ* Unit Condition
VIH Input High Voltage 2.0 VCC V
VIL Input Low Voltage –0.3 0.8 V
VRH Reset Input High Voltage 3.8 VCC V
VRL Reset Input Low Voltage –0.3 0.8 V
VOH Output High Voltage 2.0 V IOH = –250 µA (Port 2 only)
Output High Voltage 2.4 V IOH = –250 µA (Port 3 only)
VOL Output Low Voltage 0.8 V IOL = 10.0 mA (See note [1] below.)
IIL Input Leakage –10 10 µAV
IN = 0V, 5.25V (See note [3] below.)
IOL Output Leakage –10 10 µAV
IN = 0V, 5.25V (See note [2] below.)
IIR Reset Input Current –335 –775 –477 µAV
IN = 0V, 5.25V
IR1 Input Current –335 –775 µA Pull-up resistor=10.4 Kohms, VIN=0.0V
IR2 Input Current –1.6 –2.9 mA Pull-up resistor = 2.4 Kohms, VIN=0.0V
ICC VCC Supply Current 160 mA
WDT Watch-Dog Timer 2.0 mA VOL=0.4 Volt
Notes:
* Typical @ 25°C
[ 1 ] Ports P37-P34 may be used to sink 12 mA. These may be used
for LEDs or as general-purpose outputs requiring high sink
current.
[ 2 ] P00-P07, P10-P17, P20-P25, P30-P33 as output mode open-
drain as a logic one.
[ 3 ] P00-P07, P10-P17, P20-P25, P30-P33 as output mode open-
drain as a logic one.

Z08617 NMOS Z8
®
8-BIT MCU
KEYBOARD CONTROLLER
6
PIN FUNCTIONS
RCIN This pin is connected between a precision resistor
on the power supply from the precision RC Oscillator.
CLK Out This pin is the syste m clock of the Z8 and
runs at the frequency of the RC Oscillator. Any load on
this pin will effect the RC Oscillator frequency.
Port 0 (P07-P00). Port 0 is an 8-bit, nibble program-
mable, bi-directional, NMOS compatible I/O port. These
eight I/O lines can be configured under software
control as a nibble input port, or as a nibble open-drain
output port. When used as an I/O port, inputs are
standard NMOS (Figure 5). Port P03-P00 has 10.4
Kohms (±35%) pull-up resistors when configured as
inputs.
Figure 5. Port 0 Configuration
Port 0
I/O
(Open-Drain Output)
Z8615
4
4
Input
Output
Pad
OEN
10.4 Kohms
(a) Port P00-P03
Input
Output
Pad
OEN
(b) Port P04-P07

7
Z08617 NMOS Z8
®
8-BIT MCU
KEYBOARD CONTROLLER
PIN FUNCTIONS (Continued)
Port 1 (P17-P10). Port 1 is an 8-bit, byte programmable,
bidirectional, NMOS compatible I/O port. These eight I/O
lines are configured under software control program as a
byte input port or as an open-drain output port. When used
as an I/O port, inputs are standard NMOS (Figure 6).
Port 1
I/O
(Open-Drain Output)
Z8615 8
Input
Output
Pad
OEN
Figure 6. Port 1 Configuration

Z08617 NMOS Z8
®
8-BIT MCU
KEYBOARD CONTROLLER
8
Port 2 (P27-P20). Port 2 is an 8-bit, bit programmable, bi-
directional, NMOS compatible I/O port. These eight I/O
lines are configured under the software control program
for I/O. Port 2 can be programmed as bit-by-bit indepen-
dently, as input or output, or configured to provide open-
drain outputs (Figure 7). P26 and P27 have 2.4 Kohms
(±25%) pull-up resistors and are capable of sourcing
2.4 mA. P24 and P25 have 10.4 Kohms (±35%) pull-up
when configured as inputs.
Open-Drain
OUT
OEN
IN
Pad
Input
(a) Ports P20-P23
Port 2
(I/O)
Z8615
Open-Drain
OUT
OEN
IN
Pad
10.4 Kohms
Input
(b) Ports P24-P25
Open-Drain
OUT
OEN
IN
Pad
2.4 Kohms
Input
(c) Ports P26-P27
Figure 7. Port 2 Configuration

9
Z08617 NMOS Z8
®
8-BIT MCU
KEYBOARD CONTROLLER
PIN FUNCTIONS (Continued)
Port3 (P37-P30). Port 3 is an 8-bit, NMOS compatible four-
fixed-input and four-fixed-output I/O port. These eight I/O
lines have four-fixed-input (P33-P30) and four-fixed-out-
put(P37-P34)ports.Port3inputshave10.4Kohms(±35%)
pull-up resistors and port 3 outputs are capable of driving
up to four LEDs.
Port 3 is configured under software control to provide
the following control functions: four external interrupt
request signals (IRQ3-IRQ0); timer input and output
signals (TIN and TOUT - Figure 8).
/RESET (input, active Low). When activated, /RESET
initializes the Z08617. When /RESET is deactivated,
program execution begins from the internal program
location at 000CH. Reset pin has a 10.4 Kohms pull-
up resistor. Once this pin is pulled Low, it takes about
150 ms for microcon-troller initialization.
Figure 8. Port 3 Configuration
Port 3
(I/O or
Control)
Z8615
Input Pad
Output
Pad
(a) Port 3 P34-P37
(b) Port 3 P30-P33
10.4 Kohms

Z08617 NMOS Z8
®
8-BIT MCU
KEYBOARD CONTROLLER
10
FUNCTIONAL DESCRIPTION
The device incorporates special functions to enhance
Zilog's Z8 applications as a keyboard controller, scien-
tific research and advanced technologies applications.
Program Memory. The 16-bit program counter ad-
dresses 4 Kbytes of program memory space at inter-
nal locations (Figure 9).
The first 12 bytes of program memory are reserved for the
interrupt vectors. These locations have six 16-bit vectors
that correspond to the six available interrupts.
Byte 12 to byte 4095 consists of on-chip, mask
programmed ROM. Addresses 4096 and greater are
reserved.
12
11
10
9
8
7
6
5
4
3
2
1
0
On-Chip
ROM
Location of
First Byte of
Instruction
Executed
After RESET
Interrupt
Vector
(Lower Byte)
Interrupt
Vector
(Upper Byte)
IRQ5
IRQ4
IRQ4
IRQ3
IRQ3
IRQ2
IRQ2
IRQ1
IRQ1
IRQ0
IRQ0
IRQ5
65535
4096
4095
Reserved
Figure 9. Program Memory Map

11
Z08617 NMOS Z8
®
8-BIT MCU
KEYBOARD CONTROLLER
FUNCTIONAL DESCRIPTION (Continued)
Register File. The register file (Figure 10) consists of four
I/O port registers, 124 general-purpose registers and 16
control and status registers (R3-R0, R127-R4, and R255-
R240, respectively). The instructions can access registers
directly or indirectly through an 8-bit address field. This
allows short, 4-bit register addressing using the Register
Pointer (Figure 11). In the 4-bit mode, the register file is
divided into nine working-register groups, each occupy-
ing 16 continuous locations. The Register Pointer ad-
dresses the starting location of the active working-register
group.
Figure 10. Register File Configuration
Figure 11. Register Pointer Configuration
Stack Pointer (Bits 7-0)
R255
General-Purpose Register (Bits 7-0)
Register Pointer
Program Control Flags
Interrupt Mask Register
Interrupt Request Register
Interrupt Priority Register
Ports 1-0 Mode
Port 3 Mode
Port 2 Mode
T0 Prescaler
Timer/Counter0
T1 Prescaler
Timer/Counter1
Timer Mode
Reserved
Not Implemented
General-Purpose
Registers
Port 3
Port 2
Port 1
Port 0
R254
R253
R252
R251
R250
R249
R248
R247
R246
R245
R244
R243
R242
R241
R240
R127
R3
R2
R1
R0
SPL
GPR
RP
FLAGS
IMR
IRQ
IPR
P01M
P3M
P2M
PREQ
T0
PRE1
T1
TMR
P3
P2
P1
P0
R4
LOCATION IDENTIFIERS
The upper nibble of the register file address
provided by the register pointer specifies
the active working-register group.
r7 r6 r5 r4 R253
(Register Pointer)
I/O Ports
Specified Working
Register Group
The lower nibble
of the register
file address
provided by the
instruction points
to the specified
register.
r3 r2 r1 r0
Register Group 1
Register Group 0
R15 to R0
Register Group F
R15 to R4
R3 to R0
R15 to R0
•
•
•
•
•
FF
F0
0F
00
1F
10
2F
20
•
•
•
•
•
•
•
•
•

Z08617 NMOS Z8
®
8-BIT MCU
KEYBOARD CONTROLLER
12
Stack. The Z08617 internal register files are used for the
stack. An 8-bit Stack Pointer (R255) is used for the internal
stack that resides within the 124 general-purpose regis-
ters.
Counter/Timers. There are two 8-bit programmable
counter/timers (T0-T1), each driven by its own 6-bit
programmable prescaler. The T1 prescaler can be
driven by internal or external clock sources, however,
the T0 prescaler is driven by the internal clock only
(Figure 12).
The 6-bit prescalers can further divide the input
frequency of the clock source by any integer number
from 1 to 64. Each prescaler drives its own 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 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 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 counters, 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 are
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 as an external clock, a trigger input that can be
retriggerable or non-triggerable, or as a gate input for
the internal clock. The counter/timers can be pro-
grammable cascaded by connecting the T0 output to
the input of T1. Port 3 lines P36 also serves as a timer
output (TOUT) through which T0, T1 or the internal
clock are output.
Figure 12. Counter/Timers Block Diagram
PRE0
Initial Value
Register
T0
Initial Value
Register
T0
Current Value
Register
6-Bit
Down
Counter
8-bit
Down
Counter
÷4
6-Bit
Down
Counter
8-Bit
Down
Counter
PRE1
Initial Value
Register
T1
Initial Value
Register
T1
Current Value
Register
Clock
Logic
IRQ4
T
P36
OUT
IRQ5
Internal Data Bus
Write Write Read
Internal Clock
Gated Clock
Triggered Clock
T P31
Write Write Read
Internal Data Bus
External Clock
Internal Clock
÷4
÷2
IN
CLK
Out
RC
OSC
÷2

13
Z08617 NMOS Z8
®
8-BIT MCU
KEYBOARD CONTROLLER
FUNCTIONAL DESCRIPTION (Continued)
Interrupts. TheZ08617 has six different interruptsfrom six
different sources. These interrupts are maskable and
prioritized (Figure 13). The six sources are divided as
follows: four sources are claimed by Port 3 lines P33-P30,
and two are claimed by the counter/timers. The Interrupt
Masked Register globally or individually enables or dis-
ables the six interrupts requests.
When more than one interrupt is pending, priorities are
resolved by a programmable priority encoder that is
controlled by the Interrupt Priority register. All inter-
rupts are vectored through locations in the program
memory. When an interrupt machine cycle is activated an
interrupt request is granted. This disables all of the subse-
quent interrupts, saves the Program Counter and status
flags, and then branches to the program memory vector
location reserved for that interrupt. This memory location
andthe next byte containthe 16-bit addressofthe 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 request
needs service.
IRQ
IMR
IPR
Priority
Logic
6
Global
Interrupt
Enable
Vector Select
Interrupt
Request
6
IRQ0-IRQ5
Figure 13. Interrupt Block Diagram

Z08617 NMOS Z8
®
8-BIT MCU
KEYBOARD CONTROLLER
14
RC Oscillator. The Z08617 provides an internal capacitor
to accommodate an RC oscillator configuration. A 1%
precision resistor is necessary to achieve ±10% accurate
frequency oscillation.
Figure 14. Oscillator Configuration
EMI. The Z08617 offers low EMI emission due to circuit
modifications to improve EMI performance. The inter-
naldivide-by-twocircuit has been removed toimproveEMI
performance.
RC Oscillator
XTAL1
NC
1%
Precision
XTAL2
5V

15
Z08617 NMOS Z8
®
8-BIT MCU
KEYBOARD CONTROLLER
FUNCTIONAL DESCRIPTION (Continued)
Watch-Dog Timer. The Z08617 is equipped with a hard-
ware Watch-Dog Timer which will be turned on automati-
cally by power-on (Figure 15). The Watch-Dog Timer must
be refreshed at least once every 50 ms by executing the
instruction WDT (Opcode = %5F), otherwise the Z08617
will reset itself if /WDTOUT pin 9 is connected to /RESET
(Pin 6). Figure 16 shows the block diagram of WDT.
The Watch-Dog Timer is automatically enabled upon
power-up of the microcontroller and /RESET going High.
The /WDTOUT pin can be connected to the /RESET pin to
provide an automatic reset upon WDT time-out. Dur-
ing WDT time-out, the /WDTOUT pin goes Low for
approximately 8-15 µs.
WDT Hot Bit. Bit 7 of the Interrupt Request Register
(IRR register FAH) determines whether a hot start or
cold start occurred. A cold start is defined as a rest
occurring from the power-up of the Z08617 (bit 7 is set to
zero upon power-up). A hot start occurs when a WDT time-
out has occurred (bit 7 is set to 1). Bit 7 of the IRQ register
isread-only and is automatically resetto 0 when accessed.
Power-On Reset. Upon power-up of the microcontroller,
a reset condition is enabled. A delay of 150 ms ±20%
is used to assist in initializing the microcontroller.
/Reset
VCC
/WDT
Output
Internal
Reset
POR
8-15
µs
Reset
Delay
* Reset Delay = POR 150 ms ±20%
Figure 15. WDT Turn-On Timing After Reset
Reset Internal
Reset
Counter
Reset Logic
50 ms
10.4 Kohms
Internal RC
WDT 150 ms
Figure 16. WDT Block Diagram

Z08617 NMOS Z8
®
8-BIT MCU
KEYBOARD CONTROLLER
16
Z8®CONTROL REGISTER DIAGRAMS
D7 D6 D5 D4 D3 D2 D1 D0
0 = Disable T0 Count
1 = Enable T0 Count
0 = No Function
1 = Load T0
0 = No Function
1 = Load T1
0 = Disable T1 Count
1 = Enable T1 Count
TIN Modes
00 = External Clock Input
01 = Gate Input
10 = Trigger Input
(Non-retriggerable)
11 = Trigger Input
(Retriggerable)
TOUT Mode
00 = Not Used
01 = T0 OUT
10 = T1 OUT
11 = Internal Clock Out
R241 TMR
Figure 18. Timer Mode Register
(F1H: Read/Write)
D7 D6 D5 D4 D3 D2 D1 D0
T1 Initial Value
(When WRITE)
(Range 1-256 Decimal
01-00 HEX)
T1 Current Value
(When READ)
R242 T1
Figure 19. Counter Timer 1 Register
(F2H: Read/Write)
D7 D6 D5 D4 D3 D2 D1 D0
Count Mode
0 = T1 Single Pass
1 = T1 Modulo N
Clock Source
1 = T0 Internal
0 = T0 External Timing Input
(TIN) Mode
Prescaler Modulo
(Range: 1-64 Decimal
01-00 HEX)
R243 PRE1
Figure 20. Prescaler 1 Register
(F3H: Write Only)
D7 D6 D5 D4 D3 D2 D1 D0
T0 Initial Value
(When WRITE)
(Range: 1-256 Decimal
01-00 HEX)
T0 Current Value
(When READ)
R244 T0
Figure 21. Counter/Timer 0 Register
(F4H: Read/Write)
D7 D6 D5 D4 D3 D2 D1 D0
Count Mode
0 = T0 Single Pass
1 = T0 Modulo N
Reserved (Must be 0)
Prescaler Modulo
(Range: 1-64 Decimal
01-00 HEX)
R245 PRE0
D7 D6 D5 D4 D3 D2 D1 D0
P20-P27 I/O Definition
0 Defines Bit as OUTPUT
1 Defines Bit as INPUT
R246 P2M
Figure 22. Prescaler 0 Register
(F5H: Write Only)
Figure 23. Port 2 Mode Register
(F6H: Write Only)
Figure 24. Port 3 Mode Register
(F7H: Write Only)
D7 D6 D5 D4 D3 D2 D1 D0
0 Port 2 Pull-Ups Open-Drain
1 Port 2 Pull-UpsActive
Reserved (Must be 0)
R247 P3M

17
Z08617 NMOS Z8
®
8-BIT MCU
KEYBOARD CONTROLLER
D7 D6 D5 D4 D3 D2 D1 D0
P00 - P03 Mode
00 = Output
01 = Input
R248 P01M
Stack Selection
1 = Internal (Must be 1)
P10-P17 Mode
0 = Byte Output
1 = Byte Input
Reserved (Must be 0)
P04 - P07 Mode
00 = Output
01 = Input
Figure 25. Port 0 and 1 Mode Register
(F8H: 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
IRQ3, IRQ5 Priority (GroupA)
0 = IRQ5 > IRQ3
1 = IRQ3 > IRQ5
IRQ0, IRQ2 Priority (Group B)
0 = IRQ2 > IRQ0
1 = IRQ0 > IRQ2
IRQ1, IRQ4 Priority (Group C)
0 = IRQ1 > IRQ4
1 = IRQ4 > IRQ1
Reserved (Must be 0)
R249 IPR
Figure 26. Interrupt Priority Register
(F9H: Write Only)
D7 D6 D5 D4 D3 D2 D1 D0
Reserved (Must be 0)
1 Enables IRQ0-IRQ5
(D0 = IRQ0)
1 Enables Interrupts
R251 IMR
Figure 28. Interrupt Mask Register
(FBH: Read/Write)
Figure 27. Interrupt Request Register
(FAH: Read/Write)
Z8®CONTROL REGISTER DIAGRAMS (Continued)
D7 D6 D5 D4 D3 D2 D1 D0
IRQ0 = P32 Input (D0 = IRQ0)
IRQ1 = P33 Input
IRQ2 = P31 Input
IRQ3 = P30 Input
IRQ4 = T0
IRQ5 = T1
Reserved (Must be 0)
R250 IRQ
WDT Hot Bit
0 = POR*
1 = WDT TIME OUT
*
Default setting after setup.

Z08617 NMOS Z8
®
8-BIT MCU
KEYBOARD CONTROLLER
18
D7 D6 D5 D4 D3 D2 D1 D0
User Flag F1
User Flag F2
Half Carry Flag
DecimalAdjust Flag
Overflow Flag
Sign Flag
Zero Flag
Carry Flag
R252 Flags
Figure 29. Flag Register
(FCH: Read/Write)
D7 D6 D5 D4 D3 D2 D1 D0
Reserved (Must be 0)
r4
R253 RP
r5
r6
r7
Register
Pointer
Figure 30. Register Pointer
(FDH: Read/Write)
D7 D6 D5 D4 D3 D2 D1 D0
GPR
R254 GPR
Figure 31. General-Purpose Register
(FEH: Read/Write)
D7 D6 D5 D4 D3 D2 D1 D0
Stack Pointer Lower
Byte (SP0-SP7)
R255 SPL
Figure 32. Stack Pointer
(FFH: Read/Write)

19
Z08617 NMOS Z8
®
8-BIT MCU
KEYBOARD CONTROLLER
INSTRUCTION SET NOTATION
Addressing Modes. The following notation is used to
describe the addressing modes and instruction opera-
tions as shown in the instruction summary.
Symbol Meaning
IRR Indirect register pair or indirect work-
ing- register pair address
Irr Indirect working-register pair only
X Indexed address
DA Direct address
RA Relative address
IM Immediate
R Register or working-register address
r Working-register address only
IR Indirect-register or indirect
working-register address
Ir Indirect working-register address only
RR Register pair or working register pair
address
Symbols. The following symbols are used in describing
the instruction set.
Symbol Meaning
dst Destination location or contents
src Source location or contents
cc Condition code
@ Indirect address prefix
SP Stack Pointer
PC Program Counter
FLAGS Flag register (Control Register 252)
RP Register Pointer (R253)
IMR Interrupt mask register (R251)
Flags. Control register (R252) contains the following six
flags:
Symbol Meaning
C Carry flag
Z Zero flag
S Sign flag
V Overflow flag
D Decimal-adjust flag
H Half-carry flag
Affected flags are indicated by:
0 Clear to zero
1 Set to one
* Set to clear according to operation
- Unaffected
x Undefined

Z08617 NMOS Z8
®
8-BIT MCU
KEYBOARD CONTROLLER
20
CONDITION CODES
Value Mnemonic Meaning Flags Set
1000 — Always True —
0111 C Carry C = 1
1111 NC No Carry C = 0
0110 Z Zero Z = 1
1110 NZ Not Zero Z = 0
1101 PL Plus S = 0
0101 MI Minus S = 1
0100 OV Overflow V = 1
1100 NOV No Overflow V = 0
0110 EQ Equal Z = 1
1110 NE Not Equal Z = 0
1001 GE Greater Than or Equal (S XOR V) = 0
0001 LT Less than (S XOR V) = 1
1010 GT Greater Than [Z OR (S XOR V)] = 0
0010 LE Less Than or Equal [Z OR (S XOR V)] = 1
1111 UGE Unsigned Greater Than or Equal C = 0
0111 ULT Unsigned Less Than C = 1
1011 UGT Unsigned Greater Than (C = 0 AND Z = 0) = 1
0011 ULE Unsigned Less Than or Equal (C OR Z) = 1
0000 F Never True (Always False) —
Table of contents
Other ZiLOG Controllers manuals
Popular Controllers manuals by other brands

Nibe
Nibe Climacool CoolLogic UCA/W quick start guide

Watlow
Watlow DIN-A-MITE SCR Power Controller Specifications

Trane
Trane Tracer VV550 Installation, operation and maintenance

Control Techniques
Control Techniques Unidrive M200 Step-by-step guide

CBS
CBS ArcSafe RSA-161A Installation and operation

Carel
Carel mchiller compact user guide

KONTRONIK
KONTRONIK BEAT Operation manual

Honeywell
Honeywell XL 800 Series Installation and commissioning instructions

Valcom
Valcom V-1092 Technical specifications

Rockwell Automation
Rockwell Automation GV3000/SE 230 Startup manual

ARIS
ARIS TENSOR I-ACT (PMR) Quick manual

Mitsubishi Electric
Mitsubishi Electric FX3U-1PSU-5V installation manual