Crimzon
®
Infrared Microcontrollers
ZLF645 Series Flash MCUs
with Learning Amplification
Product Specification
PS026407-0408
®
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.
PS026407-0408
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.
Page
Number
76
All
64, 65
74
160
9, 10
All
5, 6, 7,
171,
180, 182
79
68, 74
Date
April
2008
April
2008
Version Description
07
06
Updated
Enabling The Flash Byte Programming Interface
section
Deleted “Design Info” subsection and all of its associated
text.
Updated
Flash Memory Overview
section; updated
Figure 19.
Updated
Flash Frequency High and Low Byte Registers
section.
Updated Icc and Icc1 in
Table 81.
Updated notes in
Table 5
and
Table 6.
Removed “Preliminary” and “Precharacterization Product”
notice.
Added 20-pin QFN package to
Pin Description, Table 3,
Table 4, Packaging, Table 88,
and
Part Number
Description.
Change P31 to P32 at the beginning of
Universal
Asynchronous Receiver/Transmitter.
Updated
Flash Operation Timing Using Flash Frequency
Registers
and
Flash Frequency High and Low Byte
Registers.
Chapter
Reset and Power Management:
Updated
Table 69.
Replaced Advance with Preliminary and added
Precharacterization Product section. Updated
Table 81,
Table 82,
and
Table 83.
Updated
Memory and Registers
section; Added description
to
Stack.
Updated
ICP Interface
section;
Table 30,
Field for Bit 0
changed from RST to Reserved.
Updated
Reset and Power Management
section;
Watchdog Timer,
changed the Field for Bits 6 through Bits 4
from Reserved to Time-Out Select.
Minor updates throughout the document.
January 05
2008
January 04
2008
January 03
2008
August
2007
02
137
All
42
61
136
All
PS026407-0408
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
PS026407-0408able
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 . . . . . . . . . . . . . . . . . . . . . . . . . .
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 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Flash Operation Timing Using Flash Frequency Registers . . . . . . . . . .
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
62
63
63
64
64
65
66
68
68
68
69
70
70
71
71
72
72
73
74
75
Flash Byte Programming Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
Enabling The Flash Byte Programming Interface . . . . . . . . . . . . . . . . . . . . 76
Flash Byte Programming Interface Flash Access Restrictions . . . . . . . . . . 76
Infrared Learning Amplifier . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
PS026407-0408able
of ContentsTable able of
Table
Table of Contents