Crimzon
®
Infrared Microcontrollers
ZLF645 Series Flash MCUs
with Learning Amplification
Product Specification
PS026408-1208
®
Copyright ©2008 by Zilog , Inc. All rights reserved.
www.zilog.com
Warning:
DO NOT USE IN LIFE SUPPORT!
LIFE SUPPORT POLICY
ZILOG'S PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE
SUPPORT DEVICES OR SYSTEMS WITHOUT THE EXPRESS PRIOR WRITTEN APPROVAL OF
THE PRESIDENT AND GENERAL COUNSEL OF ZILOG CORPORATION.
As used herein
Life support devices or systems are devices which (a) are intended for surgical implant into the body, or (b)
support or sustain life and whose failure to perform when properly used in accordance with instructions for
use provided in the labeling can be reasonably expected to result in a significant injury to the user. A
critical component is any component in a life support device or system whose failure to perform can be
reasonably expected to cause the failure of the life support device or system or to affect its safety or
effectiveness.
Document Disclaimer
©2008 by Zilog, Inc. All rights reserved. Information in this publication concerning the devices,
applications, or technology described is intended to suggest possible uses and may be superseded. ZILOG,
INC. DOES NOT ASSUME LIABILITY FOR OR PROVIDE A REPRESENTATION OF ACCURACY
OF THE INFORMATION, DEVICES, OR TECHNOLOGY DESCRIBED IN THIS DOCUMENT.
Z I L O G A L S O D O E S N O T A S S U M E L I A B I L I T Y F O R I N T E L L E C T U A L P R O P E RT Y
INFRINGEMENT RELATED IN ANY MANNER TO USE OF INFORMATION, DEVICES, OR
TECHNOLOGY DESCRIBED HEREIN OR OTHERWISE. The information contained within this
document has been verified according to the general principles of electrical and mechanical engineering.
Z8 and Crimzon are registered trademarks of Zilog, Inc. All other product or service names are the
property of their respective owners.
PS026408-1208
ZLF645 Series Flash MCUs
Product Specification
iii
Revision History
Each instance in the revision history table reflects a change to this document from its pre-
vious revision. For more details, refer to the corresponding pages or appropriate links
given in the table below.
Date
Version Description
Updated formula in
Flash Controller
section.
Updated V
LVD
in
Table 80
and V
FLPE
in
Table 82
in
Electrical Characteristics
section.
Updated
Table 56
through
Table 59
in
Timers
section.
Added
Flash Programming through the ICP Interface
in
ICP Interface
section.
Added
Using the Watchdog Timer As a Stop Mode
Recovery Source
in
Reset and Power Management
section.
Updated
Flash Frequency High and Low Byte Registers
section and
Table 83.
Updated Port 1 pins in
Figure 1.
Updated
Enabling The Flash Byte Programming Interface
section.
Page
Number
67
165, 170
119
61
142
December 08
2008
79, 172
4
82
April 2008 07
April 2008 06
All
Deleted “Design Info” subsection and all of its associated
text.
67, 68
Updated
Flash Memory Overview
section; updated
Figure 19.
79
Updated
Flash Frequency High and Low Byte Registers
section.
165
Updated Icc and Icc1 in
Table 80.
9, 10
Updated notes in
Table 5
and
Table 6.
All
Removed “Preliminary” and “Precharacterization Product”
notice.
5, 6, 7,
Added 20-pin QFN package to
Pin Description, Table 3,
Table 4, Packaging, Table 87,
and
Part Number
176,
Description.
184, 186
Change P31 to P32 at the beginning of
Universal
85
Asynchronous Receiver/Transmitter.
Updated
Flash Code Protection Against External Access
and
Flash Frequency High and Low Byte Registers.
Chapter
Reset and Power Management:
Updated
Table
68.
73, 79
142
January
2008
January
2008
05
04
PS026408-1208
Revision History
ZLF645 Series Flash MCUs
Product Specification
iv
Table of Contents
Architectural Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Interrupt Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Additional Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Functional Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1
1
2
2
4
Pin Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
I/O Port Pin Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RESET (Input, Active Low) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Port 0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Port 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Port 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Port 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Comparator Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Comparator Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Port 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Port Configuration Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Port 0/1 Mode Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Port 0 Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Port 1 Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Port 2 Mode Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Port 2 Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Port 3 Mode Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Port 3 Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Port 4 Mode Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Port 4 Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Memory and Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Flash Program/Constant Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Register File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Stack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Register Pointer Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Linear Memory Addressing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Register Pointer Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Stack Pointer Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
18
18
20
21
22
23
28
28
28
30
31
32
33
34
35
36
37
39
40
41
41
42
42
45
45
48
48
PS026408-1208able
of ContentsTable able of
Table
Table of Contents
ZLF645 Series Flash MCUs
Product Specification
v
Register File Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
ICP Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Enabling ICP Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
State of ZLF645 in ICP Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Enabling Flash Accesses Through the ICP . . . . . . . . . . . . . . . . . . . . . . . . .
ICP Interface Logic Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ICP Interface Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ICP Data Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ICP Auto-Baud Detector/Generator . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ICP Serial Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ICP In-Circuit Programming Commands . . . . . . . . . . . . . . . . . . . . . . . . . .
Flash Programming through the ICP Interface . . . . . . . . . . . . . . . . . . . . . .
Differences Between CPU Based and ICP Based Flash Programming/
Erase Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Using ICP Commands for Flash Programming/Read Operations . . . . .
In-Circuit Programming Control Register Definitions . . . . . . . . . . . . . . . . . .
ICP Control Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
ICP Status Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
TEST Mode Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Exiting ICP Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Flash Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Flash Memory Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Flash Information Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Flash Controller Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Executing Flash Memory Accesses Through the Flash Controller . . . .
Flash Code Protection Against External Access . . . . . . . . . . . . . . . . . .
Flash Code Protection Against Accidental Program and Erasure . . . . .
Byte Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Page Erase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Mass Erase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Flash Control Register Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Flash Control Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Flash Status Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Flash Page Select Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Flash Sector Protect Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Flash Frequency High and Low Byte Registers . . . . . . . . . . . . . . . . . .
Flash Controller Functions Summary . . . . . . . . . . . . . . . . . . . . . . . . . .
53
53
53
54
54
54
55
55
56
57
61
61
61
64
64
65
66
66
67
67
68
69
69
73
73
74
74
75
75
75
77
77
78
79
80
Flash Byte Programming Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82
PS026408-1208able
of ContentsTable able of
Table
Table of Contents