ZILOG Z86K18

PRELIMINARY CUSTOMER PROCUREMENT SPECIFICATION
1
Z86K13/K14/K15
K16/K17/K18
1
CMOS Z8® 8-BIT MCU
KEYBOARD CONTROLLERS
FEATURES
Device
ROM
(KB)
I/O
Lines
Speed
(MHz)
Pin Count/
Package
Z86K13
2
32
4-5
Z86K14
3
32
4-5
Z86K15
4
32
4-5
Z86K16
2
32
4-5
Z86K17
3
32
4-5
Z86K18
4
32
4-5
40-DIP, 44-PLCC,
44-QFP, COB
40-DIP, 44-PLCC,
44-QFP, COB
40-DIP, 44-PLCC,
44-QFP, COB
40-DIP, 44-PLCC,
44-QFP, COB
40-DIP, 44-PLCC,
44-QFP, COB
40-DIP, 44-PLCC,
44-QFP, COB
■
4.5V to 5.5 V Operating Range
■
0°C to +70°C Operating Temperature Range
■
188 Bytes of Ram
■
Low-Power Consumption: 60 mW @ 5 MHz
■
Five Vectored, Priority Interrupts from FIve Different
Sources
■
A Programmable 8-Bit Counter/Timer, with 6-Bit
Programmable Prescaler
■
Power-On-Reset (POR) Timer, Hardware Watch-Dog
Timer (WDT)
■
Digital Inputs CMOS Levels with Internal Pull-Up
Resistors
■
Four Direct Connect LED Drive Ports
■
On-Chip RC Oscillator (Z86K13/14/15)
■
On-Chip Oscillator that Accepts a Crystal, Ceramic
Resonator, LC, or External Clock Drive (Z86K16/17/18)
■
Low System EMI Emission
GENERAL DESCRIPTION
The Z86KXX Keyboard Controllers are full-featured members of the Z8® MCU family offering a unique register-toregister architecture that avoids accumulator bottlenecks
and is more code efficient than RISC processors.
For keyboard applications demanding powerful I/O capabilities, the Z86KXX provides 32 pins dedicated to input
and output for row, column, clock, data, and LEDs.
The on-chip counter/timer is available to relieve the system
of administering real-time tasks.
Five different internal or external interrupt sources are
maskable and prioritized in which a vectored address is
provided for efficient interrupt subroutine handling and
multitasking functions.
The Z86K15 achieves low EMI by means of several modifications in the output drivers and clock circuitry of the device.
DS97KEY0204
PRELIMINARY
1
Z86K13/K14/K15/K16/K17/K18
CMOS Z8® 8-Bit MCU Keyboard Controllers
Zilog
GENERAL DESCRIPTION (Continued)
Circuit
Device
Power
Ground
VCC
VDD
GND
VSS
VCC
GND
VCC
Output Input
XTAL2
Connection
XTAL1
Notes: All signals with a preceding front slash, “/”, are
active Low. For example, B//W (WORD is active Low);
/B/W (BYTE is active Low, only). Power connections follow
conventional descriptions below:
4
4
3.3 V
VR
Machine
Timing & Inst.
Control
Port 3
WDT
D+
D-
USB SIE
and Trans
ALU
POR
Flags
Program
Memory
4 KB ROM
Counter/
Timers
Register
Pointer
Interrupt
Control
Register File
208 x 8-Bytes
Port 2
4
I/O
Input (Bit Programmable)
Program
Counter
Port 0
Port 1
8
8
Open-Drain
Output
Open-Drain
Output
Figure 1. Z86KXX Functional Block Diagram
2
PRELIMINARY
DS97KEY0204
Z86K13/K14/K15/K16/K17/K18
CMOS Z8® 8-Bit MCU Keyboard Controllers
Zilog
PIN DESCRIPTION
P30
P31
P32
P33
*NC
*NC
P27
P26
P25
P24
GND
VCC
P00
P01
P02
P03
P04
P05
P06
P07
1
40
Z86KXX
DIP
20
21
1
P23
P22
P21
P20
P37
P36
P35
P34
RCIN/XTAL1
AGND/XTAL2
GND
VCC
P17
P16
P15
P14
P13
P12
P11
P10
Notes:
*Pin 5 and 6 used for testing Ground during normal operation.
When Pin 5 is connected to VCC. Pin 6 is CLK OUT.
When Pin 5 is connected to GND, Pin 6 outputs nothing.
These pins must be tied to ground in application.
Figure 2. 40-Pin DIP Configuration
Table 1. 40-Pin DIP Pin Identification
Pin #
1-4
5-6
7-10
11
12
13-20
21-28
29
30
31
32
33-36
37-40
DS97KEY0204
Symbol
P30-P33
NC
P27-P24
GND
VCC
P00-P07
P10-P17
VCC
GND
AGND/XTAL2
RCIN/XTAL1
P34-P37
P20-P23
Function
Port 3, Pins 0,1,2,3
Tied to GND
Port 2, Pins 7,6,5,4
Ground
Power Supply
Port 0, Pins 0,1,2,3,4,5,6,7
Port 1, Pins 0,1,2,3,4,5,6,7
Power Supply
Ground
Analog Ground or Crystal Clock Out
RCIN/Crystal Oscillator Clock
Port 3, Pins 4,5,6,7
Port 2, Pins 0,1,2,3
PRELIMINARY
Direction
Input
In/Output
Input
Output
Output
Input
Output
Input
3
Z86K13/K14/K15/K16/K17/K18
CMOS Z8® 8-Bit MCU Keyboard Controllers
Zilog
NC
NC
P33
P32
P31
P30
P23
P22
P21
P20
P37
PIN DESCRIPTION (Continued)
6
1
40
39
7
Z86KXX
PLCC
17
29
28
18
NC
P36
P35
P34
RCIN/XTAL1
NC
AGND/XTAL2
GND
VCC
P17
NC
P04
P05
P06
P07
P10
P11
P12
P13
P14
P15
P16
NC
P27
P26
P25
P24
GND
VCC
P00
P01
P02
P03
Notes:
Pins 5 and 6 used for testing. Ground during normal operation
When Pin 43 is connected to VCC, Pin 44 is CLKOUT.
When Pin 43 is connected to GND. Pin 44 outputs nothing.
Figure 3. 44-Pin PLCC Pin Assignments
Table 2. 44-Pin PLCC Pin Assignments
Pin #
Symbol
Function
1-4
P30-P33
5-7
8-11
NC
P27-P24
12
13
GND
VCC
Port 3, Pins
Input
0,1,2,3
Test Pins (GND)
Port 2, Pins
In/Output
4,5,6,7
Ground
Power Supply
14-21
P00-P07
22-28
P10-P16
29
NC
4
Direction
Port 0, Pins
Output
0,1,2,3,4,5,6,7
Port 1, Pins
Output
0,1,2,3,4,5,6
Not Connected
Table 2. 44-Pin PLCC Pin Assignments
Pin #
Symbol
Function
Direction
30
31
P17
VCC
Port 1, Pin 7
Power Supply
Output
32
33
GND
Ground
AGND/ XTAL2 Analog Ground
or Crystal Clock
Out
NC
Not Connected
RCIN/ XTAL1 RCIN/Crystal Input
Oscillator Clock
P34-P37
Port 3, Pins
Output
4,5,6,7
NC
Not Connected
P37
Port 3, Pin 7
Output
P20-P23
Port 2, Pins
In/Output
0,1,2,3
34
35
36-38
39
40
41-44
PRELIMINARY
DS97KEY0204
Z86K13/K14/K15/K16/K17/K18
CMOS Z8® 8-Bit MCU Keyboard Controllers
NC
P36
P35
P34
RCIN/XTAL1
NC
AGND/XTAL2
GND
VCC
P17
NC
Zilog
33
23
22
34
P37
P20
P21
P22
P23
P30
P31
P32
P33
NC
NC
1
Z86KXX
QFP
12
44
11
NC
P27
P26
P25
P24
GND
VCC
P00
P01
P02
P03
1
P16
P15
P14
P13
P12
P11
P10
P07
P06
P05
P04
Notes:
Pins 43 and 44 are used for testing ground during normal operation.
When Pin 45 is connected to VCC, Pin 46 is CLKOUT.
When Pin 45 is connected to GND. Pin 46 outputs nothing.
Figure 4. 44-Pin QFP Pin Assignments
Table 3. 44-Pin QFP Pin Identification
Pin #
Symbol
Function
1
2-5
NC
P24-P27
6
7
GND
VCC
Not Connected
Port 2, Pins
4,5,6,7
Ground
Supply Voltage
8-15
P00-P07
16-22
P10-P16
23
24
25
NC
P17
VCC
Port 0, Pins
0,1,2,3,4,5,6,7,
Port 1, Pins
0,1,2,3,4,5,6
Not Connected
Port 1, Pin 7
Supply Voltage
Table 3. 44-Pin QFP Pin Identification
Direction
Pin #
Symbol
In/Output
26
27
GND
Ground
AGND/ XTAL2 Analog Ground/
Crystal Clock Out
NC
Not Connected
RCIN / XTAL1 RCIN/Crystal
Oscillator Clock
P34-P36
Port 3, Pins 4,5,6
NC
Not Connected
P37
Port 3, Pin 7
P20-P23
Port 2, Pins
0,1,2,3
P30-P33
Port 3, Pins
0,1,2,3
NC
Test Pins (GND)
28
29
Output
Output
30-32
33
34
35-38
Output
39-42
43-44
DS97KEY0204
PRELIMINARY
Function
Direction
Input
Output
Output
Input
Input
5
Z86K13/K14/K15/K16/K17/K18
CMOS Z8® 8-Bit MCU Keyboard Controllers
Zilog
ABSOLUTE MAXIMUM RATINGS
Symbol
Description
Min
Max
Units
VCC
Supply Voltage*
–0.3
+7.0
V
TSTG
Storage Temp
–65
+150
°C
TA
Oper Ambient Temp
0
+105
°C
Note: * Voltage on all pins with respect to GND.
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 extended periods
may affect device reliability.
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 5).
From Output
Under Test
150 pF
Figure 5. Test Load Diagram
CAPACITANCE
TA = 25°C; VCC = GND = 0V; f = 1.0 MHz; unmeasured pins returned to GND.
Parameter
Input Capacitance
Output Capacitance
I/O Capacitance
Max
12 pF
12 pF
12 pF
Frequency tolerance ±10%
6
PRELIMINARY
DS97KEY0204
Z86K13/K14/K15/K16/K17/K18
CMOS Z8® 8-Bit MCU Keyboard Controllers
Zilog
DC CHARACTERISTICS
VCC = 5.0V ± 10% @ 0°C to +70°C
Sym
Parameter
VCH
1
Min
Max
Typ*
Unit Condition
Clock Input High Voltage
0.7 VCC
VCC + 0.3V
2.5
V
Driven by External Clock Generator
VCL
Clock Input Low Voltage
GND –0.3
0.2 VCC
1.5
V
Driven by External Clock Generator
VIH
Input High Voltage
0.7 VCC
VCC + 0.3
2.5
V
VIL
Input Low Voltage
GND –0.3
0.2 VCC
1.5
V
VOH
Output High Voltage
VCC –0.4
4.7
V
IOH = –2.0 mA
VOH
Output High Voltage
VCC –0.6
V
IOH = –2.0 mA (see note 1 below.)
VOL
Output Low Voltage
.4
V
IOL= 4 mA
VOL
Output Low Voltage
.8
V
IOL= 4 mA (see note 1 below.)
IOL
Output Low
10
20
mA
VOL= VCC –2.2 V (see note 1, 2 below.)
IOL
Output Leakage
–1
1
<1
µA
VIN = 0V, 5.25V
ICC
VCC Supply Current
12
6
mA
@ 5.0 MHz
ICC1
Halt Mode Current
2
mA
@ 5.0 MHz
ICC2
Stop Mode Current
Rp
Pull Up Resistor
6.76
14.04
10.4
K ohm
Rp
Pull Up Resistor (P26-P27)
1.8
3
2.4
K ohm
µA
10
Notes:
* Typical @ 25°C
1. Ports P37-P34. These may be used for LEDs or as general-purpose outputs requiring high sink current.
2. Vcc = 5.0V ± 5% @ 0°C to + 70°C
DS97KEY0204
PRELIMINARY
7
Z86K13/K14/K15/K16/K17/K18
CMOS Z8® 8-Bit MCU Keyboard Controllers
Zilog
AC ELECTRICAL CHARACTERISTICS
VCC
Note[4]
No
Symbol
Parameter
1
2
3
4
5
6
7
8A
8B
9
10
11
12
13
TpC
TrC,TfC
TwC
TwTinL
TwTinH
TpTin
TrTin,
TwIL
TwIL
TwIH
Twsm
Tost
Twdt
TPOR
Input Clock Period
Clock Input Rise & Fall Times
Input Clock Width
Timer Input Low Width
Timer Input High Width
Timer Input Period
Timer Input Rise & Fall Timer
Int. Request Low Time
Int. Request Low Time
Int. Request Input High Time
STOP Mode Recovery Width Spec
Oscillator Start-up Time
Watch-Dog Timer Delay Time
Power--On Reset
5.0V
5.0V
5.0V
5.0V
5.0V
5.0V
5.0V
5.0V
5.0V
5.0V
5.0V
5.0V
5.0V
5.0V
TA = 0°C to 70°C
5 MHz
Min
Max
200
Units
250
25
ns
ns
ns
ns
100
ns
ns
37
70
2.5TpC
4TpC
70
3TpC
3TpC
5TpC
Notes
1
1
1
1
1
1
1,2
1,3
1,2
ns
5TpC
53
106
130
ms
ms
Notes:
1. Timing Reference uses 0.7 VCC for a logic 1 and 0.2 VCC for a logic 0.
2. Interrupt request through Port 3 (P31-P33).
3. Interrupt request through Port 3 (P30).
3
1
Clock
2
7
2
3
7
TIN
4
5
6
IRQN
8
9
Clock
Setup
11
Stop
Mode
Recovery
Source
10
Figure 6. Additional Timing
8
PRELIMINARY
DS97KEY0204
Z86K13/K14/K15/K16/K17/K18
CMOS Z8® 8-Bit MCU Keyboard Controllers
Zilog
PIN FUNCTIONS
RCIN. A precision resistor is connected between this pin
and the power supply to form the precision RC oscillator.
Port 0 (P07-P00). Port 0 is an 8-bit, CMOS-compatible
open-drain output (Figure 7).
CLKOUT. This pin is the system clock of the Z8 and runs
at the frequency of the RC oscillator (Test only).
®
(Open-Drain
Output)
8
Z86KXX
Port 0
Pad
Output
Figure 7. Port 0 Configuration
DS97KEY0204
PRELIMINARY
9
1
Z86K13/K14/K15/K16/K17/K18
CMOS Z8® 8-Bit MCU Keyboard Controllers
Zilog
Port 1 (P17-P10). Port 1 is an 8-bit CMOS compatible
open-drain output port (Figure 8).
Open-Drain
Output
Z86KXX
8
Port 1
Pad
Output
Figure 8. Port 1 Configuration
10
PRELIMINARY
DS97KEY0204
Z86K13/K14/K15/K16/K17/K18
CMOS Z8® 8-Bit MCU Keyboard Controllers
Zilog
Port 2 (P27-P20). Port 2 is an 8-bit CMOS compatible Port
with 4-bit input, 4-bit programmable I/O (Figure 9). P20-
P25 have 10.4K (±35%) pull-up resistors. P26-P27 have
2.4K (±25%) pull-up resistors.
1
Input
4
Z86KXX
I/O
VCC
(a) Ports P20-P23
Input
10.4 K
Pad
VCC
10.4 kOhm
OEN
Open-Drain
(b) Ports P24-P25
Pad
OUT
Input
IN
VCC
2.4K
OEN
Open-Drain
(c) Ports P26-P27
Pad
OUT
Input
IN
Figure 9. Port 2 Configuration
DS97KEY0204
PRELIMINARY
11
Z86K13/K14/K15/K16/K17/K18
CMOS Z8® 8-Bit MCU Keyboard Controllers
Zilog
PIN FUNCTIONS (Continued)
Port 3 (P37-P30). Port 3 is an 8-bit, CMOS-compatible
four-fixed input (P33-P30) and four-fixed output (P37-P34)
I/O port. Port 3 inputs have 10.4 Kohm pull-up resistors.
Outputs are capable of directly driving LED.
Port 3 is configured under software control to provide four
external interrupt request signals (IRQ0-IRQ3).
Z86KXX
Port 3
(a) Port 3 P34-P37
Output
Pad
(b) Port 3 P30-P33
10.4 kOhms
Input
Pad
Figure 10. Port 3 Configuration
12
PRELIMINARY
DS97KEY0204
Z86K13/K14/K15/K16/K17/K18
CMOS Z8® 8-Bit MCU Keyboard Controllers
Zilog
Program Memory. The 16-bit program counter addresses
4 KB of program memory space at internal locations (Figure 11).
The first 12 bytes of program memory are reserved for the
interrupt vectors. These locations have six 16-bit vectors
that correspond to the five available interrupts.
Byte 12 to byte 4095* consists of on-chip, mask programmed ROM. Addresses 4096* and greater are reserved. (*2048 for K13/K16, 3072 for K14/K17)
65535
Register File. The register file (Figure 13) consists of four
I/O port registers, 188 general-purpose registers (excluding P00-P03), and 11 control and status registers (R3-R0,
R191-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. In the 4-bit mode, the register
file is divided into nine working-register groups, each occupying 16 continuous locations. The Register Pointer addresses the starting location of the active working-register
group.
LOCATION
Reserved
2048/3072/4096
2047/3071/4095
On-Chip
ROM
IDENTIFIERS
R25
5
R25
4
R253
Stack Pointer (Bits 7-0)
R252
Program Control Flags
FLAGS
R251
Interrupt Mask Register
IMR
R250
Interrupt Request Register
IRQ
R249
Interrupt Priority Register
IPR
SPL
Reserved
Location of
First Byte of
Instruction
Executed 12
After RESET
11
Reserved
10
Reserved
9
IRQ4
R248
Reserved
8
IRQ4
R247
Port 3 Mode
P3M
7
IRQ3
R246
Port 2 Mode
P2M
6
IRQ3
R245
T0 Prescaler
PREQ
R244
Timer/Counter0
5
IRQ2
R243
Reserved
4
IRQ2
R242
Reserved
3
IRQ1
R241
Timer Mode
2
IRQ1
R240
Reserved
1
IRQ0
0
IRQ0
Interrupt
Vector
(Lower Byte)
Interrupt
Vector
(Upper Byte)
Register Pointer
RP
T0
TMR
Not Implemented
R 191
General-Purpose
Registers
Figure 11. Program Memory Map
R4
R253 RP
R3
Port 3
P3
R2
Port 2
P2
R1
Port 1
P1
R0
Port 0
P0
D7 D6 D5 D4 D3 D2 D1 D0
Note:* Will not be reset with a STOP Mode Recovery.
Reserved
Default setting after RESET = 00000000
Working Register
Group
Figure 13. Register File Configuration
Figure 12. Register Pointer Register
DS97KEY0204
PRELIMINARY
13
1
Z86K13/K14/K15/K16/K17/K18
CMOS Z8® 8-Bit MCU Keyboard Controllers
Zilog
PIN FUNCTIONS (Continued)
Z8 STANDARD CONTROL REGISTERS
REGISTER POINTER
7
6
5
4
3
2
Working Register
Group Pointer
1
REGISTER
0
Reserved Register
*
*
Z8 Reg. File
%FF
%FO
Not
available
%BF
% FF
SPL
% FE
Reserved
% FD
RP
% FC
FLAGS
% FB
IMR
% FA
IRQ
% F9
IPR
% F8
Reserved
% F7
P3M
% F6
P2M
% F5
PRE0
% F4
T0
% F3
Reserved
% F2
Reserved
% F1
TMR
% F0
Reserved
%0F
%00
REG. GROUP (0)
PORT REGISTERS
Note:
* Will not be reset with a
STOP Mode Recovery
% (0) 03
P3
% (0) 02
P2
% (0) 01
P1
% (0) 00
P0
Figure 14. Register File Architecture
14
PRELIMINARY
DS97KEY0204
Z86K13/K14/K15/K16/K17/K18
CMOS Z8® 8-Bit MCU Keyboard Controllers
Zilog
Counter/Timers. There is an 8-bit programmable
counter/timer (T0) driven by its own 6-bit programmable
prescaler (Figure 15).
The 6-bit prescalers can divide the input frequency of the
clock source by any integer number from 1 to 64. The prescaler drives its counter, which decrements the value (1 to
256) on the prescaler overflow. When both the counter and
prescaler reach the end of count, a timer interrupt request,
IRQ4, is generated.
The counter can be programmed to start, stop, restart to
continue, or restart from the initial value. The counter 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 prescaler, is read at any time without
disturbing its value or count mode.
Internal Data Bus
Write
OSC
÷4
Write
Read
PRE0
Initial Value
Register
T0
Initial Value
Register
6-Bit
Down
Counter
8-bit
Down
Counter
T0
Current Value
Register
IRQ4
Figure 15. Counter/Timers Block Diagram
DS97KEY0204
PRELIMINARY
15
1
Z86K13/K14/K15/K16/K17/K18
CMOS Z8® 8-Bit MCU Keyboard Controllers
Zilog
PIN FUNCTIONS (Continued)
Interrupts. The Z86K15 has five different interrupts from
five different sources. These interrupts are maskable and
prioritized (Figure 16). The five sources are divided as follows: four sources are claimed by Port 3 lines P33-P30,
and the other is claimed by the counter/timer. The Interrupt
Masked Register globally or individually enables or disables the five interrupts requests.
IRQ0-IRQ4
5
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
RC Oscillator. The Z86K13/14/15 provides an internal capacitor to accommodate an RC oscillator configuration. A
1% precision resistor is necessary to achieve ±10% accurate frequency oscillation.
IMR
5
Global
Interrupt
Enable
Interrupt
Request
IPR
When more than one interrupt is pending, priorities are resolved by a programmable priority encoder that is controlled by the Interrupt Priority register. All 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.
The Z86K15 also accepts external clock from (RCIN) with
(AGND) connected to VCC (Figure 17).
VCC
Priority
Logic
1%
Precision
Vector Select
RCIN
Figure 16. Interrupt Block Diagram
NC
CLKOUT
RC Oscillator
RCIN
VCC
AGND
External Clock
Figure 17. RC Oscillator Configuration
16
PRELIMINARY
DS97KEY0204
Z86K13/K14/K15/K16/K17/K18
CMOS Z8® 8-Bit MCU Keyboard Controllers
Zilog
Watch-Dog Timer. The Watch-Dog Timer is activated automatically by power-on if it is enabled in the Mask Option.
The WDT is a retriggerable one-shot timer that resets the
Z8 if it reaches its terminal count. The WDT is driven by the
system clock. It must be refreshed at least once during
each time cycle by executing the WDT instruction. WDT
can be enabled by Mask Option. (Figure 18)
WDT Hot bit. Bit 7 of the Interrupt Request register (IRQ
register FAH) determines whether a hot start or cold start
occurred. A cold start is defined as reset occurring from
power-up of the Z86K15 (the default upon power-up is 0).
A hot start occurs when a WDT time-out has occurred (bit
7 is set to 1). Bit 7 of the IRQ register is read-only and is
automatically reset to 0 when read.
294912ms
-.
Watch-Dog Timer . The WDT time-out is --------------------------f ( Hz )
WDT During HALT (D5-R250). This bit determines whether or not the WDT is active during HALT Mode. The default
is 1, and a 1 indicates active during HALT.
VCC
18 Tpc
Internal
Reset
Reset
Delay
POR
* Reset Delay = POR 147 ms ±10% at 4 MHz.
Figure 18. WDT Turn-On Timing After Reset
DS97KEY0204
PRELIMINARY
17
1
Z86K13/K14/K15/K16/K17/K18
CMOS Z8® 8-Bit MCU Keyboard Controllers
Zilog
PIN FUNCTIONS (Continued)
Power-On-Reset (POR). A timer circuit is triggered by the
system oscillator and is used for the Power-On Reset
(POR) timer function. The POR time allows VCC and the oscillator circuit to stabilize before instruction execution begins. POR period is defined as:
POR (ms) =
589824
f(Hz)
FF
6F
NOP
STOP
FF
7F
NOP
HALT
; clear the pipeline
; enter STOP Mode
or
; clear the pipeline
; enter HALT Mode
R250 IRQ
The POR timer circuit is a one-shot timer triggered by one
of two conditions:
D7 D6 D5 D4 D3 D2 D1 D0
IRQ0 = P32 Input
IRQ1 = P33 Input
IRQ2 = P31 Input
IRQ3 = P30 Input
IRQ4 = TO
1. Power fail to Power OK status
2. Stop-Mode Recovery
WDT during HALT
0 OFF *
1 ON
The POR time is a nominal 147 ms ±10%. At 4 MHz the
POR timer is bypassed after Stop-Mode Recovery.
HALT. HALT turns off the internal CPU clock, but not the
RC oscillator. The counter/timer and external interrupts
IRQ0, IRQ1, IRQ2, and IRQ3 remain active. The Z86K15
is recovered by interrupts, either externally or internally
(Figure 19).
STOP. This instruction turns off the internal clock and oscillator. It reduces the standby current to less than 10 µA.
The STOP Mode is terminated by a reset only or external
reset. This causes the processor to restart the application
program at address 000C (HEX) or the active external interrupt vector. 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=FFH) immediately before the appropriate sleep instruction, such as:
Stop Flag
0 POR/WDT*
1 Stop Recovery
WDT Hot Bit (Read Only)
0 POR*
1 WDT Timeout
* On RESET
Figure 19. IRQ Register
The Bit 6 of IRQ Registers are flags for STOP Mode Recovery (Figure 20).
Cold or Warm Start (D6). This bit is set upon entering
STOP Mode. A 0 (cold) indicates that the device is awakened by a POR/WDT RESET. A 1 (warm) indicates that
the device is awakened by a SMR source. This bit is reset
when read.
Negative transition on any of the designated row input pins
or host data line will recover Z86KXX from STOP Mode.
To Internal
RESET
P20-P26,
P30-P33
Figure 20. Stop-Mode Recovery Source
18
PRELIMINARY
DS97KEY0204
Z86K13/K14/K15/K16/K17/K18
CMOS Z8® 8-Bit MCU Keyboard Controllers
Zilog
Z8® CONTROL REGISTER DIAGRAMS
D7 D6 D5 D4 D3 D2 D1 D0
D7 D6 D5 D4 D3 D2 D1 D0
0 = No Function
1 = Load T0
Reserved
0 = Disable T0 Count
1 = Enable T0 Count
P24-P27 I/O Definition
0 Defines Bit as OUTPUT
1 Defines Bit as INPUT
Reserved (Must be 0)
Port 2 Mode Register
Figure 24. (F6H: Write Only)
Figure 21. Timer Mode Register
(F1H: Read/Write)
R247 P3M
R244 T0
D7 D6
1
R246 P2M
R241 TMR
D7 D6 D5 D4 D3 D2 D1 D0
D5 D4 D3 D2 D1 D0
0 Port (24-27) Open-Drain
1 Port (24-27) Push-Pull
T0 Initial Value
(When WRITE)
(Range: 1-256 Decimal
01-00 HEX)
T0 Current Value
(When READ)
Reserved (Must be 0)
Port 2 Open Drain Mode Register
Figure 25. (F7H: Write Only)
Counter/Timer 0 Register
Figure 22. (F4H: Read/Write)
R249 IPR
R245 PRE0
D7 D6 D5 D4 D3 D2 D1 D0
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
Count Mode
0 = T0 Single Pass
1 = T0 Modulo N
Reserved (Must be 0)
Prescaler Modulo
(Range: 1-64 Decimal
01-00 HEX)
IRQ1, IRQ4 Priority (Group C)
0 = IRQ1 > IRQ4
1 = IRQ4 > IRQ1
IRQ0, IRQ2 Priority (Group B)
0 = IRQ2 > IRQ0
1 = IRQ0 > IRQ2
Prescaler 0 Register
Figure 23. (F5H: Write Only)
Reserved
Reserved (Must be 0)
Figure 26. Interrupt Priority Register
(F9H: Write Only)
DS97KEY0204
PRELIMINARY
19
Z86K13/K14/K15/K16/K17/K18
CMOS Z8® 8-Bit MCU Keyboard Controllers
Zilog
R250 IRQ
R252 Flags
D7 D6 D5 D4 D3 D2 D1 D0
D7 D6 D5 D4 D3 D2 D1
D0
IRQ0 = P32 Input
IRQ1 = P33 Input
IRQ2 = P31 Input
IRQ3 = P30 Input
IRQ4 = TO
User Flag F1
User Flag F2
Half Carry Flag
Stop Delay
0 OFF *
1 ON
Decimal Adjust Flag
Overflow Flag
Stop Flag
0 POR/WDT*
1 Stop Recovery
Sign Flag
Zero Flag
WDT Hot Bit (Read Only)
0 POR*
1 WDT Timeout
* On RESET
Carry Flag
Figure 29. Flag Register
(FCH: Read/Write)
Figure 27. Interrupt Request Register
(FAH: Read/Write)
R253 RP
R251 IMR
D7 D6 D5 D4 D3 D2 D1 D0
D7 D6 D5
D4 D3 D2 D1 D0
Working Registers
1 Enables IRQ0-IRQ4
(D0= IRQ0)
r4
r5
Reserved (Must be 0)
Register
Pointer
r6
1 Enables Interrupts
r7
Figure 28. Interrupt Mask Register
(FBH: Read/Write)
Register Pointer
Figure 30. (FDH: Read/Write)
R255 SPL
D7 D6 D5 D4 D3 D2 D1 D0
Stack Pointer Lower
Byte (SP0-SP7)
Stack Pointer
Figure 31. (FFH: Read/Write)
20
PRELIMINARY
DS97KEY0204
Z86K13/K14/K15/K16/K17/K18
CMOS Z8® 8-Bit MCU Keyboard Controllers
Zilog
PACKAGE INFORMATION
1
Figure 32. 40-Pin DIP Package Diagram
Figure 33. 44-Pin PLCC Package Diagram
DS97KEY0204
PRELIMINARY
21
Z86K13/K14/K15/K16/K17/K18
CMOS Z8® 8-Bit MCU Keyboard Controllers
Zilog
Figure 34. 44-Pin QFP Package Diagram
22
PRELIMINARY
DS97KEY0204
Z86K13/K14/K15/K16/K17/K18
CMOS Z8® 8-Bit MCU Keyboard Controllers
Zilog
ORDERING INFORMATION
5 MHz
40-Pin DIP
Z86KXX05PSC
5 MHz
44-Pin PLCC
Z86KXX05VSC
5 MHz
44-Pin QFP
Z86KXX05FSC
1
For fast results, contact your local Zilog sales office for assistance in ordering the part desired.
CODES
Package
Environmental
P = Plastic DIP
V = Plastic Leaded Chip Carrier
F = Quad Flat Pack
C = Plastic Standard
Temperature
S = 0°C to +70°C
Speed
05 = 5 MHz
Example:
Z 86K15 05 P S C
is a Z86K15, 05 MHz, DIP, 0° to +70°C, Plastic Standard Flow
Environmental Flow
Temperature
Package
Speed
Product Number
Zilog Prefix
© 1997 by Zilog, Inc. All rights reserved. No part of this
document may be copied or reproduced in any form or by
any means without the prior written consent of Zilog, Inc.
The information in this document is subject to change
without notice. Devices sold by Zilog, Inc. are covered by
warranty and patent indemnification provisions appearing
in Zilog, Inc. Terms and Conditions of Sale only. Zilog, Inc.
makes no warranty, express, statutory, implied or by
description, regarding the information set forth herein or
regarding the freedom of the described devices from
intellectual property infringement. Zilog, Inc. makes no
warranty of merchantability or fitness for any purpose.
Zilog, Inc. shall not be responsible for any errors that may
appear in this document. Zilog, Inc. makes no commitment
to update or keep current the information contained in this
document.
DS97KEY0204
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
FAX 408 370-8056
Internet: http://www.zilog.com
PRELIMINARY
23
Z86K13/K14/K15/K16/K17/K18
CMOS Z8® 8-Bit MCU Keyboard Controllers
24
Zilog
PRELIMINARY
DS97KEY0204