2004
applications, or technology described is intended to suggest possible uses and may be superseded. ZiLOG,
INC. DOES NOT ASSUME LIABILITY FOR OR PROVIDE
THE INFORMA
ALSO DOES NOT ASSUME LIABILITY FOR INTELLECTU
RELA
DESCRIBED HEREIN OR O
limitation of liability pro
mak
es no w
ZiLOG, use of information, de
authorized. No licenses are conve
property rights.
gistered trademark of ZiLOG Inc. in the United States and in other countries.
by ZiLOG, Inc.
TION, DEVICES, OR TECHN
TED IN
ANY MANNER TO USE OF INFORMA
arranty of merchantability or fi
All rights reserv
THER
visions appearing in the ZiLOG, Inc. Terms and Conditions of Sale. ZiLOG, Inc.
vices, or technology as critical components of life support systems is not
yed, implicitly or otherwise, by this document under an
ed. Information in this publication concerning the de
A REPRESENTATION OF ACCURA
OLOGY DESCRIBED IN
AL PR
TION, DEVICES, OR TECHN
WISE. De
vices sold by ZiLOG, Inc. are covered by w
tness for an
y purpose Except with the e
All other products
y are associated.
THIS DOCUMENT
OPER
TY INFRINGEMENT
xpress written approval of
y intellectual
vices,
CY OF
. ZiLOG
OLOGY
arranty and
UM001602-0904
Revision History
Z8 CPU
User Manual
iii
Date
Sept.
2
004
Each instance in Table 1
ous re
vision. To see more detail, click the appropriate link in the table.
The ZiLOG Z8 microcontroller (MCU) product line continues to expand
with new product introductions. ZiLOG MCU products are targeted for
cost-sensitive, high-volume applications including consumer, automotive,
security, and HVAC. It includes ROM-based products geared for highvolume production (where software is stable) and one-time programmable (OTP) equivalents for prototyping as well as volume production
where time to market or code flexibility is critical (see Table 1 on page 4).
A variety of packaging options are available including plastic DIP, SOIC,
PLCC, and QFP.
A generalized Z8 CPU® block diagram is shown in Figure 1. The same
on-chip peripherals are used across the MCU product line with the primary differences being the amount of ROM/RAM, number of I/O lines
present, and packaging/temperature ranges available. This allows code
written for one MCU device to be easily ported to another family member.
Z8 CPU
User Manual
1
Key Features
General-Purpose Register File. Every RAM register acts like an accumulator, speeding instruction execution and maximizing coding efficiency. Working register groups allow fast context switching.
Flexible I/O. I/O byte, nibble, and/or bit programmable as inputs or outputs. Outputs are software programmable as open-drain or push–pull on a
port basis. Inputs are Schmitt-triggered with autolatches to hold unused
inputs at a known voltage state.
Analog Inputs. Three input pins are software programmable as digital or
analog inputs. When in analog mode, two comparator inputs are provided
with a common reference input. These inputs are ideal for a variety of
common functions, including threshold level detection, analog-to-digital
UM001602-0904Z8 CPU Product Overview
Z8 Family of Microcontrollers
User Manual
2
conversion, and short circuit detection. Each analog input provides a
unique maskable interrupt input.
Timer/Counter. The Timer/Counter (T/C) consists of a programmable 6bit prescaler and 8-bit downcounter, with maskable interrupt upon end-ofcount. Software controls T/C load/start/stop, countdown read (at any time
on the fly), and maskable end-of-count interrupt. Special functions available include TIN (external counter input, external gate input, or external
trigger input) and T
system clock.) These special functions allow accurate hardware input
pulse measurement and output waveform generation.
Interrupts. There are six vectored interrupt sources with software-programmable enable and priority for each of the six sources.
Watch–Dog Timer. An internal Watch–Dog Timer (WDT) circuit is
included as a fail-safe mechanism so that if software strays outside the
bounds of normal operation, the WDT will time-out and reset the MCU.
To maximize circuit robustness and reliability, the default WDT clock
source is an internal RC circuit (isolated from the device clock source).
(external access to timer output or the internal
OUT
Auto Reset/Low-Voltage Protection. All family devices have internal
Power-On Reset. ROM devices add low-voltage protection. Low-voltage
protection ensures the MCU is in a known state at all times (in active
RUN mode or RESET) without external hardware (or a device reset pin).
Low-EMI Operation. Mode is programmable via software or as a mask
option. This new option provides for reduced radiated emission via clock
and output drive circuit changes.
Low-Power. CMOS with two standby modes; STOP and HALT.
Full Z8 Instruction Set. Forty-eight basic instructions, supported by six
addressing modes with the ability to operate on bits, nibbles, bytes, and
words.
Z8 CPU Product OverviewUM001602-0904
Z8 CPU
User Manual
3
Output
Port 3
Counter/
Timers (2)
Interrupt
Control
Analog
Comparators
(2)
Input
V
CC
Register File
256 x 8-Bit
GND
ALU
FLAG
Register
Pointer
XTAL
AS DS
Machine Timing
& Instruction Control
RESET, WDT,
POR
Prg. Memory
512/K x 8-Bit
Program
Counter
R/W RESET
Port 2
I/O
(Bit Programmable)
Port 0
44
Address or I/O
(Nibble Programmable)
Port 1
8
Address/Data or I/O
(Byte Programmable)
Figure 1. Z8 CPU Block Diagram
UM001602-0904Z8 CPU Product Overview
Z8 Family of Microcontrollers
User Manual
4
Product Development Support
The Z8® MCU product line is fully supported with a range of cross
assemblers, C compilers, ICEBOX emulators, single and gang OTP/
EPROM programmers, and software simulators.
The Z86CCP01ZEM low-cost Z8 CCP™ real-time emulator/programmer
kit was designed specifically to support all of the products outlined in
Table 1.
Table 1. ZiLOG General-Purpose Microcontroller Product Family
ROM/
Product
Z86C03512/6014126FYYY818
Z86E03512/6014126FYNY818
Z86C041K/12414226FYYY818
Z86E041K/12414226FYNY818
Z86C061K/12414226PYYY1218
Z86E061K/12414226PYNY1218
Z86C082K/12414226FYYY1218
Z86E082K/12414226FYNY1218
Z86C304K/23624226PYYY1228
Z86E304K/23624226PYNY1228
Z86C312K/12424226PYYY828
Z86E312K/12424226PYNY828
Z86C404K/23632226PYYY1640/44
Z86E404K/23632226PYNY1640/44
*Note: Z86Cxx signify ROM devices; 86xx signify EPROM devices; F = fixed; P = programmable
RAMI/0T/CANINTWDT POR V
BO
RC
Speed
(MHz)
Pin
Count
Z8 CPU Product OverviewUM001602-0904
Z8 CPU
User Manual
The Z86CCP01ZEM kit comes with:
•
Z8 CCP Evaluation Board
•
Z8 CCP Power Cable
•
ZiLOG Developer’s Studio (ZDS) CD-ROM , Including WindowsBased GUI Host Software
•
1999 ZiLOG Technical Library
•
Z8 CCP User Manual
A Z8 CCP Emulator Accessory Kit (Z8CCP00ZAC) is also available and
provides an RS-232 cable and power cable along with the 28- and 40- pin
ZIF sockets and 28- and 40- pin target connector cables required to emulate/program 28/40 pin devices.
5
UM001602-0904Z8 CPU Product Overview
Z8 Family of Microcontrollers
User Manual
6
Z8 CPU Product OverviewUM001602-0904
Address Space
Introduction
Four address spaces are available for the Z8® CPU:
•
The Z8® Standard Register File contains addresses for peripheral,
control, all general-purpose, and all I/O port registers. This is the
default register file specification.
•
The Z8
trol and data registers for additional peripherals/features.
•
Z8 external program memory contains addresses for all memory locations having executable code and/or data.
®
Expanded Register File (ERF) contains addresses for con-
Z8 CPU
User Manual
7
•
Z8 external data memory contains addresses for all memory locations
that hold data only, whether internal or external.
Z8 CPU Standard Register File
The Z8
ters). The register file consists of 4 I/O ports (00h–03h), 236 GeneralPurpose Registers (04h–EFh), and 16 control registers (F0h–FFh).
Table 2 shows the layout of the register file, including register names,
locations, and identifiers.
Table 2. Z8 Standard Register File
UM001602-0904Address Space
®
Standard Register File totals up to 256 consecutive bytes (Regis-
Registers can be accessed as either 8-bit or 16-bit registers using Direct,
Indirect, or Indexed Addressing. All 236 general-purpose registers can be
Address SpaceUM001602-0904
Z8 CPU
User Manual
referenced or modified by any instruction that accesses an 8-bit register,
without the requirement for special instructions. Registers accessed as 16
bits are treated as even-odd register pairs (there are 118 valid pairs). In
this case, the data’s Most Significant Byte (MSB) is stored in the even
numbered register, while the Least Significant Byte (LSB) goes into the
next higher odd numbered register. See Figure 2.
9
MSB
Rn Rn+1
n = Even Address
Figure 2. 16-Bit Register Addressing
LSB
By using a logical instruction and a mask, individual bits within registers
can be accessed for bit set, bit clear, bit complement, or bit test operations. For example, the instruction AND R15, MASK performs a bit clear
operation. Figure 3 shows this example.
0 1 1 1 0 0 0 0
1 1 0 1 1 1 1 1
AND R15, DFh ;Clear Bit 5 of Working Register 15
0 1 0 1 0 0 0 0
R15
MASK
R15
Figure 3. Accessing Individual Bits (Example)
UM001602-0904Address Space
Z8 Family of Microcontrollers
User Manual
10
When instructions are executed, registers are read when defined as
sources and written when defined as destinations. All General-Purpose
Registers function as accumulators, address pointers, index registers,
stack areas, or scratch pad memory.
General-Purpose Registers
General-Purpose Registers (GPR) 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 VCC voltage-specified operating range. It will not keep
its last state from a VLV reset if VCC drops below 1.8v.
Note:
Registers in Bank E0-EF may only be accessed through the working register and indirect addressing modes. Direct access cannot be used because
the 4-bit working register address mode already uses the format [E | dst],
where dst represents the working register number from 0h to Fh.
RAM Protect
The upper portion of the register file address space 80h to EFh (excluding
the control registers) may be protected from reading and writing. The
RAM Protect bit option is mask-programmable and is selected by the customer when the ROM code is submitted. After the mask option is
selected, the user activates this feature from the internal ROM code to
turn off/on the RAM Protect by loading either a 0 or 1 into the IMR register, bit D6. A 1 in D6 enables RAM Protect. Only devices that use registers 80h to EFh offer this feature.
Working Register Groups
Z8 instructions can access 8-bit registers and register pairs (16-bit words)
using either 4-bit or 8-bit address fields. 8-bit address fields refer to the
actual address of the register. For example, Register 58h is accessed by
calling upon its 8-bit binary equivalent, 01011000 (58h).
With 4-bit addressing, the register file is logically divided into 16 Working Register Groups of 16 registers each, as shown in Table 3. These 16
Address SpaceUM001602-0904
Z8 CPU
User Manual
registers are known as Working Registers. A Register Pointer (one of the
control registers, FDh) contains the base address of the active Working
Register Group. The high nibble of the Register Pointer determines the
current Working Register Group.
When accessing one of the Working Registers, the 4-bit address of the
Working Register is combined within the upper four bits (high nibble) of
the Register Pointer, thus forming the 8-bit actual address. Figure 4 illustrates this operation. Because working registers are typically specified by
short format instructions, there are fewer bytes of code required, which
reduces execution time. In addition, when processing interrupts or changing tasks, the Register Pointer speeds context switching. A special Set
Register Pointer (SRP) instruction sets the contents of the Register
Pointer.
Table 3. Working Register Groups
11
Register Pointer
(FDh) High Nibble
1111bFF0–FF
1110bEE0–EF
1101bDD0–DF
1100bCC0–CF
1011bBB0–BF
1010bAA0–AF
1001b990–9F
1000b880–8F
0111b770–7F
0110b660–6F
0101b550–5F
0100b440–4F
UM001602-0904Address Space
Working Register
Group (Hex)
Actual Registers
(Hex)
Z8 Family of Microcontrollers
User Manual
12
Table 3. Working Register Groups (Continued)
Register Pointer
(FDh) High Nibble
0011b330–3F
0010b220–2F
0001b110–1F
0000b000–0F
0 1 1 1 0 0 0 0
1 1 0 1 1 1 1 1
0 1 1 1 0 1 1 0
Figure 4. Working Register Addressing Examples
Working Register
Group (Hex)
Register Pointer (FDh), Standard Register File
INC R6 (instruction, short format)
Actual register address (76h)
Actual Registers
(Hex)
Address SpaceUM001602-0904
Loading...
+ 318 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.