![](http://datasheet.mmic.net.cn/290000/Z86E0412_datasheet_16189731/Z86E0412_26.png)
Z86E04/E08
CMOS Z8 OTP Microcontrollers
Zilog
26
P R E L I M I N A R Y
DS97Z8X0401
FUNCTIONAL DESCRIPTION
(Continued)
The Z86E04/E08 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 eight work-
ing register groups, each occupying 16 continuous loca-
tions. The Register Pointer (Figure 13) addresses the
starting location of the active working-register group.
Stack Pointer.
The Z86E04/E08 has an 8-bit Stack Point-
er (R255) used for the internal stack that resides within the
124 general-purpose registers.
General-Purpose Registers (GPR).
These registers are
undefined after the device is powered up. The registers
keep their last value after any reset, as long as the reset
occurs in the V
CC
voltage-specified operating range.
Note:
Register R254 has been designated as a general-purpose
register and is set to 00 Hex after any reset or Stop-Mode
Recovery.
Counter/Timer.
There are two 8-bit programmable
counter/timers (T0 and T1), each driven by its own 6-bit
programmable prescaler. The T1 prescaler is driven by in-
ternal or external clock sources; however, the T0 can be
driven by the internal clock source only (Figure 15).
The 6-bit prescalers 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 counter
and prescaler reach the end of count, a timer interrupt re-
quest 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 are
also programmed to stop upon reaching zero (Single-Pass
Mode) or to automatically reload the initial value and con-
tinue 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 is either the internal mi-
croprocessor clock divided by four, or an external signal in-
put through Port 3. The Timer Mode register configures the
external timer input (P31) as an external clock, a trigger in-
put that is retriggerable or non-retriggerable, or used as a
gate input for the internal clock.
Figure 13. Register Pointer
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
3F
30
4F
40
5F
50
6F
60
7F
70
*Expanded Register Group (0) is selected in this figure
by handling bits D3 to D0 as "0" in Register R253(RP).