MC68HC705KJ1CDW [FREESCALE]

Computer Operation Properly Module; 电脑操作正确模块
MC68HC705KJ1CDW
型号: MC68HC705KJ1CDW
厂家: Freescale    Freescale
描述:

Computer Operation Properly Module
电脑操作正确模块

外围集成电路 光电二极管 电脑 微控制器 可编程只读存储器 时钟
文件: 总108页 (文件大小:718K)
中文:  中文翻译
下载:  下载PDF数据表文档文件
MC68HC705KJ1  
MC68HRC705KJ1  
MC68HLC705KJ1  
Data Sheet  
M68HC05  
Microcontrollers  
MC68HC705KJ1  
Rev. 4.1  
07/2005  
freescale.com  
MC68HC705JK1  
MC68HRC705KJ1  
MC68HLC705KJ1  
Data Sheet  
To provide the most up-to-date information, the revision of our documents on the World Wide Web will be  
the most current. Your printed copy may be an earlier revision. To verify you have the latest information  
available, refer to:  
http://freescale.com  
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc.  
© Freescale Semiconductor, Inc., 2005. All rights reserved.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
3
Revision History  
The following revision history table summarizes changes contained in this document. For your  
convenience, the page number designators have been linked to the appropriate location.  
Revision History  
Revision  
Level  
Page  
Number(s)  
Date  
Description  
Figure 1-4. Crystal Connections with Oscillator Internal Resistor Mask  
Option — changed PA7 designator to OSC1 in two places  
17  
17  
18  
18  
Figure 1-5. Crystal Connections without Oscillator Internal Resistor Mask  
Option — changed PA7 designator to OSC1 in two places  
Figure 1-6. Ceramic Resonator Connections with Oscillator Internal  
Resistor Mask Option — changed PA7 designator to OSC1 in two places  
April, 2002  
3.0  
Figure 1-7. Ceramic Resonator Connections without Oscillator Internal  
Resistor Mask Option — changed PA7 designator to OSC1 in two places  
Figure 1-8. External Clock Connections — changed PA7 designator to  
OSC1 in two places  
19  
105  
Figure B-1. Crystal Connections — added OSC2 designation  
Table B-3. MC68HLC705KJ1 (Low Frequency) Order Numbers —  
Corrected table title  
106  
Reformatted to new publications standards.  
Throughout  
102  
May, 2003  
July, 2005  
4.0  
4.1  
Figure A-2. Typical Internal Operating Frequency for Various VDD at 25°C  
— RC Oscillator Option Only — replaced graph  
Updated to meet Freescale identity guidelines.  
Throughout  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
4
List of Chapters  
Chapter 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13  
Chapter 2 Memory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21  
Chapter 3 Computer Operating Properly Module (COP) . . . . . . . . . . . . . . . . . . . . . . . . . . .29  
Chapter 4 Central Processor Unit (CPU). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .33  
Chapter 5 External Interrupt Module (IRQ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .51  
Chapter 6 Low-Power Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .57  
Chapter 7 Parallel I/O Ports (PORTS) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63  
Chapter 8 Resets and Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71  
Chapter 9 Multifunction Timer Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79  
Chapter 10 Electrical Specifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .85  
Chapter 11 Ordering Information and Mechanical Specifications . . . . . . . . . . . . . . . . . . .97  
Appendix A MC68HRC705KJ1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101  
Appendix B MC68HLC705KJ1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .105  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
5
List of Chapters  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
6
Table of Contents  
Chapter 1  
Introduction  
1.1  
1.2  
1.3  
Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13  
Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14  
Programmable Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15  
Pin Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15  
1.4  
1.4.1  
VDD and VSS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16  
1.4.2  
OSC1 and OSC2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16  
Crystal Oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16  
Ceramic Resonator Oscillator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17  
RC Oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18  
External Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19  
RESET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19  
IRQ/VPP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19  
PA0–PA7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19  
PB2 and PB3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19  
1.4.2.1  
1.4.2.2  
1.4.2.3  
1.4.2.4  
1.4.3  
1.4.4  
1.4.5  
1.4.6  
Chapter 2  
Memory  
2.1  
2.2  
2.3  
2.4  
2.5  
2.6  
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21  
Unimplemented Memory Locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21  
Reserved Memory Locations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21  
Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21  
Input/Output Register Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23  
RAM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25  
2.7  
EPROM/OTPROM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25  
EPROM/OTPROM Programming. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25  
EPROM Programming Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26  
EPROM Erasing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26  
2.7.1  
2.7.2  
2.7.3  
2.8  
2.9  
Mask Option Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27  
EPROM Programming Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28  
Chapter 3  
Computer Operating Properly Module (COP)  
3.1  
3.2  
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29  
Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29  
3.3  
Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29  
COP Watchdog Timeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29  
COP Watchdog Timeout Period. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29  
Clearing the COP Watchdog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30  
3.3.1  
3.3.2  
3.3.3  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
7
Table of Contents  
3.4  
3.5  
Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30  
COP Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30  
3.6  
3.6.1  
3.6.2  
Low-Power Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30  
Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30  
Wait Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31  
Chapter 4  
Central Processor Unit (CPU)  
4.1  
4.2  
4.3  
4.4  
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33  
Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33  
CPU Control Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33  
Arithmetic/Logic Unit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33  
4.5  
CPU Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35  
Accumulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35  
Index Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35  
Stack Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35  
Program Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36  
Condition Code Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36  
4.5.1  
4.5.2  
4.5.3  
4.5.4  
4.5.5  
4.6  
4.6.1  
Instruction Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37  
Addressing Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37  
Inherent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37  
Immediate. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37  
Direct . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37  
Extended . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37  
Indexed, No Offset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38  
Indexed, 8-Bit Offset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38  
Indexed, 16-Bit Offset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38  
Relative. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38  
Instruction Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39  
Register/Memory Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39  
Read-Modify-Write Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40  
Jump/Branch Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40  
Bit Manipulation Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42  
Control Instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42  
Instruction Set Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43  
4.6.1.1  
4.6.1.2  
4.6.1.3  
4.6.1.4  
4.6.1.5  
4.6.1.6  
4.6.1.7  
4.6.1.8  
4.6.2  
4.6.2.1  
4.6.2.2  
4.6.2.3  
4.6.2.4  
4.6.2.5  
4.6.3  
4.7  
Opcode Map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48  
Chapter 5  
External Interrupt Module (IRQ)  
5.1  
5.2  
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51  
Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51  
5.3  
5.3.1  
5.3.2  
Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51  
IRQ/VPP Pin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51  
Optional External Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52  
5.4  
5.5  
IRQ Status and Control Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54  
Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
8
Freescale Semiconductor  
Chapter 6  
Low-Power Modes  
6.1  
6.2  
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57  
Exiting Stop and Wait Modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57  
6.3  
6.3.1  
Effects of Stop and Wait Modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58  
Clock Generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58  
STOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58  
WAIT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58  
CPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58  
STOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58  
WAIT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58  
COP Watchdog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58  
STOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59  
WAIT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59  
Timer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59  
STOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59  
WAIT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59  
EPROM/OTPROM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59  
STOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60  
WAIT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60  
6.3.1.1  
6.3.1.2  
6.3.2  
6.3.2.1  
6.3.2.2  
6.3.3  
6.3.3.1  
6.3.3.2  
6.3.4  
6.3.4.1  
6.3.4.2  
6.3.5  
6.3.5.1  
6.3.5.2  
6.4  
6.5  
Data-Retention Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60  
Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60  
Chapter 7  
Parallel I/O Ports (PORTS)  
7.1  
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63  
7.2  
Port A. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64  
Port A Data Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64  
Data Direction Register A. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64  
Pulldown Register A. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65  
Port LED Drive Capability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66  
Port A I/O Pin Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66  
7.2.1  
7.2.2  
7.2.3  
7.2.4  
7.2.5  
7.3  
Port B. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66  
Port B Data Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66  
Data Direction Register B. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67  
Pulldown Register B. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68  
7.3.1  
7.3.2  
7.3.3  
7.4  
I/O Port Electrical Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69  
Chapter 8  
Resets and Interrupts  
8.1  
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71  
8.2  
Resets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71  
Power-On Reset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72  
External Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72  
COP Watchdog Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73  
Illegal Address Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73  
8.2.1  
8.2.2  
8.2.3  
8.2.4  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
9
Table of Contents  
8.3  
Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73  
8.3.1  
8.3.2  
8.3.3  
8.3.3.1  
8.3.3.2  
8.3.4  
Software Interrupt. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73  
External Interrupt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73  
Timer Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75  
Real-Time Interrupt. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75  
Timer Overflow Interrupt. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75  
Interrupt Processing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75  
Chapter 9  
Multifunction Timer Module  
9.1  
9.2  
9.3  
9.4  
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79  
Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79  
Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79  
Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80  
9.5  
9.5.1  
9.5.2  
I/O Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81  
Timer Status and Control Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81  
Timer Counter Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82  
9.6  
9.6.1  
9.6.2  
Low-Power Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83  
Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83  
Wait Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83  
Chapter 10  
Electrical Specifications  
10.1 Maximum Ratings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85  
10.2 Operating Temperature Range . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85  
10.3 Thermal Characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85  
10.4 Power Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86  
10.5 5.0-V DC Electrical Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87  
10.6 3.3-V DC Electrical Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88  
10.7 Driver Characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89  
10.8 Typical Supply Currents. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91  
10.9 EPROM Programming Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92  
10.10 Control Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92  
Chapter 11  
Ordering Information and Mechanical Specifications  
11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97  
11.2 MCU Order Numbers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97  
11.3 16-Pin PDIP — Case #648 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98  
11.4 16-Pin SOIC — Case #751G. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98  
11.5 16-Pin Cerdip — Case #620A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
10  
Freescale Semiconductor  
Appendix A  
MC68HRC705KJ1  
A.1  
A.2  
A.3  
A.4  
A.5  
A.6  
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101  
RC Oscillator Connections. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101  
Typical Internal Operating Frequency for RC Oscillator Option. . . . . . . . . . . . . . . . . . . . . . . . 102  
RC Oscillator Connections (No External Resistor) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103  
Typical Internal Operating Frequency Versus Temperature (No External Resistor) . . . . . . . . 104  
Package Types and Order Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104  
Appendix B  
MC68HLC705KJ1  
B.1  
B.2  
B.3  
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105  
DC Electrical Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105  
Package Types and Order Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
11  
Table of Contents  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
12  
Chapter 1  
Introduction  
1.1 Features  
Features on the MC68HC705KJ1 include:  
Robust noise immunity  
4.0-MHz internal operating frequency at 5.0 V  
1240 Bytes of EPROM/OTPROM (electrically programmable read-only memory/one-time  
programmable read-only memory), including eight bytes for user vectors  
64 bytes of user RAM  
Peripheral modules:  
15-stage multifunction timer  
Computer operating properly (COP) watchdog  
10 bidirectional input/output (I/O) lines, including:  
10-mA sink capability on all I/O pins  
Software programmable pulldowns on all I/O pins  
Keyboard scan with selectable interrupt on four I/O pins  
5.5-mA source capability on six I/O pins  
Selectable sensitivity on external interrupt (edge- and level-sensitive or edge-sensitive only)  
On-chip oscillator with connections for:  
Crystal  
Ceramic resonator  
Resistor-capacitor (RC) oscillator (MC68HRC705KJ1) with or without external resistor  
External clock  
Low-speed (32-kHz) crystal (MC68HLC705KJ1)  
Memory-mapped I/O registers  
Fully static operation with no minimum clock speed  
Power-saving stop, halt, wait, and data-retention modes  
External interrupt mask bit and acknowledge bit  
Illegal address reset  
Internal steering diode and pullup resistor from RESET pin to VDD  
Selectable EPROM security(1)  
Selectable oscillator bias resistor  
1. No security feature is absolutely secure. However, Freescale’s strategy is to make reading or copying the EPROM/OTPROM  
difficult for unauthorized users.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
13  
Introduction  
1.2 Structure  
OSC1  
OSC2  
15-STAGE  
MULTIFUNCTION  
TIMER SYSTEM  
INTERNAL  
OSCILLATOR  
DIVIDE  
BY ³2  
WATCHDOG AND  
ILLEGAL ADDRESS  
DETECT  
CPU CONTROL  
ALU  
RESET  
68HC05 CPU  
PB3(1)  
IRQ/VPP  
ACCUMULATOR  
CPU REGISTERS  
INDEX REGISTER  
PB2(1)  
STK PTR  
0 0 0 0 0 0 0 0 1 1  
PROGRAM COUNTER  
CONDITION CODE  
PA7  
1 1 1 H I N Z C  
REGISTER  
PA6  
PA5  
PA4  
STATIC RAM (SRAM) – 64 BYTES  
PA3(1) (2)  
PA2(1) (2)  
PA1(1) (2)  
PA0(1) (2)  
USER EPROM – 1240 BYTES  
10-mA sink capability on all I/O pins  
Notes:  
1. 5.5 mA source capability  
2. External interrupt capability  
MASK OPTION REGISTER (MOR)  
Figure 1-1. Block Diagram  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
14  
Programmable Options  
1.3 Programmable Options  
The options in Table 1-1 are programmable in the mask option register.  
Table 1-1. Programmable Options  
Feature  
COP watchdog timer  
Option  
Enabled or disabled  
External interrupt triggering  
Port A IRQ pin interrupts  
Port pulldown resistors  
Edge-sensitive only or edge- and level-sensitive  
Enabled or disabled  
Enabled or disabled  
STOP instruction mode  
Crystal oscillator internal resistor  
EPROM security  
Stop mode or halt mode  
Enabled or disabled  
Enabled or disabled  
Short oscillator delay counter  
Enabled or disabled  
1.4 Pin Functions  
Pin assignments are shown in Figure 1-2 with the functions described in the following subsections.  
RESET  
OSC1  
OSC2  
PB3  
IRQ/VPP  
PA0  
1
2
3
4
5
6
7
8
16  
15  
14  
13  
12  
11  
10  
9
PA1  
PA2  
PA3  
PA4  
PA5  
PA6  
PB2  
VDD  
VSS  
PA7  
Figure 1-2. Pin Assignments  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
15  
Introduction  
1.4.1 V and V  
DD  
SS  
VDD and VSS are the power supply and ground pins. The MCU operates from a single power supply.  
Very fast signal transitions occur on the MCU pins, placing high, short-duration current demands on the  
power supply. To prevent noise problems, take special care, as Figure 1-3 shows, by placing the bypass  
capacitors as close as possible to the MCU. C2 is an optional bulk current bypass capacitor for use in  
applications that require the port pins to source high current levels.  
V+  
VDD  
VDD  
C2  
C1  
+
C1  
0.1 µF  
MCU  
C2  
VSS  
VSS  
Figure 1-3. Bypassing Layout Recommendation  
1.4.2 OSC1 and OSC2  
The OSC1 and OSC2 pins are the connections for the on-chip oscillator. The oscillator can be driven by  
any of the following:  
1. Standard crystal (See Figure 1-4 and Figure 1-5.)  
2. Ceramic resonator (See Figure 1-6 and Figure 1-7.)  
3. Resistor/capacitor (RC) oscillator (Refer to Appendix A MC68HRC705KJ1.)  
4. External clock signal as shown in (See Figure 1-8.)  
5. Low speed (32 kHz) crystal connections (Refer to Appendix B MC68HLC705KJ1.)  
The frequency, fOSC, of the oscillator or external clock source is divided by two to produce the internal  
operating frequency, fOP  
.
1.4.2.1 Crystal Oscillator  
Figure 1-4 and Figure 1-5 show a typical crystal oscillator circuit for an AT-cut, parallel resonant crystal.  
Follow the crystal supplier’s recommendations, as the crystal parameters determine the external  
component values required to provide reliable startup and maximum stability. The load capacitance  
values used in the oscillator circuit design should include all stray layout capacitances.  
To minimize output distortion, mount the crystal and capacitors as close as possible to the pins. An  
internal startup resistor of approximately 2 Mis provided between OSC1 and OSC2 for the crystal  
oscillator as a programmable mask option.  
NOTE  
Use an AT-cut crystal and not an AT-strip crystal because the MCU can  
overdrive an AT-strip crystal.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
16  
Freescale Semiconductor  
Pin Functions  
VSS  
MCU  
C3  
OSC1  
OSC2  
XTAL  
C4  
XTAL  
C3  
27 pF  
C4  
27 pF  
VDD  
C2 C1  
VSS  
Figure 1-4. Crystal Connections with  
Oscillator Internal Resistor Mask Option  
VSS  
C3  
MCU  
OSC1  
R
XTAL  
C4  
R
10 MΩ  
OSC2  
VDD  
XTAL  
C3  
27 pF  
C4  
27 pF  
C2 C1  
VSS  
Figure 1-5. Crystal Connections without  
Oscillator Internal Resistor Mask Option  
1.4.2.2 Ceramic Resonator Oscillator  
To reduce cost, use a ceramic resonator instead of the crystal. The circuits shown in Figure 1-6 and  
Figure 1-7 show ceramic resonator circuits. Follow the resonator manufacturer’s recommendations, as  
the resonator parameters determine the external component values required for maximum stability and  
reliable starting. The load capacitance values used in the oscillator circuit design should include all stray  
capacitances.  
Mount the resonator and components as close as possible to the pins for startup stabilization and to  
minimize output distortion. An internal startup resistor of approximately 2 Mis provided between OSC1  
and OSC2 as a programmable mask option.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
17  
Introduction  
VSS  
MCU  
C3  
OSC1  
OSC2  
CERAMIC  
RESONATOR  
C4  
C3  
27 pF  
C4  
27 pF  
VDD  
C2 C1  
VSS  
Figure 1-6. Ceramic Resonator Connections with  
Oscillator Internal Resistor Mask Option  
VSS  
C3  
MCU  
OSC1  
R
R
OSC2  
10 MΩ  
C4  
VDD  
CERAMIC  
RESONATOR  
C2 C1  
C4  
C3  
27 pF  
27 pF  
VSS  
Figure 1-7. Ceramic Resonator Connections without  
Oscillator Internal Resistor Mask Option  
1.4.2.3 RC Oscillator  
Refer to Appendix A MC68HRC705KJ1.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
18  
Pin Functions  
1.4.2.4 External Clock  
An external clock from another CMOS-compatible device can be connected to the OSC1 input, with the  
OSC2 input not connected, as shown in Figure 1-8. This configuration is possible regardless of whether  
the crystal/ceramic resonator or the RC oscillator is enabled.  
MCU  
EXTERNAL  
CMOS CLOCK  
Figure 1-8. External Clock Connections  
1.4.3 RESET  
Applying a logic 0 to the RESET pin forces the MCU to a known startup state. An internal reset also pulls  
the RESET pin low. An internal resistor to VDD pulls the RESET pin high. A steering diode between the  
RESET and VDD pins discharges any RESET pin voltage when power is removed from the MCU. The  
RESET pin contains an internal Schmitt trigger to improve its noise immunity as an input. Refer to  
Chapter 8 Resets and Interrupts for more information.  
1.4.4 IRQ/V  
PP  
The external interrupt/programming voltage pin (IRQ/VPP) drives the asynchronous IRQ interrupt function  
of the CPU. Additionally, it is used to program the user EPROM and mask option register. (See  
Chapter 2 Memory and Chapter 5 External Interrupt Module (IRQ).)  
The LEVEL bit in the mask option register provides negative edge-sensitive triggering or both negative  
edge-sensitive and low level-sensitive triggering for the interrupt function.  
If level-sensitive triggering is selected, the IRQ/VPP input requires an external resistor to VDD for wired-OR  
operation. If the IRQ/VPP pin is not used, it must be tied to the VDD supply.  
The IRQ/VPP pin contains an internal Schmitt trigger as part of its input to improve noise immunity. The  
voltage on this pin should not exceed VDD except when the pin is being used for programming the  
EPROM.  
NOTE  
The mask option register can enable the PA0PA3 pins to function as  
external interrupt pins.  
1.4.5 PA0–PA7  
These eight input/output (I/O) lines comprise port A, a general-purpose bidirectional I/O port. (See  
Chapter 5 External Interrupt Module (IRQ) for information on PA0–PA3 external interrupts.)  
1.4.6 PB2 and PB3  
These two I/O lines comprise port B, a general-purpose bidirectional I/O port.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
19  
Introduction  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
20  
Chapter 2  
Memory  
2.1 Introduction  
This section provides:  
Memory map (Figure 2-1)  
Summary of the input/output registers (Figure 2-2)  
Description of:  
Random-access memory (RAM)  
EPROM/OTPROM (electrically programmable read-only memory/one-time programmable  
read-only memory)  
Mask option register  
Memory features include:  
1232 Bytes of User EPROM, Plus Eight Bytes for User Vectors  
64 Bytes of User RAM  
2.2 Unimplemented Memory Locations  
Accessing an unimplemented location can have unpredictable effects on MCU operation. In Figure 2-2  
and in register figures in this document, unimplemented locations are shaded.  
2.3 Reserved Memory Locations  
Accessing a reserved location can have unpredictable effects on MCU operation. In Figure 2-2 and in  
register figures in this document, reserved locations are marked with the word Reserved or with the  
letter R.  
2.4 Memory Map  
See Figure 2-1.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
21  
Memory  
PORT A DATA REGISTER (PORTA)  
PORT B DATA REGISTER (PORTB)  
$0000  
$0001  
$0002  
$0003  
$0004  
$0005  
$0006  
$0007  
$0008  
$0009  
$000A  
$000B  
UNIMPLEMENTED  
DATA DIRECTION REGISTER A (DDRA)  
DATA DIRECTION REGISTER B (DDRB)  
UNIMPLEMENTED  
TIMER STATUS AND CONTROL REGISTER (TSCR)  
TIMER CONTROL REGISTER (TCR)  
$0000  
IRQ STATUS AND CONTROL REGISTER (ISCR)  
I/O REGISTERS  
32 BYTES  
$001F  
$0020  
UNIMPLEMENTED  
$000F  
$0010  
$0011  
$0012  
UNIMPLEMENTED  
160 BYTES  
PULLDOWN REGISTER PORT A (PDRA)  
PULLDOWN REGISTER PORT B (PDRB)  
$00BF  
$00C0  
RAM  
64 BYTES  
UNIMPLEMENTED  
EPROM PROGRAMMING REGISTER (EPROG)  
UNIMPLEMENTED  
$00FF  
$0100  
$0017  
$0018  
$0019  
UNIMPLEMENTED  
512 BYTES  
$02FF  
$0300  
$001E  
$001F  
EPROM  
1232 BYTES  
RESERVED  
$07CF  
$07D0  
COP REGISTER (COPR)(1)  
$07F0  
$07F1  
$07F2  
UNIMPLEMENTED  
30 BYTES  
MASK OPTION REGISTER (MOR)  
$07ED  
$07EE  
$07EF  
$07F0  
RESERVED  
TEST ROM  
2 BYTES  
$07F7  
$07F8  
$07F9  
$07FA  
$07FB  
$07FC  
$07FD  
$07FE  
$07FF  
TIMER INTERRUPT VECTOR HIGH  
TIMER INTERRUPT VECTOR LOW  
EXTERNAL INTERRUPT VECTOR HIGH  
EXTERNAL INTERRUPT VECTOR LOW  
SOFTWARE INTERRUPT VECTOR HIGH  
SOFTWARE INTERRUPT VECTOR LOW  
RESET VECTOR HIGH  
REGISTERS AND EPROM  
16 BYTES  
$07FF  
RESET VECTOR LOW  
Note 1. Writing to bit 0 of $07F0 clears the COP watchdog.  
Figure 2-1. Memory Map  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
22  
Input/Output Register Summary  
2.5 Input/Output Register Summary  
Addr.  
Register Name  
Bit 7  
6
5
4
3
2
1
Bit 0  
Read:  
Port A Data Register  
PA7  
PA6  
PA5  
PA4  
PA3  
PA2  
PA1  
PA0  
$0000  
(PORTA) Write:  
See page 64.  
Reset:  
Read:  
Unaffected by reset  
0
0
Refer to Chapter 7 Paral-  
lel I/O Ports (PORTS)  
Refer to Chapter 7 Paral-  
lel I/O Ports (PORTS)  
Port B Data Register  
PB3  
PB2  
$0001  
(PORTB) Write:  
See page 66.  
Reset:  
Unaffected by reset  
$0002  
$0003  
Unimplemented  
Unimplemented  
Read:  
Data Direction Register A  
DDRA7 DDRA6 DDRA5 DDRA4 DDRA3 DDRA2 DDRA1 DDRA0  
$0004  
$0005  
(DDRA) Write:  
See page 64.  
Reset:  
Read:  
0
0
0
0
0
0
0
DDRB3  
0
0
DDRB2  
0
0
0
Refer to Chapter 7 Paral-  
lel I/O Ports (PORTS)  
Refer to Chapter 7 Paral-  
lel I/O Ports (PORTS)  
Data Direction Register B  
(DDRB) Write:  
See page 67.  
Reset:  
0
0
0
0
0
0
$0006  
$0007  
Unimplemented  
Unimplemented  
Read:  
TOF  
RTIF  
0
0
Timer Status and Control  
TOIE  
RTIE  
RT1  
RT0  
$0008  
$0009  
$000A  
Register (TSCR) Write:  
See page 81.  
Reset:  
TOFR  
0
RTIFR  
0
0
0
0
0
1
1
Read:  
TCR7  
TCR6  
TCR5  
TCR4  
TCR3  
TCR2  
TCR1  
TCR0  
Timer Counter Register  
(TCR) Write:  
See page 82.  
Reset:  
Read:  
0
IRQE  
1
0
0
0
0
0
0
0
0
0
0
0
0
0
IRQF  
IRQ Status and Control Reg-  
ister (ISCR) Write:  
See page 54.  
Reset:  
R
0
IRQR  
0
0
0
0
0
0
= Unimplemented  
R = Reserved  
U = Unaffected  
Figure 2-2. I/O Register Summary (Sheet 1 of 2)  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
23  
Memory  
Addr.  
$000B  
Register Name  
Unimplemented  
Bit 7  
6
5
4
3
2
1
Bit 0  
$000F  
Unimplemented  
Read:  
Pulldown Register Port A  
$0010  
$0011  
(PDRA) Write: PDIA7  
PDIA6  
0
PDIA5  
0
PDIA4  
0
PDIA3  
0
PDIA2  
0
PDIA1  
0
PDIA0  
0
See page 65.  
Reset:  
Read:  
0
Pulldown Register Port B  
Refer to Chapter 7 Paral-  
lel I/O Ports (PORTS)  
Refer to Chapter 7 Paral-  
lel I/O Ports (PORTS)  
(PDRB) Write:  
PDIB3  
0
PDIB2  
0
See page 68.  
Reset:  
0
0
0
0
0
0
$0012  
Unimplemented  
Unimplemented  
$0017  
Read:  
Write:  
Reset:  
0
0
0
R
0
0
R
0
0
R
0
0
R
0
EPROM Programming  
Register (EPROG)  
See page 26.  
ELAT  
0
MPGM  
0
EPGM  
0
$0018  
$0019  
Unimplemented  
Unimplemented  
Reserved  
$001E  
$001F  
$07F0  
$07F1  
R
R
U
R
U
R
R
R
R
R
Read:  
Write:  
Reset:  
Read:  
Write:  
Reset:  
COP Register (COPR)  
See page 30.  
COPC  
0
U
U
U
U
U
SOSCD  
EPMSEC OSCRES  
SWAIT  
PDI  
PIRQ  
LEVEL  
COPEN  
Mask Option Register (MOR)  
See page 27.  
Unaffected by reset  
R = Reserved  
= Unimplemented  
U = Unaffected  
Figure 2-2. I/O Register Summary (Sheet 2 of 2)  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
24  
RAM  
2.6 RAM  
The 64 addresses from $00C0 to $00FF serve as both the user RAM and the stack RAM. Before  
processing an interrupt, the CPU uses five bytes of the stack to save the contents of the CPU registers.  
During a subroutine call, the CPU uses two bytes of the stack to store the return address. The stack  
pointer decrements when the CPU stores a byte on the stack and increments when the CPU retrieves a  
byte from the stack.  
NOTE  
Be careful when using nested subroutines or multiple interrupt levels. The  
CPU may overwrite data in the RAM during a subroutine or during the  
interrupt stacking operation.  
2.7 EPROM/OTPROM  
An MCU with a quartz window has 1240 bytes of erasable, programmable ROM (EPROM). The quartz  
window allows EPROM erasure with ultraviolet light.  
NOTE  
Keep the quartz window covered with an opaque material except when  
erasing the MCU. Ambient light can affect MCU operation.  
In an MCU without the quartz window, the EPROM cannot be erased and serves as 1240 bytes of  
one-time programmable ROM (OTPROM).  
The following addresses are user EPROM/OTPROM locations:  
$0300–$07CF  
$07F8–$07FF, used for user-defined interrupt and reset vectors  
The COP register (COPR) is an EPROM/OTPROM location at address $07F0.  
The mask option register (MOR) is an EPROM/OTPROM location at address $07F1.  
2.7.1 EPROM/OTPROM Programming  
The two ways to program the EPROM/OTPROM are:  
Manipulating the control bits in the EPROM programming register to program the  
EPROM/OTPROM on a byte-by-byte basis  
Programming the EPROM/OTPROM with the M68HC705J In-Circuit Simulator (M68HC705JICS)  
available from Freescale  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
25  
Memory  
2.7.2 EPROM Programming Register  
The EPROM programming register (EPROG) contains the control bits for programming the  
EPROM/OTPROM.  
Address:  
$0018  
Bit 7  
0
6
5
0
4
0
3
2
ELAT  
0
1
MPGM  
0
Bit 0  
EPGM  
0
Read:  
Write:  
Reset:  
0
0
R
R
0
R
0
R
0
0
0
= Unimplemented  
R
= Reserved  
Figure 2-3. EPROM Programming Register (EPROG)  
ELAT — EPROM Bus Latch Bit  
This read/write bit latches the address and data buses for EPROM/OTPROM programming. Clearing  
the ELAT bit automatically clears the EPGM bit. EPROM/OTPROM data cannot be read while the  
ELAT bit is set. Reset clears the ELAT bit.  
1 = Address and data buses configured for EPROM/OTPROM programming the EPROM  
0 = Address and data buses configured for normal operation  
MPGM — MOR Programming Bit  
This read/write bit applies programming power from the IRQ/VPP pin to the mask option register. Reset  
clears MPGM.  
1 = Programming voltage applied to MOR  
0 = Programming voltage not applied to MOR  
EPGM — EPROM Programming Bit  
This read/write bit applies the voltage from the IRQ/VPP pin to the EPROM. To write the EPGM bit, the  
ELAT bit must be set already. Reset clears EPGM.  
1 = Programming voltage (IRQ/VPP pin) applied to EPROM  
0 = Programming voltage (IRQ/VPP pin) not applied to EPROM  
NOTE  
Writing logic 1s to both the ELAT and EPGM bits with a single instruction  
sets ELAT and clears EPGM. ELAT must be set first by a separate  
instruction.  
Bits [7:3] — Reserved  
Take the following steps to program a byte of EPROM/OTPROM:  
1. Apply the programming voltage, VPP, to the IRQ/VPP pin.  
2. Set the ELAT bit.  
3. Write to any EPROM/OTPROM address.  
4. Set the EPGM bit and wait for a time, tEPGM  
5. Clear the ELAT bit.  
.
2.7.3 EPROM Erasing  
The erased state of an EPROM bit is logic 0. Erase the EPROM by exposing it to 15 Ws/cm2 of ultraviolet  
light with a wavelength of 2537 angstroms. Position the ultraviolet light source one inch from the EPROM.  
Do not use a shortwave filter.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
26  
Freescale Semiconductor  
Mask Option Register  
2.8 Mask Option Register  
The mask option register (MOR) is an EPROM/OTPROM byte that controls the following options:  
COP watchdog (enable or disable)  
External interrupt pin triggering (edge-sensitive only or edge- and level-sensitive)  
Port A external interrupts (enable or disable)  
Port pulldown resistors (enable or disable)  
STOP instruction (stop mode or halt mode)  
Crystal oscillator internal resistor (enable or disable)  
EPROM security (enable or disable)  
Short oscillator delay (enable or disable)  
Take the following steps to program the mask option register (MOR):  
1. Apply the programming voltage, VPP, to the IRQ/VPP pin.  
2. Write to the MOR.  
3. Set the MPGM bit and wait for a time, tMPGM  
4. Clear the MPGM bit.  
.
5. Reset the MCU.  
Address:  
$07F1  
Bit 7  
6
5
4
3
2
1
Bit 0  
Read:  
Write:  
Reset:  
SOSCD  
EPMSEC OSCRES  
SWAIT  
SWPDI  
PIRQ  
LEVEL  
COPEN  
Unaffected by reset  
Figure 2-4. Mask Option Register (MOR)  
SOSCD — Short Oscillator Delay Bit  
The SOSCD bit controls the oscillator stabilization counter. The normal stabilization delay following  
reset or exit from stop mode is 4064 tcyc. Setting SOSCD enables a 128 tcyc stabilization delay.  
1 = Short oscillator delay enabled  
0 = Short oscillator delay disabled  
EPMSEC — EPROM Security Bit  
The EPMSEC bit controls access to the EPROM/OTPROM.  
1 = External access to EPROM/OTPROM denied  
0 = External access to EPROM/OTPROM not denied  
OSCRES — Oscillator Internal Resistor Bit  
The OSCRES bit enables a 2-Minternal resistor in the oscillator circuit.  
1 = Oscillator internal resistor enabled  
0 = Oscillator internal resistor disabled  
NOTE  
Program the OSCRES bit to logic 0 in devices using low-speed crystal or  
RC oscillators with external resistor.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
27  
Memory  
SWAIT — Stop-to-Wait Conversion Bit  
The SWAIT bit enables halt mode. When the SWAIT bit is set, the CPU interprets the STOP instruction  
as a WAIT instruction, and the MCU enters halt mode. Halt mode is the same as wait mode, except  
that an oscillator stabilization delay of 1 to 4064 tcyc occurs after exiting halt mode.  
1 = Halt mode enabled  
0 = Halt mode not enabled  
SWPDI — Software Pulldown Inhibit Bit  
The SWPDI bit inhibits software control of the I/O port pulldown devices. The SWPDI bit overrides the  
pulldown inhibit bits in the port pulldown inhibit registers.  
1 = Software pulldown control inhibited  
0 = Software pulldown control not inhibited  
PIRQ — Port A External Interrupt Bit  
The PIRQ bit enables the PA0–PA3 pins to function as external interrupt pins.  
1 = PA0–PA3 enabled as external interrupt pins  
0 = PA0–PA3 not enabled as external interrupt pins  
LEVEL —External Interrupt Sensitivity Bit  
The LEVEL bit controls external interrupt triggering sensitivity.  
1 = External interrupts triggered by active edges and active levels  
0 = External interrupts triggered only by active edges  
COPEN — COP Enable Bit  
The COPEN bit enables the COP watchdog.  
1 = COP watchdog enabled  
0 = COP watchdog disabled  
2.9 EPROM Programming Characteristics  
Table 2-1. EPROM Programming Characteristics(1)  
Characteristic  
Symbol  
Min  
16.0  
—¦  
Typ  
16.5  
3.0  
Max  
17.0  
10.0  
Unit  
Programming Voltage  
IRQ/VPP  
VPP  
V
Programming Current  
IRQ/VPP  
IPP  
mA  
ms  
Programming Time  
Per Array Byte  
MOR  
t
EPGM  
4
4
t
MPGM  
1. VDD = 5.0 Vdc 10%, VSS = 0 Vdc, T = –40°C to +85°C  
A
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
28  
Chapter 3  
Computer Operating Properly Module (COP)  
3.1 Introduction  
The computer operating properly (COP) watchdog resets the MCU in case of software failure. Software  
that is operating properly periodically services the COP watchdog and prevents COP reset. The COP  
watchdog function is programmable by the COPEN bit in the mask option register.  
3.2 Features  
The computer operating properly module (COP) includes these features:  
Protection from runaway software  
Wait mode and halt mode operations  
3.3 Operation  
Operation of the COP module is discussed here.  
3.3.1 COP Watchdog Timeout  
Four counter stages at the end of the timer make up the COP watchdog. The COP resets the MCU if the  
timeout period occurs before the COP watchdog timer is cleared by application software and the IRQ/VPP  
pin voltage is between VSS and VDD. Periodically clearing the counter starts a new timeout period and  
prevents COP reset. A COP watchdog timeout indicates that the software is not executing instructions in  
the correct sequence.  
NOTE  
The internal clock drives the COP watchdog. Therefore, the COP watchdog  
cannot generate a reset for errors that cause the internal clock to stop.  
The COP watchdog depends on a power supply voltage at or above a  
minimum specification and is not guaranteed to protect against brownout.  
3.3.2 COP Watchdog Timeout Period  
The COP watchdog timer function is implemented by dividing the output of the real-time interrupt circuit  
(RTI) by eight. The RTI select bits in the timer status and control register control RTI output, and the  
selected output drives the COP watchdog. (See timer status and control register in Chapter 9  
Multifunction Timer Module.)  
NOTE  
The minimum COP timeout period is seven times the RTI period. The COP  
is cleared asynchronously with the value in the RTI divider; hence, the COP  
timeout period will vary between 7x and 8x the RTI period.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
29  
Computer Operating Properly Module (COP)  
3.3.3 Clearing the COP Watchdog  
To clear the COP watchdog and prevent a COP reset, write a logic 0 to bit 0 (COPC) of the COP register  
at location $07F0 (see Figure 3-1). Clearing the COP bit disables the COP watchdog timer regardless of  
the IRQ/VPP pin voltage.  
If the main program executes within the COP timeout period, the clearing routine should be executed only  
once. If the main program takes longer than the COP timeout period, the clearing routine must be  
executed more than once.  
NOTE  
Place the clearing routine in the main program and not in an interrupt  
routine. Clearing the COP watchdog in an interrupt routine might prevent  
COP watchdog timeouts even though the main program is not operating  
properly.  
3.4 Interrupts  
The COP watchdog does not generate interrupts.  
3.5 COP Register  
The COP register (COPR) is a write-only register that returns the contents of EPROM location $07F0  
when read.  
Address:  
$07F0  
Bit 7  
6
5
4
3
2
1
Bit 0  
Read:  
Write:  
Reset:  
COPC  
0
U
U
U
U
U
U
U
= Unimplemented  
U = Unaffected  
Figure 3-1. COP Register (COPR)  
COPC — COP Clear Bit  
This write-only bit resets the COP watchdog. Reading address $07F0 returns undefined results.  
3.6 Low-Power Modes  
The STOP and WAIT instructions have the following effects on the COP watchdog.  
3.6.1 Stop Mode  
The STOP instruction clears the COP watchdog counter and disables the clock to the COP watchdog.  
NOTE  
To prevent the STOP instruction from disabling the COP watchdog,  
program the stop-to-wait conversion bit (SWAIT) in the mask option register  
to logic 1.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
30  
Freescale Semiconductor  
Low-Power Modes  
Upon exit from stop mode by external reset:  
The counter begins counting from $0000.  
The counter is cleared again after the oscillator stabilization delay and begins counting from $0000  
again.  
Upon exit from stop mode by external interrupt:  
The counter begins counting from $0000.  
The counter is not cleared again after the oscillator stabilization delay and continues counting  
throughout the oscillator stabilization delay.  
NOTE  
Immediately after exiting stop mode by external interrupt, service the COP  
to ensure a full COP timeout period.  
3.6.2 Wait Mode  
The WAIT instruction has no effect on the COP watchdog.  
NOTE  
To prevent a COP timeout during wait mode, exit wait mode periodically to  
service the COP.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
31  
Computer Operating Properly Module (COP)  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
32  
Chapter 4  
Central Processor Unit (CPU)  
4.1 Introduction  
The central processor unit (CPU) consists of a CPU control unit, an arithmetic/logic unit (ALU), and five  
CPU registers. The CPU control unit fetches and decodes instructions. The ALU executes the  
instructions. The CPU registers contain data, addresses, and status bits that reflect the results of CPU  
operations.  
4.2 Features  
Features of the CPU include:  
4.0-MHz bus frequency on standard part  
8-bit accumulator  
8-bit index register  
11-bit program counter  
6-bit stack pointer  
Condition code register with five status flags  
62 instructions  
8 addressing modes  
Power-saving stop, wait, halt, and data-retention modes  
The programming model is shown in Figure 4-1.  
4.3 CPU Control Unit  
The CPU control unit fetches and decodes instructions during program operation. The control unit selects  
the memory locations to read and write and coordinates the timing of all CPU operations.  
4.4 Arithmetic/Logic Unit  
The arithmetic/logic unit (ALU) performs the arithmetic, logic, and manipulation operations decoded from  
the instruction set by the CPU control unit. The ALU produces the results called for by the program and  
sets or clears status and control bits in the condition code register (CCR).  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
33  
Central Processor Unit (CPU)  
ARITHMETIC/LOGIC UNIT  
CPU CONTROL UNIT  
7
7
6
6
5
5
4
4
3
3
2
2
1
1
0
ACCUMULATOR (A)  
0
0
0
INDEX REGISTER (X)  
15 14 13 12 11 10  
9
0
8
0
7
1
6
1
5
5
4
4
3
3
2
2
1
1
0
0
0
0
0
0
STACK POINTER (SP)  
15 14 13 12 11 10  
9
8
7
6
0
0
0
0
0
PROGRAM COUNTER (PC)  
CONDITION CODE REGISTER (CCR)  
7
1
6
1
5
1
4
3
I
2
1
Z
0
H
N
C
HALF-CARRY FLAG  
INTERRUPT MASK  
NEGATIVE FLAG  
ZERO FLAG  
CARRY/BORROW FLAG  
Figure 4-1. Programming Model  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
34  
CPU Registers  
4.5 CPU Registers  
The M68HC05 CPU contains five registers that control and monitor MCU operation:  
Accumulator  
Index register  
Stack pointer  
Program counter  
Condition code register  
CPU registers are not memory mapped.  
4.5.1 Accumulator  
The accumulator is a general-purpose 8-bit register. The CPU uses the accumulator to hold operands and  
results of ALU operations.  
Bit 7  
6
5
4
3
2
1
Bit 0  
Read:  
Write:  
Reset:  
Unaffected by reset  
Figure 4-2. Accumulator (A)  
4.5.2 Index Register  
In the indexed addressing modes, the CPU uses the byte in the index register to determine the conditional  
address of the operand. The index register also can serve as a temporary storage location or a counter.  
Bit 7  
6
5
4
3
2
1
Bit 0  
Read:  
Write:  
Reset:  
Unaffected by reset  
Figure 4-3. Index Register (X)  
4.5.3 Stack Pointer  
The stack pointer is a 16-bit register that contains the address of the next location on the stack. During a  
reset or after the reset stack pointer instruction (RSP), the stack pointer is preset to $00FF. The address  
in the stack pointer decrements after a byte is stacked and increments before a byte is unstacked.  
Bit  
Bit  
0
15 14 13 12 11 10  
9
0
8
0
7
1
6
1
5
1
4
1
3
1
2
1
1
1
Read:  
Write:  
Reset:  
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
= Unimplemented  
Figure 4-4. Stack Pointer (SP)  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
35  
Central Processor Unit (CPU)  
The 10 most significant bits of the stack pointer are permanently fixed at 0000000011, so the stack pointer  
produces addresses from $00C0 to $00FF. If subroutines and interrupts use more than 64 stack locations,  
the stack pointer wraps around to address $00FF and begins writing over the previously stored data. A  
subroutine uses two stack locations; an interrupt uses five locations.  
4.5.4 Program Counter  
The program counter is a 16-bit register that contains the address of the next instruction or operand to be  
fetched. The five most significant bits of the program counter are ignored and appear as 00000.  
Normally, the address in the program counter automatically increments to the next sequential memory  
location every time an instruction or operand is fetched. Jump, branch, and interrupt operations load the  
program counter with an address other than that of the next sequential location.  
Bit  
Bit  
0
15 14 13 12 11 10  
9
8
7
6
5
4
3
2
1
Reset:  
0
0
0
0
0
Loaded with vector from $07FE and $07FF  
Figure 4-5. Program Counter (PC)  
4.5.5 Condition Code Register  
The condition code register is an 8-bit register whose three most significant bits are permanently fixed at  
111. The condition code register contains the interrupt mask and four flags that indicate the results of the  
instruction just executed.  
Bit 7  
1
6
1
5
1
4
H
U
3
I
2
N
U
1
Z
U
Bit 0  
C
Read:  
Write:  
Reset:  
1
1
1
1
U
= Unimplemented  
U = Unaffected  
Figure 4-6. Condition Code Register (CCR)  
H — Half-Carry Flag  
The CPU sets the half-carry flag when a carry occurs between bits 3 and 4 of the accumulator during  
an ADD or ADC operation. The half-carry flag is required for binary-coded decimal (BCD) arithmetic  
operations.  
I — Interrupt Mask  
Setting the interrupt mask disables interrupts. If an interrupt request occurs while the interrupt mask is  
logic 0, the CPU saves the CPU registers on the stack, sets the interrupt mask, and then fetches the  
interrupt vector. If an interrupt request occurs while the interrupt mask is logic 1, the interrupt request  
is latched. Normally, the CPU processes the latched interrupt request as soon as the interrupt mask is  
cleared again.  
A return from interrupt instruction (RTI) unstacks the CPU registers, restoring the interrupt mask to its  
cleared state. After any reset, the interrupt mask is set and can be cleared only by a software  
instruction.  
N — Negative Flag  
The CPU sets the negative flag when an ALU operation produces a negative result.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
36  
Freescale Semiconductor  
Instruction Set  
Z — Zero Flag  
The CPU sets the zero flag when an ALU operation produces a result of $00.  
C — Carry/Borrow Flag  
The CPU sets the carry/borrow flag when an addition operation produces a carry out of bit 7 of the  
accumulator or when a subtraction operation requires a borrow. Some logical operations and data  
manipulation instructions also clear or set the carry/borrow flag.  
4.6 Instruction Set  
The MCU instruction set has 62 instructions and uses eight addressing modes.  
4.6.1 Addressing Modes  
The CPU uses eight addressing modes for flexibility in accessing data. The addressing modes provide  
eight different ways for the CPU to find the data required to execute an instruction. The eight addressing  
modes are:  
Inherent  
Immediate  
Direct  
Extended  
Indexed, no offset  
Indexed, 8-bit offset  
Indexed, 16-bit offset  
Relative  
4.6.1.1 Inherent  
Inherent instructions are those that have no operand, such as return-from-interrupt (RTI) and stop  
(STOP). Some of the inherent instructions act on data in the CPU registers, such as set carry flag (SEC)  
and increment accumulator (INCA). Inherent instructions require no operand address and are one byte  
long.  
4.6.1.2 Immediate  
Immediate instructions are those that contain a value to be used in an operation with the value in the  
accumulator or index register. Immediate instructions require no operand address and are two bytes long.  
The opcode is the first byte, and the immediate data value is the second byte.  
4.6.1.3 Direct  
Direct instructions can access any of the first 256 memory locations with two bytes. The first byte is the  
opcode, and the second is the low byte of the operand address. In direct addressing, the CPU  
automatically uses $00 as the high byte of the operand address.  
4.6.1.4 Extended  
Extended instructions use three bytes and can access any address in memory. The first byte is the  
opcode; the second and third bytes are the high and low bytes of the operand address.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
37  
Central Processor Unit (CPU)  
When using the Freescale assembler, the programmer does not need to specify whether an instruction is  
direct or extended. The assembler automatically selects the shortest form of the instruction.  
4.6.1.5 Indexed, No Offset  
Indexed instructions with no offset are 1-byte instructions that can access data with variable addresses  
within the first 256 memory locations. The index register contains the low byte of the effective address of  
the operand. The CPU automatically uses $00 as the high byte, so these instructions can address  
locations $0000–$00FF.  
Indexed, no offset instructions are often used to move a pointer through a table or to hold the address of  
a frequently used RAM or input/output (I/O) location.  
4.6.1.6 Indexed, 8-Bit Offset  
Indexed, 8-bit offset instructions are 2-byte instructions that can access data with variable addresses  
within the first 511 memory locations. The CPU adds the unsigned byte in the index register to the  
unsigned byte following the opcode. The sum is the effective address of the operand. These instructions  
can access locations $0000–$01FE.  
Indexed 8-bit offset instructions are useful for selecting the kth element in an n-element table. The table  
can begin anywhere within the first 256 memory locations and could extend as far as location 510  
($01FE). The k value is typically in the index register, and the address of the beginning of the table is in  
the byte following the opcode.  
4.6.1.7 Indexed, 16-Bit Offset  
Indexed, 16-bit offset instructions are 3-byte instructions that can access data with variable addresses at  
any location in memory. The CPU adds the unsigned byte in the index register to the two unsigned bytes  
following the opcode. The sum is the effective address of the operand. The first byte after the opcode is  
the high byte of the 16-bit offset; the second byte is the low byte of the offset.  
Indexed, 16-bit offset instructions are useful for selecting the kth element in an n-element table anywhere  
in memory.  
As with direct and extended addressing, the Freescale assembler determines the shortest form of  
indexed addressing.  
4.6.1.8 Relative  
Relative addressing is only for branch instructions. If the branch condition is true, the CPU finds the  
effective branch destination by adding the signed byte following the opcode to the contents of the program  
counter. If the branch condition is not true, the CPU goes to the next instruction. The offset is a signed,  
two’s complement byte that gives a branching range of –128 to +127 bytes from the address of the next  
location after the branch instruction.  
When using the Freescale assembler, the programmer does not need to calculate the offset because the  
assembler determines the proper offset and verifies that it is within the span of the branch.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
38  
Freescale Semiconductor  
Instruction Set  
4.6.2 Instruction Types  
The MCU instructions fall into the following five categories:  
Register/memory instructions  
Read-modify-write instructions  
Jump/branch instructions  
Bit manipulation instructions  
Control instructions  
4.6.2.1 Register/Memory Instructions  
These instructions operate on CPU registers and memory locations. Most of them use two operands. One  
operand is in either the accumulator or the index register. The CPU finds the other operand in memory.  
Table 4-1. Register/Memory Instructions  
Instruction  
Add Memory Byte and Carry Bit to Accumulator  
Add Memory Byte to Accumulator  
AND Memory Byte with Accumulator  
Bit Test Accumulator  
Mnemonic  
ADC  
ADD  
AND  
BIT  
Compare Accumulator  
CMP  
CPX  
EOR  
LDA  
Compare Index Register with Memory Byte  
EXCLUSIVE OR Accumulator with Memory Byte  
Load Accumulator with Memory Byte  
Load Index Register with Memory Byte  
Multiply  
LDX  
MUL  
ORA  
SBC  
STA  
OR Accumulator with Memory Byte  
Subtract Memory Byte and Carry Bit from Accumulator  
Store Accumulator in Memory  
Store Index Register in Memory  
STX  
Subtract Memory Byte from Accumulator  
SUB  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
39  
Central Processor Unit (CPU)  
4.6.2.2 Read-Modify-Write Instructions  
These instructions read a memory location or a register, modify its contents, and write the modified value  
back to the memory location or to the register.  
NOTE  
Do not use read-modify-write instructions on registers with write-only bits.  
Table 4-2. Read-Modify-Write Instructions  
Instruction  
Arithmetic Shift Left (Same as LSL)  
Arithmetic Shift Right  
Mnemonic  
ASL  
ASR  
BCLR(1)  
Bit Clear  
BSET(1)  
CLR  
COM  
DEC  
INC  
Bit Set  
Clear Register  
Complement (One’s Complement)  
Decrement  
Increment  
Logical Shift Left (Same as ASL)  
Logical Shift Right  
LSL  
LSR  
Negate (Two’s Complement)  
Rotate Left through Carry Bit  
Rotate Right through Carry Bit  
Test for Negative or Zero  
NEG  
ROL  
ROR  
TST(2)  
1. Unlike other read-modify-write instructions, BCLR and  
BSET use only direct addressing.  
2. TST is an exception to the read-modify-write sequence  
because it does not write a replacement value.  
4.6.2.3 Jump/Branch Instructions  
Jump instructions allow the CPU to interrupt the normal sequence of the program counter. The  
unconditional jump instruction (JMP) and the jump-to-subroutine instruction (JSR) have no register  
operand. Branch instructions allow the CPU to interrupt the normal sequence of the program counter  
when a test condition is met. If the test condition is not met, the branch is not performed.  
The BRCLR and BRSET instructions cause a branch based on the state of any readable bit in the first  
256 memory locations. These 3-byte instructions use a combination of direct addressing and relative  
addressing. The direct address of the byte to be tested is in the byte following the opcode. The third byte  
is the signed offset byte. The CPU finds the effective branch destination by adding the third byte to the  
program counter if the specified bit tests true. The bit to be tested and its condition (set or clear) is part of  
the opcode. The span of branching is from –128 to +127 from the address of the next location after the  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
40  
Freescale Semiconductor  
Instruction Set  
branch instruction. The CPU also transfers the tested bit to the carry/borrow bit of the condition code  
register.  
NOTE  
Do not use BRCLR or BRSET instructions on registers with write-only bits.  
Table 4-3. Jump and Branch Instructions  
Instruction  
Branch if Carry Bit Clear  
Mnemonic  
BCC  
BCS  
Branch if Carry Bit Set  
Branch if Equal  
BEQ  
BHCC  
BHCS  
BHI  
Branch if Half-Carry Bit Clear  
Branch if Half-Carry Bit Set  
Branch if Higher  
Branch if Higher or Same  
Branch if IRQ Pin High  
Branch if IRQ Pin Low  
Branch if Lower  
BHS  
BIH  
BIL  
BLO  
Branch if Lower or Same  
Branch if Interrupt Mask Clear  
Branch if Minus  
BLS  
BMC  
BMI  
Branch if Interrupt Mask Set  
Branch if Not Equal  
Branch if Plus  
BMS  
BNE  
BPL  
Branch Always  
BRA  
Branch if Bit Clear  
BRCLR  
BRN  
BRSET  
BSR  
Branch Never  
Branch if Bit Set  
Branch to Subroutine  
Unconditional Jump  
Jump to Subroutine  
JMP  
JSR  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
41  
Central Processor Unit (CPU)  
4.6.2.4 Bit Manipulation Instructions  
The CPU can set or clear any writable bit in the first 256 bytes of memory, which includes I/O registers  
and on-chip RAM locations. The CPU can also test and branch based on the state of any bit in any of the  
first 256 memory locations.  
Table 4-4. Bit Manipulation Instructions  
Instruction  
Mnemonic  
BCLR  
Bit Clear  
Branch if Bit Clear  
Branch if Bit Set  
Bit Set  
BRCLR  
BRSET  
BSET  
NOTE  
Do not use bit manipulation instructions on registers with write-only bits.  
4.6.2.5 Control Instructions  
These instructions act on CPU registers and control CPU operation during program execution.  
Table 4-5. Control Instructions  
Instruction  
Mnemonic  
CLC  
CLI  
Clear Carry Bit  
Clear Interrupt Mask  
No Operation  
NOP  
RSP  
RTI  
Reset Stack Pointer  
Return from Interrupt  
Return from Subroutine  
Set Carry Bit  
RTS  
SEC  
SEI  
Set Interrupt Mask  
Stop Oscillator and Enable IRQ Pin  
Software Interrupt  
STOP  
SWI  
Transfer Accumulator to Index Register  
Transfer Index Register to Accumulator  
Stop CPU Clock and Enable Interrupts  
TAX  
TXA  
WAIT  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
42  
Instruction Set  
4.6.3 Instruction Set Summary  
Table 4-6. Instruction Set Summary (Sheet 1 of 6)  
Effect  
Source  
Form  
on CCR  
Operation  
Description  
H I N Z C  
ii  
dd  
hh ll  
ee ff  
ff  
ADC #opr  
IMM  
DIR  
EXT  
IX2  
IX1  
IX  
A9  
B9  
C9  
D9  
E9  
F9  
2
3
4
5
4
3
ADC opr  
ADC opr  
ADC opr,X  
ADC opr,X  
ADC ,X  
Add with Carry  
Add without Carry  
Logical AND  
A (A) + (M) + (C)  
—  
—  
— —  
ii  
dd  
hh ll  
ee ff  
ff  
ADD #opr  
ADD opr  
ADD opr  
ADD opr,X  
ADD opr,X  
ADD ,X  
IMM  
DIR  
EXT CB  
IX2  
IX1  
IX  
AB  
BB  
2
3
4
5
4
3
A (A) + (M)  
A (A) (M)  
DB  
EB  
FB  
ii  
dd  
hh ll  
ee ff  
ff  
AND #opr  
AND opr  
AND opr  
AND opr,X  
AND opr,X  
AND ,X  
IMM  
DIR  
EXT  
IX2  
IX1  
IX  
A4  
B4  
C4  
D4  
E4  
F4  
2
3
4
5
4
3
—  
dd  
ASL opr  
ASLA  
ASLX  
ASL opr,X  
ASL ,X  
DIR  
INH  
INH  
IX1  
IX  
38  
48  
58  
68  
78  
5
3
3
6
5
Arithmetic Shift Left (Same as LSL)  
C
0
— —  
— —  
b7  
b7  
b0  
b0  
ff  
dd  
ASR opr  
ASRA  
ASRX  
ASR opr,X  
ASR ,X  
DIR  
INH  
INH  
IX1  
IX  
37  
47  
57  
67  
77  
5
3
3
6
5
C
Arithmetic Shift Right  
ff  
BCC rel  
Branch if Carry Bit Clear  
PC (PC) + 2 + rel ? C = 0  
— — — — — REL  
24 rr  
3
DIR (b0) 11 dd  
DIR (b1) 13 dd  
DIR (b2) 15 dd  
DIR (b3) 17 dd  
DIR (b4) 19 dd  
DIR (b5) 1B dd  
DIR (b6) 1D dd  
DIR (b7) 1F dd  
5
5
5
5
5
5
5
5
BCLR n opr  
Clear Bit n  
Mn 0  
— — — — —  
BCS rel  
BEQ rel  
BHCC rel  
BHCS rel  
BHI rel  
Branch if Carry Bit Set (Same as BLO)  
Branch if Equal  
PC (PC) + 2 + rel ? C = 1  
PC (PC) + 2 + rel ? Z = 1  
PC (PC) + 2 + rel ? H = 0  
PC (PC) + 2 + rel ? H = 1  
— — — — — REL  
— — — — — REL  
— — — — — REL  
— — — — — REL  
25 rr  
27 rr  
28 rr  
29 rr  
22 rr  
24 rr  
2F rr  
2E rr  
3
3
3
3
3
3
3
3
Branch if Half-Carry Bit Clear  
Branch if Half-Carry Bit Set  
Branch if Higher  
PC (PC) + 2 + rel ? C Z = 0 — — — — — REL  
PC (PC) + 2 + rel ? C = 0 — — — — — REL  
BHS rel  
BIH rel  
Branch if Higher or Same  
Branch if IRQ Pin High  
Branch if IRQ Pin Low  
PC (PC) + 2 + rel ? IRQ = 1 — — — — — REL  
PC (PC) + 2 + rel ? IRQ = 0 — — — — — REL  
BIL rel  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
43  
Central Processor Unit (CPU)  
Table 4-6. Instruction Set Summary (Sheet 2 of 6)  
Effect  
Source  
Form  
on CCR  
Operation  
Description  
H I N Z C  
ii  
dd  
hh ll  
ee ff  
ff  
BIT #opr  
IMM  
DIR  
EXT  
IX2  
IX1  
IX  
A5  
B5  
C5  
D5  
E5  
F5  
2
3
4
5
4
3
BIT opr  
BIT opr  
BIT opr,X  
BIT opr,X  
BIT ,X  
Bit Test Accumulator with Memory Byte  
(A) (M)  
— — ꢀ ꢀ —  
BLO rel  
BLS rel  
BMC rel  
BMI rel  
BMS rel  
BNE rel  
BPL rel  
BRA rel  
Branch if Lower (Same as BCS)  
Branch if Lower or Same  
Branch if Interrupt Mask Clear  
Branch if Minus  
PC (PC) + 2 + rel ? C = 1  
— — — — — REL  
25 rr  
23 rr  
2C rr  
2B rr  
2D rr  
26 rr  
2A rr  
20 rr  
3
3
3
3
3
3
3
3
PC (PC) + 2 + rel ? C Z = 1 — — — — — REL  
PC (PC) + 2 + rel ? I = 0  
PC (PC) + 2 + rel ? N = 1  
PC (PC) + 2 + rel ? I = 1  
PC (PC) + 2 + rel ? Z = 0  
PC (PC) + 2 + rel ? N = 0  
PC (PC) + 2 + rel ? 1 = 1  
— — — — — REL  
— — — — — REL  
— — — — — REL  
— — — — — REL  
— — — — — REL  
— — — — — REL  
Branch if Interrupt Mask Set  
Branch if Not Equal  
Branch if Plus  
Branch Always  
DIR (b0) 01 dd rr  
DIR (b1) 03 dd rr  
DIR (b2) 05 dd rr  
DIR (b3) 07 dd rr  
DIR (b4) 09 dd rr  
DIR (b5) 0B dd rr  
DIR (b6) 0D dd rr  
DIR (b7) 0F dd rr  
5
5
5
5
5
5
5
5
BRCLR n opr rel Branch if Bit n Clear  
PC (PC) + 2 + rel ? Mn = 0 — — — — ꢀ  
BRN rel  
Branch Never  
PC (PC) + 2 + rel ? 1 = 0  
— — — — — REL  
21 rr  
3
DIR (b0) 00 dd rr  
DIR (b1) 02 dd rr  
DIR (b2) 04 dd rr  
DIR (b3) 06 dd rr  
DIR (b4) 08 dd rr  
DIR (b5) 0A dd rr  
DIR (b6) 0C dd rr  
DIR (b7) 0E dd rr  
5
5
5
5
5
5
5
5
BRSET n opr rel Branch if Bit n Set  
PC (PC) + 2 + rel ? Mn = 1 — — — — ꢀ  
DIR (b0) 10 dd  
DIR (b1) 12 dd  
DIR (b2) 14 dd  
DIR (b3) 16 dd  
DIR (b4) 18 dd  
DIR (b5) 1A dd  
DIR (b6) 1C dd  
DIR (b7) 1E dd  
5
5
5
5
5
5
5
5
BSET n opr  
Set Bit n  
Mn 1  
— — — — —  
PC (PC) + 2; push (PCL)  
SP (SP) – 1; push (PCH)  
SP (SP) – 1  
BSR rel  
Branch to Subroutine  
— — — — — REL AD rr  
6
PC (PC) + rel  
CLC  
CLI  
Clear Carry Bit  
C 0  
I 0  
— — — — 0  
— 0 — — —  
INH  
INH  
98  
2
2
Clear Interrupt Mask  
9A  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
44  
Instruction Set  
Table 4-6. Instruction Set Summary (Sheet 3 of 6)  
Effect  
Source  
Form  
on CCR  
Operation  
Description  
H I N Z C  
dd  
CLR opr  
CLRA  
CLRX  
CLR opr,X  
CLR ,X  
M $00  
A $00  
X $00  
M $00  
M $00  
DIR  
INH  
INH  
IX1  
IX  
3F  
4F  
5F  
6F  
7F  
5
3
3
6
5
Clear Byte  
— — 0 1 —  
ff  
ii  
dd  
hh ll  
ee ff  
ff  
CMP #opr  
CMP opr  
CMP opr  
CMP opr,X  
CMP opr,X  
CMP ,X  
IMM  
DIR  
EXT  
IX2  
IX1  
IX  
A1  
B1  
C1  
D1  
E1  
F1  
2
3
4
5
4
3
Compare Accumulator with Memory Byte  
Complement Byte (One’s Complement)  
Compare Index Register with Memory Byte  
Decrement Byte  
(A) – (M)  
— —  
— —  
— —  
— —  
— —  
— —  
1
dd  
ff  
COM opr  
COMA  
COMX  
COM opr,X  
COM ,X  
M (M) = $FF – (M)  
A (A) = $FF – (A)  
X (X) = $FF – (X)  
M (M) = $FF – (M)  
M (M) = $FF – (M)  
DIR  
INH  
INH  
IX1  
IX  
33  
43  
53  
63  
73  
5
3
3
6
5
ii  
dd  
hh ll  
ee ff  
ff  
CPX #opr  
CPX opr  
CPX opr  
CPX opr,X  
CPX opr,X  
CPX ,X  
IMM  
DIR  
EXT  
IX2  
IX1  
IX  
A3  
B3  
C3  
D3  
E3  
F3  
2
3
4
5
4
3
(X) – (M)  
dd  
ff  
DEC opr  
DECA  
DECX  
DEC opr,X  
DEC ,X  
M (M) – 1  
A (A) – 1  
X (X) – 1  
M (M) – 1  
M (M) – 1  
DIR  
INH  
INH  
IX1  
IX  
3A  
4A  
5A  
6A  
7A  
5
3
3
6
5
—  
—  
—  
ii  
dd  
hh ll  
ee ff  
ff  
EOR #opr  
EOR opr  
EOR opr  
EOR opr,X  
EOR opr,X  
EOR ,X  
IMM  
DIR  
EXT  
IX2  
IX1  
IX  
A8  
B8  
C8  
D8  
E8  
F8  
2
3
4
5
4
3
EXCLUSIVE OR Accumulator with Memory  
Byte  
A (A) (M)  
dd  
ff  
INC opr  
INCA  
INCX  
INC opr,X  
INC ,X  
M (M) + 1  
A (A) + 1  
X (X) + 1  
M (M) + 1  
M (M) + 1  
DIR  
INH  
INH  
IX1  
IX  
3C  
4C  
5C  
6C  
7C  
5
3
3
6
5
Increment Byte  
dd  
hh ll  
ee ff  
ff  
JMP opr  
JMP opr  
JMP opr,X  
JMP opr,X  
JMP ,X  
DIR  
EXT CC  
IX2  
IX1  
IX  
BC  
2
3
4
3
2
Unconditional Jump  
Jump to Subroutine  
PC Jump Address  
— — — — —  
— — — — —  
DC  
EC  
FC  
dd  
hh ll  
ee ff  
ff  
JSR opr  
JSR opr  
JSR opr,X  
JSR opr,X  
JSR ,X  
DIR  
EXT CD  
IX2  
IX1  
IX  
BD  
5
6
7
6
5
PC (PC) + n (n = 1, 2, or 3)  
Push (PCL); SP (SP) – 1  
Push (PCH); SP (SP) – 1  
PC Effective Address  
DD  
ED  
FD  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
45  
Central Processor Unit (CPU)  
Table 4-6. Instruction Set Summary (Sheet 4 of 6)  
Effect  
Source  
Form  
on CCR  
Operation  
Description  
H I N Z C  
ii  
dd  
hh ll  
ee ff  
ff  
LDA #opr  
IMM  
DIR  
EXT  
IX2  
IX1  
IX  
A6  
B6  
C6  
D6  
E6  
F6  
2
3
4
5
4
3
LDA opr  
LDA opr  
LDA opr,X  
LDA opr,X  
LDA ,X  
Load Accumulator with Memory Byte  
A (M)  
— —  
—  
ii  
dd  
hh ll  
ee ff  
ff  
LDX #opr  
LDX opr  
LDX opr  
LDX opr,X  
LDX opr,X  
LDX ,X  
IMM  
DIR  
EXT CE  
IX2  
IX1  
IX  
AE  
BE  
2
3
4
5
4
3
Load Index Register with Memory Byte  
Logical Shift Left (Same as ASL)  
X (M)  
— —  
—  
DE  
EE  
FE  
dd  
LSL opr  
LSLA  
LSLX  
LSL opr,X  
LSL ,X  
DIR  
INH  
INH  
IX1  
IX  
38  
48  
58  
68  
78  
5
3
3
6
5
C
0
— — ꢀ  
b7  
b0  
ff  
dd  
LSR opr  
LSRA  
LSRX  
LSR opr,X  
LSR ,X  
DIR  
INH  
INH  
IX1  
IX  
34  
44  
54  
64  
74  
5
3
3
6
5
0
C
Logical Shift Right  
Unsigned Multiply  
— — 0  
b7  
b0  
ff  
1
1
MUL  
X : A (X) × (A)  
0 — — — 0  
INH  
42  
dd  
ff  
NEG opr  
NEGA  
NEGX  
NEG opr,X  
NEG ,X  
M –(M) = $00 – (M)  
A –(A) = $00 – (A)  
X –(X) = $00 – (X)  
M –(M) = $00 – (M)  
M –(M) = $00 – (M)  
DIR  
INH  
INH  
IX1  
IX  
30  
40  
50  
60  
70  
5
3
3
6
5
Negate Byte (Two’s Complement)  
No Operation  
— — ꢀ ꢀ ꢀ  
NOP  
— — — — —  
INH  
9D  
2
ii  
dd  
hh ll  
ee ff  
ff  
ORA #opr  
ORA opr  
ORA opr  
ORA opr,X  
ORA opr,X  
ORA ,X  
IMM  
DIR  
EXT CA  
IX2  
IX1  
IX  
AA  
BA  
2
3
4
5
4
3
Logical OR Accumulator with Memory  
Rotate Byte Left through Carry Bit  
A (A) (M)  
— —  
—  
DA  
EA  
FA  
dd  
ROL opr  
ROLA  
ROLX  
ROL opr,X  
ROL ,X  
DIR  
INH  
INH  
IX1  
IX  
39  
49  
59  
69  
79  
5
3
3
6
5
C
— —  
— —  
b7  
b0  
ff  
dd  
ROR opr  
RORA  
RORX  
ROR opr,X  
ROR ,X  
DIR  
INH  
INH  
IX1  
IX  
36  
46  
56  
66  
76  
5
3
3
6
5
C
Rotate Byte Right through Carry Bit  
Reset Stack Pointer  
b7  
b0  
ff  
RSP  
SP $00FF  
— — — — —  
INH  
9C  
2
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
46  
Instruction Set  
Table 4-6. Instruction Set Summary (Sheet 5 of 6)  
Effect  
Source  
Form  
on CCR  
Operation  
Description  
H I N Z C  
SP (SP) + 1; Pull (CCR)  
SP (SP) + 1; Pull (A)  
SP (SP) + 1; Pull (X)  
SP (SP) + 1; Pull (PCH)  
SP (SP) + 1; Pull (PCL)  
RTI  
Return from Interrupt  
INH  
INH  
80  
81  
9
6
SP (SP) + 1; Pull (PCH)  
SP (SP) + 1; Pull (PCL)  
RTS  
Return from Subroutine  
— — — — —  
ii  
dd  
hh ll  
ee ff  
ff  
SBC #opr  
SBC opr  
SBC opr  
SBC opr,X  
SBC opr,X  
SBC ,X  
IMM  
DIR  
EXT  
IX2  
IX1  
IX  
A2  
B2  
C2  
D2  
E2  
F2  
2
3
4
5
4
3
Subtract Memory Byte and Carry Bit from  
Accumulator  
A (A) – (M) – (C)  
— — ꢀ ꢀ ꢀ  
SEC  
SEI  
Set Carry Bit  
C 1  
I 1  
— — — — 1  
— 1 — — —  
INH  
INH  
99  
2
2
Set Interrupt Mask  
9B  
dd  
hh ll  
ee ff  
ff  
STA opr  
STA opr  
STA opr,X  
STA opr,X  
STA ,X  
DIR  
EXT  
IX2  
IX1  
IX  
B7  
C7  
D7  
E7  
F7  
4
5
6
5
4
Store Accumulator in Memory  
Stop Oscillator and Enable IRQ Pin  
Store Index Register In Memory  
M (A)  
— — ꢀ ꢀ —  
STOP  
— 0 — — —  
INH  
8E  
2
dd  
hh ll  
ee ff  
ff  
STX opr  
STX opr  
STX opr,X  
STX opr,X  
STX ,X  
DIR  
EXT  
IX2  
IX1  
IX  
BF  
CF  
DF  
EF  
FF  
4
5
6
5
4
M (X)  
— —  
— —  
—  
ii  
dd  
hh ll  
ee ff  
ff  
SUB #opr  
SUB opr  
SUB opr  
SUB opr,X  
SUB opr,X  
SUB ,X  
IMM  
DIR  
EXT  
IX2  
IX1  
IX  
A0  
B0  
C0  
D0  
E0  
F0  
2
3
4
5
4
3
Subtract Memory Byte from Accumulator  
A (A) – (M)  
ꢀ ꢀ  
PC (PC) + 1; Push (PCL)  
SP (SP) – 1; Push (PCH)  
SP (SP) – 1; Push (X)  
SP (SP) – 1; Push (A)  
SP (SP) – 1; Push (CCR)  
SP (SP) – 1; I 1  
1
0
SWI  
TAX  
Software Interrupt  
— 1 — — —  
— — — — —  
INH  
83  
PCH Interrupt Vector High Byte  
PCL Interrupt Vector Low Byte  
Transfer Accumulator to Index Register  
Test Memory Byte for Negative or Zero  
X (A)  
INH  
97  
2
dd  
ff  
TST opr  
TSTA  
TSTX  
DIR  
INH  
INH  
IX1  
IX  
3D  
4D  
5D  
6D  
7D  
4
3
3
5
4
(M) – $00  
— — ꢀ ꢀ —  
TST opr,X  
TST ,X  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
47  
Central Processor Unit (CPU)  
Table 4-6. Instruction Set Summary (Sheet 6 of 6)  
Effect  
Source  
Form  
on CCR  
Operation  
Description  
H I N Z C  
TXA  
Transfer Index Register to Accumulator  
Stop CPU Clock and Enable Interrupts  
A (X)  
— — — — —  
— 0 — — —  
INH  
INH  
9F  
8F  
2
2
WAIT  
A
C
Accumulator  
Carry/borrow flag  
opr  
PC  
Operand (one or two bytes)  
Program counter  
CCR Condition code register  
PCH Program counter high byte  
PCL Program counter low byte  
REL Relative addressing mode  
dd  
Direct address of operand  
dd rr  
DIR  
ee ff  
EXT  
ff  
Direct address of operand and relative offset of branch instruction  
Direct addressing mode  
High and low bytes of offset in indexed, 16-bit offset addressing  
Extended addressing mode  
Offset byte in indexed, 8-bit offset addressing  
Half-carry flag  
rel  
rr  
SP  
X
Relative program counter offset byte  
Relative program counter offset byte  
Stack pointer  
Index register  
H
Z
Zero flag  
hh ll  
I
High and low bytes of operand address in extended addressing  
Interrupt mask  
#
Immediate value  
Logical AND  
ii  
Immediate operand byte  
Logical OR  
IMM  
INH  
IX  
IX1  
IX2  
M
Immediate addressing mode  
Inherent addressing mode  
Indexed, no offset addressing mode  
Indexed, 8-bit offset addressing mode  
Indexed, 16-bit offset addressing mode  
Memory location  
( )  
–( )  
?
Logical EXCLUSIVE OR  
Contents of  
Negation (two’s complement)  
Loaded with  
If  
:
Concatenated with  
Set or cleared  
N
Negative flag  
n
Any bit  
Not affected  
4.7 Opcode Map  
See Table 4-7.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
48  
Table 4-7. Opcode Map  
Bit Manipulation Branch  
Read-Modify-Write  
Control  
Register/Memory  
DIR  
DIR  
REL  
DIR  
3
INH  
INH  
IX1  
IX  
7
INH  
INH  
IMM  
A
DIR  
B
EXT  
IX2  
IX1  
E
IX  
F
MSB  
LSB  
MSB  
LSB  
0
1
2
4
5
6
8
9
C
D
5
5
3
5
3
3
6
5
9
2
3
4
5
4
3
BRSET0  
BSET0  
BRA  
NEG  
NEGA  
NEGX  
NEG  
NEG  
RTI  
SUB  
SUB  
SUB  
SUB  
SUB  
SUB  
CMP  
SBC  
CPX  
AND  
BIT  
0
1
0
3
DIR 2  
5
DIR 2  
5
REL 2  
3
DIR 1  
INH 1  
INH 2  
IX1 1  
IX 1  
INH  
6
2
2
2
2
2
2
2
IMM 2  
2
DIR 3  
3
EXT 3  
4
IX2 2  
5
IX1 1  
4
IX  
3
BRCLR0  
BCLR0  
BRN  
RTS  
CMP  
CMP  
CMP  
CMP  
CMP  
1
2
3
DIR 2  
5
DIR 2  
5
REL  
3
1
INH  
IMM 2  
2
DIR 3  
3
EXT 3  
4
IX2 2  
5
IX1 1  
4
IX  
3
11  
BRSET1  
BSET1  
BHI  
MUL  
SBC  
SBC  
SBC  
SBC  
CPX  
AND  
BIT  
SBC  
CPX  
AND  
BIT  
2
3
DIR 2  
5
DIR 2  
5
REL  
3
1
5
INH  
3
IMM 2  
2
DIR 3  
3
EXT 3  
4
IX2 2  
5
IX1 1  
4
IX  
3
3
6
5
10  
SWI  
INH  
BRCLR1  
BCLR1  
BLS  
COM  
COMA  
COMX  
COM  
COM  
LSR  
CPX  
CPX  
CPX  
3
3
3
DIR 2  
5
DIR 2  
5
REL 2  
3
DIR 1  
5
INH 1  
3
INH 2  
3
IX1 1  
6
IX 1  
5
IMM 2  
2
DIR 3  
3
EXT 3  
4
IX2 2  
5
IX1 1  
4
IX  
3
BRSET2  
BSET2  
BCC  
LSR  
LSRA  
LSRX  
LSR  
AND  
AND  
AND  
4
4
3
DIR 2  
5
DIR 2  
5
REL 2  
3
DIR 1  
INH 1  
INH 2  
IX1 1  
IX  
IMM 2  
2
DIR 3  
3
EXT 3  
4
IX2 2  
5
IX1 1  
4
IX  
3
BRCLR2  
BCLR2 BCS/BLO  
BIT  
BIT  
BIT  
5
5
3
DIR 2  
5
DIR 2  
5
REL  
3
IMM 2  
2
DIR 3  
3
EXT 3  
4
IX2 2  
5
IX1 1  
4
IX  
3
5
3
3
6
5
BRSET3  
BSET3  
BNE  
ROR  
RORA  
RORX  
ROR  
ROR  
ASR  
LDA  
LDA  
LDA  
LDA  
STA  
EOR  
ADC  
ORA  
ADD  
JMP  
JSR  
LDX  
STX  
LDA  
STA  
EOR  
ADC  
ORA  
ADD  
JMP  
JSR  
LDX  
STX  
LDA  
STA  
6
6
3
DIR 2  
5
DIR 2  
5
REL 2  
3
DIR 1  
5
INH 1  
3
INH 2  
3
IX1 1  
6
IX  
5
IMM 2  
DIR 3  
4
EXT 3  
5
IX2 2  
6
IX1 1  
5
IX  
4
2
BRCLR3  
BCLR3  
BEQ  
ASR  
ASRA  
ASRX  
ASR  
TAX  
STA  
STA  
7
7
3
DIR 2  
5
DIR 2  
5
REL 2  
3
DIR 1  
5
INH 1  
3
INH 2  
3
IX1 1  
6
IX  
5
1
1
1
1
1
1
1
INH  
2
2
2
DIR 3  
3
EXT 3  
4
IX2 2  
5
IX1 1  
4
IX  
3
BRSET4  
BSET4  
BHCC  
ASL/LSL ASLA/LSLA ASLX/LSLX ASL/LSL ASL/LSL  
CLC  
EOR  
EOR  
EOR  
EOR  
ADC  
ORA  
ADD  
JMP  
JSR  
LDX  
STX  
8
8
3
DIR 2  
5
DIR 2  
5
REL 2  
3
DIR 1  
5
INH 1  
3
INH 2  
3
IX1 1  
6
IX  
5
INH 2  
2
IMM 2  
2
DIR 3  
3
EXT 3  
4
IX2 2  
5
IX1 1  
4
IX  
3
BRCLR4  
BCLR4  
BHCS  
ROL  
ROLA  
ROLX  
ROL  
ROL  
DEC  
SEC  
ADC  
ADC  
ADC  
9
9
3
DIR 2  
5
DIR 2  
5
REL 2  
3
DIR 1  
5
INH 1  
3
INH 2  
3
IX1 1  
6
IX  
5
INH 2  
2
IMM 2  
2
DIR 3  
3
EXT 3  
4
IX2 2  
5
IX1 1  
4
IX  
3
BRSET5  
BSET5  
BPL  
DEC  
DECA  
DECX  
DEC  
CLI  
ORA  
ORA  
ORA  
A
B
C
D
E
F
A
B
C
D
E
F
3
DIR 2  
5
DIR 2  
5
REL 2  
3
DIR 1  
INH 1  
INH 2  
IX1 1  
IX  
INH 2  
2
IMM 2  
2
DIR 3  
3
EXT 3  
4
IX2 2  
5
IX1 1  
4
IX  
3
BRCLR5  
BCLR5  
BMI  
SEI  
ADD  
ADD  
ADD  
3
DIR 2  
5
DIR 2  
5
REL  
3
INH 2  
2
IMM 2  
DIR 3  
2
EXT 3  
3
IX2 2  
4
IX1 1  
3
IX  
2
5
3
3
6
5
BRSET6  
BSET6  
BMC  
INC  
INCA  
INCX  
INC  
TST  
INC  
TST  
RSP  
INH  
JMP  
JMP  
3
DIR 2  
5
DIR 2  
5
REL 2  
3
DIR 1  
4
INH 1  
3
INH 2  
3
IX1 1  
5
IX  
4
2
6
DIR 3  
5
EXT 3  
6
IX2 2  
7
IX1 1  
6
IX  
5
2
BRCLR6  
BCLR6  
BMS  
TST  
TSTA  
TSTX  
NOP  
BSR  
JSR  
JSR  
3
DIR 2  
5
DIR 2  
5
REL 2  
3
DIR 1  
INH 1  
INH 2  
IX1 1  
IX  
INH 2  
REL 2  
2
DIR 3  
3
EXT 3  
4
IX2 2  
5
IX1 1  
4
IX  
3
2
BRSET7  
BSET7  
BIL  
STOP  
LDX  
LDX  
LDX  
3
DIR 2  
5
DIR 2  
5
REL  
3
1
INH  
2
2
2
IMM 2  
DIR 3  
4
EXT 3  
5
IX2 2  
6
IX1 1  
5
IX  
4
5
3
3
6
5
BRCLR7  
BCLR7  
BIH  
CLR  
DIR 1  
CLRA  
INH 1  
CLRX  
INH 2  
CLR  
CLR  
WAIT  
TXA  
INH  
STX  
STX  
3
DIR 2  
DIR 2  
REL 2  
IX1 1  
IX 1  
INH 1  
2
DIR 3  
EXT 3  
IX2 2  
IX1 1  
IX  
MSB  
INH = Inherent  
IMM = Immediate  
DIR = Direct  
REL = Relative  
IX = Indexed, No Offset  
IX1 = Indexed, 8-Bit Offset  
IX2 = Indexed, 16-Bit Offset  
0
MSB of Opcode in Hexadecimal  
LSB  
5
Number of Cycles  
BRSET0 Opcode Mnemonic  
LSB of Opcode in Hexadecimal  
0
EXT = Extended  
3
DIR Number of Bytes/Addressing Mode  
Central Processor Unit (CPU)  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
50  
Chapter 5  
External Interrupt Module (IRQ)  
5.1 Introduction  
The external interrupt (IRQ) module provides asynchronous external interrupts to the CPU. The following  
sources can generate external interrupts:  
IRQ/VPP pin  
PA0–PA3 pins  
5.2 Features  
The external interrupt module (IRQ) includes these features:  
Dedicated external interrupt pin (IRQ/VPP)  
Selectable interrupt on four input/output (I/O) pins (PA0–PA3)  
Programmable edge-only or edge- and level-interrupt sensitivity  
5.3 Operation  
The interrupt request/programming voltage pin (IRQ/VPP) and port A pins 0–3 (PA0–PA3) provide  
external interrupts. The PIRQ bit in the mask option register (MOR) enables PA0–PA3 as IRQ interrupt  
sources, which are combined into a single OR’ing function to be latched by the IRQ latch. Figure 5-1  
shows the structure of the IRQ module.  
After completing its current instruction, the CPU tests the IRQ latch. If the IRQ latch is set, the CPU then  
tests the I bit in the condition code register and the IRQE bit in the IRQ status and control register. If the  
I bit is clear and the IRQE bit is set, the CPU then begins the interrupt sequence. This interrupt is serviced  
by the interrupt service routine located at $07FA and $07FB.  
The CPU clears the IRQ latch while it fetches the interrupt vector, so that another external interrupt  
request can be latched during the interrupt service routine. As soon as the I bit is cleared during the return  
from interrupt, the CPU can recognize the new interrupt request. Figure 5-3 shows the sequence of events  
caused by an interrupt.  
5.3.1 IRQ/V Pin  
PP  
An interrupt signal on the IRQ/VPP pin latches an external interrupt request. The LEVEL bit in the mask  
option register provides negative edge-sensitive triggering or both negative edge-sensitive and low  
level-sensitive triggering for the interrupt function.  
If edge- and level-sensitive triggering is selected, a falling edge or a low level on the IRQ/VPP pin latches  
an external interrupt request. Edge- and level-sensitive triggering allows the use of multiple wired-OR  
external interrupt sources. An external interrupt request is latched as long as any source is holding the  
IRQ/VPP pin low.  
If level-sensitive triggering is selected, the IRQ/VPP input requires an external resistor to VDD for wired-OR  
operation. If the IRQ/VPP pin is not used, it must be tied to the VDD supply.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
51  
External Interrupt Module (IRQ)  
TO BIH & BIL  
INSTRUCTION  
PROCESSING  
IRQ  
LEVEL-SENSITIVE TRIGGER  
(MOR LEVEL BIT)  
IRQF  
V
DD  
EXTERNAL  
INTERRUPT  
REQUEST  
IRQ  
LATCH  
D
Q
PA3  
PA2  
PA1  
PA0  
CK  
IRQE  
CLR  
PIRQ  
(MOR)  
RESET  
IRQ VECTOR FETCH  
IRQR  
Figure 5-1. IRQ Module Block Diagram  
Addr.  
Register Name  
Bit 7  
IRQE  
1
6
5
4
0
3
2
1
0
Bit 0  
Read:  
0
0
IRQF  
0
0
IRQ Status and Control  
$000A  
Register (ISCR) Write:  
See page 54.  
Reset:  
R
0
IRQR  
0
0
0
0
0
0
= Unimplemented  
R
= Reserved  
Figure 5-2. IRQ Module I/O Register Summary  
If edge-sensitive-only triggering is selected, a falling edge on the IRQ/VPP pin latches an external interrupt  
request. A subsequent external interrupt request can be latched only after the voltage level on the  
IRQ/VPP pin returns to logic 1 and then falls again to logic 0.  
The IRQ/VPP pin contains an internal Schmitt trigger as part of its input to improve noise immunity. The  
voltage on this pin can affect the mode of operation and should not exceed VDD  
.
5.3.2 Optional External Interrupts  
The inputs for the lower four bits of port A (PA0–PA3) can be connected to the IRQ pin input of the CPU  
if enabled by the PIRQ bit in the mask option register. This capability allows keyboard scan applications  
where the transitions or levels on the I/O pins will behave the same as the IRQ/VPP pin except for the  
inverted phase (logic 1, rising edge). The active state of the IRQ/VPP pin is a logic 0 (falling edge).  
The PA0–PA3 pins are selected as a group to function as IRQ interrupts and are enabled by the IRQE bit  
in the IRQ status and control register. The PA0–PA3 pins can be positive-edge triggered only or  
positive-edge and high-level triggered.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
52  
Freescale Semiconductor  
Operation  
FROM RESET  
YES  
I BIT SET?  
NO  
YES  
EXTERNAL  
INTERRUPT?  
CLEAR IRQ LATCH.  
NO  
TIMER  
INTERRUPT?  
YES  
STACK PCL, PCH, X, A, CCR.  
SET I BIT.  
LOAD PC WITH INTERRUPT VECTOR.  
NO  
FETCH NEXT  
INSTRUCTION.  
SWI  
INSTRUCTION?  
YES  
NO  
RTI  
INSTRUCTION?  
YES  
UNSTACK CCR, A, X, PCH, PCL.  
EXECUTE INSTRUCTION.  
NO  
Figure 5-3. Interrupt Flowchart  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
53  
External Interrupt Module (IRQ)  
If edge- and level-sensitive triggering is selected, a rising edge or a high level on a PA0–PA3 pin latches  
an external interrupt request. Edge- and level-sensitive triggering allows the use of multiple wired-OR  
external interrupt sources. As long as any source is holding a PA0–PA3 pin high, an external interrupt  
request is latched, and the CPU continues to execute the interrupt service routine.  
If edge-sensitive only triggering is selected, a rising edge on a PA0–PA3 pin latches an external interrupt  
request. A subsequent external interrupt request can be latched only after the voltage level of the previous  
interrupt signal returns to logic 0 and then rises again to logic 1.  
NOTE  
The BIH and BIL instructions apply only to the level on the IRQ/VPP pin itself  
and not to the output of the logic OR function with the PA0PA3 pins. The  
state of the individual port A pins can be checked by reading the  
appropriate port A pins as inputs.  
Enabled PA0PA3 pins cause an IRQ interrupt regardless of whether these  
pins are configured as inputs or outputs.  
The IRQ pin has an internal Schmitt trigger. The optional external interrupts  
(PA0PA3) do not have internal Schmitt triggers.  
The interrupt mask bit (I) in the condition code register (CCR) disables all  
maskable interrupt requests, including external interrupt requests.  
5.4 IRQ Status and Control Register  
The IRQ status and control register (ISCR) controls and monitors operation of the IRQ module. All unused  
bits in the ISCR read as logic 0s. The IRQF bit is cleared and the IRQE bit is set by reset.  
Address:  
$000A  
Bit 7  
6
0
5
0
4
0
3
2
0
1
0
Bit 0  
0
Read:  
Write:  
Reset:  
IRQF  
IRQE  
1
R
0
IRQR  
0
0
0
0
0
0
= Unimplemented  
R
= Reserved  
Figure 5-4. IRQ Status and Control Register (ISCR)  
IRQR — Interrupt Request Reset Bit  
This write-only bit clears the external interrupt request flag.  
1 = Clears external interrupt and IRQF bit  
0 = No effect on external interrupt and IRQF bit  
IRQF — External Interrupt Request Flag  
The external interrupt request flag is a clearable, read-only bit that is set when an external interrupt  
request is pending. Reset clears the IRQF bit.  
1 = External interrupt request pending  
0 = No external interrupt request pending  
IRQE — External Interrupt Request Enable Bit  
This read/write bit enables external interrupts. Reset sets the IRQE bit.  
1 = External interrupt requests enabled  
0 = External interrupt requests disabled  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
54  
Freescale Semiconductor  
Timing  
The STOP and WAIT instructions set the IRQE bit so that an external interrupt can bring the MCU out of  
these low-power modes. In addition, reset sets the I bit which masks all interrupt sources.  
5.5 Timing  
tILIL  
tILIH  
IRQ/VPP PIN  
tILIH  
IRQ1  
.
.
.
IRQn  
IRQ (INTERNAL)  
Figure 5-5. External Interrupt Timing  
Table 5-1. External Interrupt Timing (VDD = 5.0 Vdc)(1)  
Characteristic  
Symbol  
Min  
Max  
Unit  
(2)  
tILIH  
IRQ Interrupt Pulse Width Low (Edge-Triggered)  
1.5  
tcyc  
IRQ Interrupt Pulse Width  
(Edge- and Level-Triggered)  
Note(3)  
tILIH  
tcyc  
1.5  
tILIL  
tILIH  
tcyc  
tcyc  
PA0–PA3 Interrupt Pulse Width High (Edge-Triggered)  
1.5  
1.5  
Note(3)  
PA0–PA3 Interrupt Pulse Width High (Edge- and Level-Triggered)  
1. VDD = 5.0 Vdc 10%, VSS = 0 Vdc, TA = –40°C to + 85°C, unless otherwise noted.  
2. tcyc = 1/fOP; fOP = fOSC/2.  
3. The minimum tILIL should not be less than the number of interrupt service routine cycles plus 19 tcyc  
.
Table 5-2. External Interrupt Timing (VDD = 3.3 Vdc)(1)  
Characteristic  
Symbol  
Min  
Max  
Unit  
(2)  
tILIH  
IRQ Interrupt Pulse Width Low (Edge-Triggered)  
1.5  
tcyc  
IRQ Interrupt Pulse Width  
(Edge- and Level-Triggered)  
Note(3)  
tILIH  
tcyc  
1.5  
tILIL  
tILIH  
tcyc  
tcyc  
PA0–PA3 Interrupt Pulse Width High (Edge-Triggered)  
1.5  
1.5  
Note(3)  
PA0–PA3 Interrupt Pulse Width High (Edge- and Level-Triggered)  
1. VDD = 3.3 Vdc 10%, VSS = 0 Vdc, TA = –40°C to + 85°C, unless otherwise noted.  
2. tcyc = 1/fOP; fOP = fOSC/2.  
3. The minimum tILIL should not be less than the number of interrupt service routine cycles plus 19 tcyc  
.
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
55  
External Interrupt Module (IRQ)  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
56  
Chapter 6  
Low-Power Modes  
6.1 Introduction  
The MCU can enter the following low-power standby modes:  
Stop mode — The STOP instruction puts the MCU in its lowest power-consumption mode.  
Wait mode — The WAIT instruction puts the MCU in an intermediate power-consumption mode.  
Halt mode — Halt mode is identical to wait mode, except that an oscillator stabilization delay of 1  
to 4064 internal clock cycles occurs when the MCU exits halt mode. The stop-to-wait conversion  
bit, SWAIT, in the mask option register, enables halt mode.  
Enabling halt mode prevents the computer operating properly (COP) watchdog from being  
inadvertently turned off by a STOP instruction.  
Data-retention mode — In data-retention mode, the MCU retains RAM contents and CPU register  
contents at VDD voltages as low as 2.0 Vdc. The data-retention feature allows the MCU to remain  
in a low power-consumption state during which it retains data, but the CPU cannot execute  
instructions.  
6.2 Exiting Stop and Wait Modes  
The following events bring the MCU out of stop mode and load the program counter with the reset vector  
or with an interrupt vector:  
Exiting Stop Mode  
External reset — A logic 0 on the RESET pin resets the MCU, starts the CPU clock, and loads the  
program counter with the contents of locations $07FE and $07FF.  
External interrupt — A high-to-low transition on the IRQ/VPP pin or a low-to-high transition on an  
enabled port A external interrupt pin starts the CPU clock and loads the program counter with the  
contents of locations $07FA and $07FB.  
Exiting Wait Mode  
External reset — A logic 0 on the RESET pin resets the MCU, starts the CPU clock, and loads the  
program counter with the contents of locations $07FE and $07FF.  
External interrupt — A high-to-low transition on the IRQ/VPP pin or a low-to-high transition on an  
enabled port A external interrupt pin starts the CPU clock and loads the program counter with the  
contents of locations $07FA and $07FB.  
COP watchdog reset — A timeout of the COP watchdog resets the MCU, starts the CPU clock, and  
loads the program counter with the contents of locations $07FE and $07FF. Software can enable  
timer interrupts so that the MCU periodically can exit wait mode to reset the COP watchdog.  
Timer interrupt — Real-time interrupt requests and timer overflow interrupt requests start the MCU  
clock and load the program counter with the contents of locations $07F8 and $07F9.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
57  
Low-Power Modes  
6.3 Effects of Stop and Wait Modes  
The STOP and WAIT instructions have the following effects on MCU modules.  
6.3.1 Clock Generation  
Effects of STOP and WAIT on clock generation are discussed here.  
6.3.1.1 STOP  
The STOP instruction disables the internal oscillator, stopping the CPU clock and all peripheral clocks.  
After exiting stop mode, the CPU clock and all enabled peripheral clocks begin running after the oscillator  
stabilization delay.  
NOTE  
The oscillator stabilization delay holds the MCU in reset for the first 4064  
internal clock cycles.  
6.3.1.2 WAIT  
The WAIT instruction disables the CPU clock.  
After exiting wait mode, the CPU clock and all enabled peripheral clocks immediately begin running.  
6.3.2 CPU  
Effects of STOP and WAIT on the CPU are discussed here.  
6.3.2.1 STOP  
The STOP instruction:  
Clears the interrupt mask (I bit) in the condition code register, enabling external interrupts  
Disables the CPU clock  
After exiting stop mode, the CPU clock begins running after the oscillator stabilization delay.  
After exit from stop mode by external interrupt, the I bit remains clear.  
After exit from stop mode by reset, the I bit is set.  
6.3.2.2 WAIT  
The WAIT instruction:  
Clears the interrupt mask (I bit) in the condition code register, enabling interrupts  
Disables the CPU clock  
After exit from wait mode by interrupt, the I bit remains clear.  
After exit from wait mode by reset, the I bit is set.  
6.3.3 COP Watchdog  
Effects of STOP and WAIT on the COP watchdog are discussed here.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
58  
Freescale Semiconductor  
Effects of Stop and Wait Modes  
6.3.3.1 STOP  
The STOP instruction:  
Clears the COP watchdog counter  
Disables the COP watchdog clock  
NOTE  
To prevent the STOP instruction from disabling the COP watchdog,  
program the stop-to-wait conversion bit (SWAIT) in the mask option register  
to logic 1.  
After exit from stop mode by external interrupt, the COP watchdog counter immediately begins counting  
from $0000 and continues counting throughout the oscillator stabilization delay.  
NOTE  
Immediately after exiting stop mode by external interrupt, service the COP  
to ensure a full COP timeout period.  
After exit from stop mode by reset:  
The COP watchdog counter immediately begins counting from $0000.  
The COP watchdog counter is cleared at the end of the oscillator stabilization delay and begins  
counting from $0000 again.  
6.3.3.2 WAIT  
The WAIT instruction has no effect on the COP watchdog.  
NOTE  
To prevent a COP timeout during wait mode, exit wait mode periodically to  
service the COP.  
6.3.4 Timer  
Effects of STOP and WAIT on the timer are discussed here.  
6.3.4.1 STOP  
The STOP instruction:  
Clears the RTIE, TOFE, RTIF, and TOF bits in the timer status and control register, disabling timer  
interrupt requests and removing any pending timer interrupt requests  
Disables the clock to the timer  
After exiting stop mode by external interrupt, the timer immediately resumes counting from the last value  
before the STOP instruction and continues counting throughout the oscillator stabilization delay.  
After exiting stop mode by reset and after the oscillator stabilization delay, the timer resumes operation  
from its reset state.  
6.3.4.2 WAIT  
The WAIT instruction has no effect on the timer.  
6.3.5 EPROM/OTPROM  
Effects of STOP and WAIT on the EPROM/OTPROM are discussed here.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
59  
Low-Power Modes  
6.3.5.1 STOP  
The STOP instruction during EPROM programming clears the EPGM bit in the EPROM programming  
register, removing the programming voltage from the EPROM.  
6.3.5.2 WAIT  
The WAIT instruction has no effect on EPROM/OTPROM operation.  
6.4 Data-Retention Mode  
In data-retention mode, the MCU retains RAM contents and CPU register contents at VDD voltages as low  
as 2.0 Vdc. The data-retention feature allows the MCU to remain in a low power-consumption state during  
which it retains data, but the CPU cannot execute instructions.  
To put the MCU in data-retention mode:  
1. Drive the RESET pin to logic 0.  
2. Lower the VDD voltage. The RESET pin must remain low continuously during data-retention mode.  
To take the MCU out of data-retention mode:  
1. Return VDD to normal operating voltage.  
2. Return the RESET pin to logic 1.  
6.5 Timing  
OSC  
(NOTE 1)  
tRL  
RESET  
tILIH  
IRQ/VPP  
(NOTE 2)  
OSCILLATOR STABILIZATION DELAY(5)  
IRQ/VPP  
(NOTE 3)  
INTERNAL  
CLOCK  
INTERNAL  
$07FE  
(NOTE 4)  
ADDRESS  
BUS  
$07FE  
$07FE  
$07FE  
$07FE  
$07FF  
Notes:  
RESET OR INTERRUPT  
VECTOR FETCH  
1. Internal clocking from OSC1 pin  
2. Edge-triggered external interrupt mask option  
3. Edge- and level-triggered external interrupt mask option  
4. Reset vector shown as example  
5. 4064 cycles or 128 cycles, depending on state of SOSCD bit in MOR  
Figure 6-1. Stop Mode Recovery Timing  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
60  
Timing  
STOP  
SWAIT  
BIT SET?  
YES  
HALT  
WAIT  
NO  
CLEAR I BIT IN CCR.  
SET IRQE BIT IN ISCR.  
CLEAR TOF, RTIF, TOIE, AND RTIE BITS IN TSCR.  
TURN OFF INTERNAL OSCILLATOR.  
CLEAR I BIT IN CCR.  
SET IRQE BIT IN ISCR.  
TURN OFF CPU CLOCK.  
TIMER CLOCK ACTIVE.  
CLEAR I BIT IN CCR.  
SET IRQE BIT IN ISCR.  
TURN OFF CPU CLOCK.  
TIMER CLOCK ACTIVE.  
YES  
YES  
EXTERNAL  
RESET?  
EXTERNAL  
RESET?  
YES  
EXTERNAL  
RESET?  
NO  
NO  
NO  
YES  
YES  
YES  
YES  
YES  
YES  
EXTERNAL  
INTERRUPT?  
EXTERNAL  
INTERRUPT?  
YES  
EXTERNAL  
INTERRUPT?  
NO  
NO  
NO  
TIMER  
INTERRUPT?  
TIMER  
INTERRUPT?  
TURN ON INTERNAL OSCILLATOR.  
RESET STABILIZATION TIMER.  
NO  
NO  
COP  
RESET?  
COP  
RESET?  
END OF  
YES  
STABILIZATION  
DELAY?  
NO  
NO  
NO  
TURN ON CPU CLOCK.  
1. LOAD PC WITH RESET VECTOR  
OR  
2. SERVICE INTERRUPT.  
a. SAVE CPU REGISTERS ON STACK.  
b. SET I BIT IN CCR.  
c. LOAD PC WITH INTERRUPT VECTOR.  
Figure 6-2. STOP/HALT/WAIT Flowchart  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
61  
Low-Power Modes  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
62  
Chapter 7  
Parallel I/O Ports (PORTS)  
7.1 Introduction  
Ten bidirectional pins form one 8-bit input/output (I/O) port and one 2-bit I/O port. All the bidirectional port  
pins are programmable as inputs or outputs.  
NOTE  
Connect any unused I/O pins to an appropriate logic level, either VDD or  
VSS. Although the I/O ports do not require termination for proper operation,  
termination reduces excess current consumption and the possibility of  
electrostatic damage.  
Addr.  
Register Name:  
Bit 7  
6
5
4
3
2
1
Bit 0  
Read:  
Port A Data Register (POR-  
PA7  
PA6  
PA5  
PA4  
PA3  
PA2  
PA1  
PA0  
$0000  
TA) Write:  
See page 64.  
Reset:  
Read:  
Unaffected by reset  
0
0
Port B Data Register  
See Note  
PB3  
PB2  
See Note  
$0001  
$0004  
$0005  
$0010  
$0011  
Note:  
(PORTB) Write:  
See page 66.  
Reset:  
Read:  
Unaffected by reset  
Data Direction Register A  
DDRA7  
DDRA6  
DDRA5  
0
DDRA4  
0
DDRA3  
DDRA2  
DDRA1  
0
DDRA0  
0
(DDRA) Write:  
See page 64.  
Reset:  
Read:  
0
0
0
0
0
DDRB3  
0
0
DDRB2  
0
Data Direction Register B  
See Note  
See Note  
(DDRB) Write:  
See page 67.  
Reset:  
Read:  
0
0
0
0
0
0
Port A Pulldown Register  
(PDRA) Write:  
PDIA7  
0
PDIA6  
0
PDIA5  
0
PDIA4  
0
PDIA3  
0
PDIA2  
0
PDIA1  
0
PDIA0  
0
See page 65.  
Reset:  
Read:  
Port B Pulldown Register  
(PDRB) Write:  
See page 68.  
See Note  
PDIB3  
0
PDIB2  
0
See Note  
Reset:  
0
0
0
0
= Unimplemented  
PB5, PB4, PB1, and PB0 should be configured as inputs at all times. These bits are available for read/write but are not  
available externally. Configuring them as inputs will ensure that the pulldown devices are enabled, thus properly termi-  
nating them.  
Figure 7-1. Parallel I/O Port Register Summary  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
63  
Parallel I/O Ports (PORTS)  
7.2 Port A  
Port A is an 8-bit bidirectional port.  
7.2.1 Port A Data Register  
The port A data register contains a latch for each port A pin.  
Address:  
$0000  
Bit 7  
6
5
4
3
2
1
Bit 0  
PA0  
Read:  
Write:  
Reset:  
PA7  
PA6  
PA5  
PA4  
PA3  
PA2  
PA1  
Unaffected by reset  
Figure 7-2. Port A Data Register (PORTA)  
PA[7:0] — Port A Data Bits  
These read/write bits are software programmable. Data direction of each port A pin is under the control  
of the corresponding bit in data direction register A. Reset has no effect on port A data.  
7.2.2 Data Direction Register A  
Data direction register A determines whether each port A pin is an input or an output.  
Address:  
$0004  
Bit 7  
6
DDRA6  
0
5
DDRA5  
0
4
DDRA4  
0
3
DDRA3  
0
2
DDRA2  
0
1
DDRA1  
0
Bit 0  
DDRA0  
0
Read:  
Write:  
Reset:  
DDRA7  
0
Figure 7-3. Data Direction Register A (DDRA)  
DDRA[7:0] — Data Direction Register A Bits  
These read/write bits control port A data direction. Reset clears DDRA[7:0], configuring all port A pins  
as inputs.  
1 = Corresponding port A pin configured as output  
0 = Corresponding port A pin configured as input  
NOTE  
Avoid glitches on port A pins by writing to the port A data register before  
changing data direction register A bits from 0 to 1.  
Figure 7-4 shows the I/O logic of port A.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
64  
Freescale Semiconductor  
Port A  
READ DDRA  
WRITE DDRA  
WRITE PORTA  
DDRAx  
PAx  
10-mA SINK CAPABILITY  
(PINS PA4–PA7 ONLY)  
PAx  
(PA0–PA3 TO  
IRQ MODULE)  
READ PORTA  
WRITE PDRA  
100-µA  
PULLDOWN  
PDRAx  
RESET  
SWPDI  
Figure 7-4. Port A I/O Circuitry  
Writing a logic 1 to a DDRA bit enables the output buffer for the corresponding port A pin; a logic 0  
disables the output buffer.  
When bit DDRAx is a logic 1, reading address $0000 reads the PAx data latch. When bit DDRAx is a logic  
0, reading address $0000 reads the voltage level on the pin. The data latch can always be written,  
regardless of the state of its data direction bit. Table 7-1 summarizes the operation of the port A pins.  
Table 7-1. Port A Pin Operation  
Accesses to Data Bit  
Data Direction Bit  
I/O Pin Mode  
Read  
Pin  
Write  
Latch(1)  
Latch  
0
1
Input, high-impedance  
Output  
Latch  
1. Writing affects the data register but does not affect input.  
7.2.3 Pulldown Register A  
Pulldown register A inhibits the pulldown devices on port A pins programmed as inputs.  
NOTE  
If the SWPDI bit in the mask option register is programmed to logic 1, reset  
initializes all port A pins as inputs with disabled pulldown devices.  
Address:  
$0010  
Bit 7  
6
5
4
3
2
1
Bit 0  
Read:  
Write:  
Reset:  
PDIA7  
0
PDIA6  
0
PDIA5  
0
PDIA4  
0
PDIA3  
0
PDIA2  
0
PDIA1  
0
PDIA0  
0
= Unimplemented  
Figure 7-5. Pulldown Register A (PDRA)  
PDIA[7:0] — Pulldown Inhibit A Bits  
PDIA[7:0] disable the port A pulldown devices. Reset clears PDIA[7:0].  
1 = Corresponding port A pulldown device disabled  
0 = Corresponding port A pulldown device not disabled  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
65  
Parallel I/O Ports (PORTS)  
7.2.4 Port LED Drive Capability  
All outputs can drive light-emitting diodes (LEDs). These pins can sink approximately 10 mA of current to  
VSS.  
7.2.5 Port A I/O Pin Interrupts  
If the PIRQ bit in the mask option register is programmed to logic 1, PA0–PA3 pins function as external  
interrupt pins. (See Chapter 5 External Interrupt Module (IRQ).)  
7.3 Port B  
Port B is a 2-bit bidirectional port.  
7.3.1 Port B Data Register  
The port B data register contains a latch for each port B pin.  
Address:  
$0001  
Bit 7  
0
6
0
5
4
3
2
1
Bit 0  
See Note  
Read:  
Write:  
Reset:  
See Note  
PB3  
PB2  
Unaffected by reset  
= Unimplemented  
Note:  
PB5, PB4, PB1, and PB0 should be configured as inputs at all times. These bits are avail-  
able for read/write but are not available externally. Configuring them as inputs will ensure  
that the pulldown devices are enabled, thus properly terminating them.  
Figure 7-6. Port B Data Register (PORTB)  
PB[3:2] — Port B Data Bits  
These read/write bits are software programmable. Data direction of each port B pin is under the control  
of the corresponding bit in data direction register B. Reset has no effect on port B data.  
NOTE  
PB4–PB5 and PB0–PB1 should be configured as inputs at all times. These  
bits are available for read/write but are not available externally. Configuring  
them as inputs will ensure that the pulldown devices are enabled, thus  
properly terminating them.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
66  
Freescale Semiconductor  
Port B  
7.3.2 Data Direction Register B  
Data direction register B determines whether each port B pin is an input or an output.  
Address:  
$0005  
Bit 7  
0
6
0
5
0
4
0
3
DDRB3  
0
2
DDRB2  
0
1
0
Bit 0  
See Note  
Read:  
Write:  
Reset:  
See Notes  
0
0
0
= Unimplemented  
Note:  
DDRB5, DDRB4, DDRB1, and DDRB0 should be configured as inputs at all times. These  
bits are available for read/write but are not available externally. Configuring them as inputs  
will ensure that the pulldown devices are enabled, thus properly terminating them.  
Figure 7-7. Data Direction Register B (DDRB)  
DDRB[3:2] — Data Direction Register B Bits  
These read/write bits control port B data direction. Reset clears DDRB[3:2], configuring all port B pins  
as inputs.  
1 = Corresponding port B pin configured as output  
0 = Corresponding port B pin configured as input  
NOTE  
Avoid glitches on port B pins by writing to the port B data register before  
changing data direction register B bits from 0 to 1.  
Figure 7-8 shows the I/O logic of port B.  
READ DDRB  
WRITE DDRB  
DDRBx  
WRITE PORTB  
PBx  
PBx  
READ PORTB  
WRITE PDRB  
100-µA  
PULLDOWN  
PDRBx  
RESET  
SWPDI  
Figure 7-8. Port B I/O Circuitry  
Writing a logic 1 to a DDRB bit enables the output buffer for the corresponding port B pin; a logic 0  
disables the output buffer.  
When bit DDRBx is a logic 1, reading address $0001 reads the PBx data latch. When bit DDRBx is a  
logic 0, reading address $0001 reads the voltage level on the pin. The data latch can always be written,  
regardless of the state of its data direction bit. Table 7-2 summarizes the operation of the port B pins.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
67  
Parallel I/O Ports (PORTS)  
Table 7-2. Port B Pin Operation  
Accesses to Data Bit  
Data Direction Bit  
I/O Pin Mode  
Read  
Write  
Latch(1)  
Latch  
0
1
Input, high-impedance  
Output  
Pin  
Latch  
1. Writing affects the data register, but does not affect input.  
7.3.3 Pulldown Register B  
Pulldown register B inhibits the pulldown devices on port B pins programmed as inputs.  
NOTE  
If the SWPDI bit in the mask option register is programmed to logic 1, reset  
initializes all port B pins as inputs with disabled pulldown devices.  
Address:  
$0011  
Bit 7  
6
5
0
4
0
3
2
1
0
Bit 0  
Read:  
Write:  
Reset:  
See Note  
PDIB3  
0
PDIB2  
0
See Note  
0
= Unimplemented  
Note:  
These pulldown devices are permanently enabled when PB5, PB4, PB1 and PB0 are con-  
figured as inputs.  
Figure 7-9. Pulldown Register B (PDRB)  
PDIB[3:2] — Pulldown Inhibit B Bits  
PDIB[3:2] disable the port B pulldown devices. Reset clears PDIB[3:2].  
1 = Corresponding port B pulldown device disabled  
0 = Corresponding port B pulldown device not disabled  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
68  
Freescale Semiconductor  
I/O Port Electrical Characteristics  
7.4 I/O Port Electrical Characteristics  
Table 7-3. I/O Port DC Electrical Characteristics (VDD = 5.0 V)(1)  
Typ(2)  
Characteristic  
Current Drain Per Pin  
Symbol  
Min  
Max  
Unit  
I
25  
mA  
Output High Voltage  
(ILoad = –2.5 mA) PA4–PA7  
(ILoad = –5.5 mA) PB2–PB3, PA0–PA3  
VDD –0.8  
VDD –0.8  
VOH  
V
Output Low Voltage  
(ILoad = 10.0 mA) PA0–PA7, PB2–PB3  
VOL  
VIH  
VIL  
0.8  
VDD  
V
V
V
Input High Voltage  
PA0–PA7, PB2–PB3  
0.7 x VDD  
Input Low Voltage  
PA0–PA7, PB2–PB3  
0.2 x VDD  
VSS  
I/O Ports Hi-Z Leakage Current  
PA0–PA7, PB2–PB3 (Without Individual  
Pulldown Activated)  
IIL  
0.2  
1
µA  
µA  
Input Pulldown Current  
PA0–PA7, PB2–PB3 (With Individual  
Pulldown Activated)  
IIL  
35  
80  
200  
1. VDD = 5.0 Vdc 10%, VSS = 0 Vdc, TA = –40°C to +85°C, unless otherwise noted.  
2. Typical values reflect average measurements at midpoint of voltage range, 25°C.  
Table 7-4. I/O Port DC Electrical Characteristics (VDD = 3.3 V)(1)  
Typ(2)  
Characteristic  
Symbol  
Min  
Max  
Unit  
Current Drain Per Pin  
Output High Voltage  
I
25  
mA  
(ILoad = –0.8 mA) PA4–PA7  
(ILoad = –1.5 mA) PA0–PA3, PB2–PB3  
VDD –0.3  
VDD –0.3  
VOH  
V
V
Output Low Voltage  
(ILoad = 5.0 mA) PA4–PA7  
(ILoad = 3.5 mA) PA0–PA3, PB2–PB3  
VOL  
0.5  
0.5  
Input High Voltage  
PA0–PA7, PB2–PB3  
VIH  
VIL  
0.7 x VDD  
VSS  
VDD  
V
V
Input Low Voltage  
PA0–PA7, PB2–PB3  
0.2 x VDD  
I/O Ports Hi-Z Leakage Current  
PA0–PA7, PB2–PB3 (Without Individual Pulldown  
Activated)  
IIL  
0.1  
30  
1
µA  
µA  
Input Pulldown Current  
PA0–PA7, PB2–PB3 (With Individual Pulldown Activated)  
IIL  
12  
100  
1. VDD = 3.3 Vdc 10%, VSS= 0 Vdc, TA = –40°C to +85°C, unless otherwise noted.  
2. Typical values reflect average measurements at midpoint of voltage range, 25°C.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
69  
Parallel I/O Ports (PORTS)  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
70  
Chapter 8  
Resets and Interrupts  
8.1 Introduction  
Reset initializes the MCU by returning the program counter to a known address and by forcing control and  
status bits to known states.  
Interrupts temporarily change the sequence of program execution to respond to events that occur during  
processing.  
8.2 Resets  
A reset immediately stops the operation of the instruction being executed, initializes certain control and  
status bits, and loads the program counter with a user-defined reset vector address. The following  
sources can generate a reset:  
Power-on reset (POR) circuit  
RESET pin  
Computer operating properly (COP) watchdog  
Illegal address  
ILLEGAL ADDRESS  
COP WATCHDOG  
POWER-ON RESET  
VDD  
TO CPU AND  
PERIPHERAL  
MODULES  
RST  
S
RESET PIN  
D
Q
CK  
RESET  
LATCH  
INTERNAL CLOCK  
Figure 8-1. Reset Sources  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
71  
Resets and Interrupts  
8.2.1 Power-On Reset  
A positive transition on the VDD pin generates a power-on reset.  
NOTE  
The power-on reset is strictly for power-up conditions and cannot be used  
to detect drops in power supply voltage.  
A 4064-tcyc (internal clock cycle) delay after the oscillator becomes active allows the clock generator to  
stabilize. If any reset source is active at the end of this delay, the MCU remains in the reset condition until  
all reset sources are inactive.  
VDD  
OSCILLATOR STABILIZATION DELAY(2)  
(NOTE 1)  
OSC1 PIN  
INTERNAL  
CLOCK  
INTERNAL  
ADDRESS BUS  
$07FE  
$07FE  
$07FE  
$07FE  
$07FE  
$07FE  
$07FF  
INTERNAL  
DATA BUS  
NEW PCL  
NEW PCH  
Notes:  
1. Power-on reset threshold is typically between 1 V and 2 V.  
2. 4064 cycles or 128 cycles, depending on state of SOSCD bit in MOR  
3. Internal clock, internal address bus, and internal data bus are not available externally.  
Figure 8-2. Power-On Reset Timing  
8.2.2 External Reset  
A logic 0 applied to the RESET pin for 1 1/2 tcyc generates an external reset. A Schmitt trigger senses the  
logic level at the RESET pin.  
INTERNAL  
CLOCK  
INTERNAL  
ADDRESS BUS  
$07FE  
$07FE  
$07FE  
$07FE  
$07FF  
NEW PC NEW PC  
OP  
NEW  
PCH  
NEW  
PCL  
INTERNAL  
DATA BUS  
DUMMY  
CODE  
tRL  
RESET  
Notes:  
1. Internal clock, internal address bus, and internal data bus are not available externally.  
2. The next rising edge of the internal clock after the rising edge of RESET initiates the reset sequence.  
Figure 8-3. External Reset Timing  
Table 8-1. External Reset Timing  
Characteristic  
Symbol  
Min  
Max  
Unit  
tRL  
tcyc  
RESET Pulse Width  
1.5  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
72  
Interrupts  
8.2.3 COP Watchdog Reset  
A timeout of the COP watchdog generates a COP reset. The COP watchdog is part of a software error  
detection system and must be cleared periodically to start a new timeout period. To clear the COP  
watchdog and prevent a COP reset, write a logic 0 to bit 0 (COPC) of the COP register at location $07F0.  
8.2.4 Illegal Address Reset  
An opcode fetch from an address not in RAM or EPROM generates a reset.  
8.3 Interrupts  
The following sources can generate interrupts:  
SWI instruction  
External interrupt pins  
IRQ/VPP pin  
PA0–PA3 pins  
Timer  
Real-time interrupt flag (RTIF)  
Timer overflow flag (TOF)  
An interrupt temporarily stops the program sequence to process a particular event. An interrupt does not  
stop the operation of the instruction being executed, but takes effect when the current instruction  
completes its execution. Interrupt processing automatically saves the CPU registers on the stack and  
loads the program counter with a user-defined interrupt vector address.  
8.3.1 Software Interrupt  
The software interrupt (SWI) instruction causes a non-maskable interrupt.  
8.3.2 External Interrupt  
An interrupt signal on the IRQ/VPP pin latches an external interrupt request. When the CPU completes its  
current instruction, it tests the IRQ latch. If the IRQ latch is set, the CPU then tests the I bit in the condition  
code register. If the I bit is clear, the CPU then begins the interrupt sequence.  
The CPU clears the IRQ latch during interrupt processing, so that another interrupt signal on the IRQ/VPP  
pin can latch another interrupt request during the interrupt service routine. As soon as the I bit is cleared  
during the return from interrupt, the CPU can recognize the new interrupt request. Figure 8-4 shows the  
IRQ/VPP pin interrupt logic.  
Setting the I bit in the condition code register disables external interrupts.  
The port A external interrupt bit (PIRQ) in the mask option register enables pins PA0–PA3 to function as  
external interrupt pins.  
The external interrupt sensitivity bit (LEVEL) in the mask option register controls interrupt triggering  
sensitivity of external interrupt pins. The IRQ/VPP pin can be negative-edge triggered only or  
negative-edge and low-level triggered. Port A external interrupt pins can be positive-edge triggered only  
or both positive-edge and high-level triggered. The level-sensitive triggering option allows multiple  
external interrupt sources to be wire-ORed to an external interrupt pin. An external interrupt request,  
shown in Figure 8-5, is latched as long as any source is holding an external interrupt pin low.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
73  
Resets and Interrupts  
TO BIH & BIL  
INSTRUCTION  
PROCESSING  
IRQ  
LEVEL-SENSITIVE TRIGGER  
(MOR LEVEL BIT)  
IRQF  
V
DD  
EXTERNAL  
INTERRUPT  
REQUEST  
IRQ  
LATCH  
CK  
D
Q
PA3  
PA2  
PA1  
PA0  
IRQE  
CLR  
PIRQ  
(MOR)  
RESET  
IRQ VECTOR FETCH  
IRQR  
Figure 8-4. External Interrupt Logic  
tILIL  
tILIH  
EXT. INT. PIN  
tILIH  
EXT. INT. PIN1  
.
.
.
EXT. INT. PINn  
IRQ  
(INTERNAL)  
Figure 8-5. External Interrupt Timing  
Table 8-2. External Interrupt Timing (VDD = 5.0 Vdc)(1)  
Characteristic  
Symbol  
Min  
Max  
Unit  
ns  
tILIH  
Interrupt Pulse Width Low (Edge-Triggered)  
125  
Note(2)  
tILIL  
tcyc  
Interrupt Pulse Period  
1. VDD = 5.0 Vdc 10%, VSS = 0 Vdc, TA = –40°C to +85°C, unless otherwise noted.  
2. The minimum tILIL should not be less than the number of interrupt service routine cycles plus 19 tcyc  
.
Table 8-3. External Interrupt Timing (VDD = 3.3 Vdc)(1)  
Characteristic  
Interrupt Pulse Width Low (Edge-Triggered)  
Symbol  
Min  
Max  
Unit  
ns  
tILIH  
250  
Note(2)  
tILIL  
tcyc  
Interrupt Pulse Period  
1. VDD = 3.3 Vdc 10%, VSS = 0 Vdc, TA = –40°C to +85°C unless otherwise noted.  
2. The minimum tILIL should not be less than the number of interrupt service routine cycles plus 19 tcyc  
.
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
74  
Freescale Semiconductor  
Interrupts  
8.3.3 Timer Interrupts  
The timer can generate the following interrupt requests:  
Real time  
Timer overflow  
Setting the I bit in the condition code register disables timer interrupts.  
8.3.3.1 Real-Time Interrupt  
A real-time interrupt occurs if the real-time interrupt flag, RTIF, becomes set while the real-time interrupt  
enable bit, RTIE, is also set. RTIF and RTIE are in the timer status and control register.  
8.3.3.2 Timer Overflow Interrupt  
A timer overflow interrupt request occurs if the timer overflow flag, TOF, becomes set while the timer  
overflow interrupt enable bit, TOIE, is also set. TOF and TOIE are in the timer status and control register.  
8.3.4 Interrupt Processing  
The CPU takes the following actions to begin servicing an interrupt:  
Stores the CPU registers on the stack in the order shown in Figure 8-6  
Sets the I bit in the condition code register to prevent further interrupts  
Loads the program counter with the contents of the appropriate interrupt vector locations:  
$07FC and $07FD (software interrupt vector)  
$07FA and $07FB (external interrupt vector)  
$07F8 and $07F9 (timer interrupt vector)  
The return-from-interrupt (RTI) instruction causes the CPU to recover the CPU registers from the stack  
as shown in Figure 8-6.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
75  
Resets and Interrupts  
$00C0 (BOTTOM OF STACK)  
$00C1  
$00C2  
UNSTACKING  
ORDER  
5
4
3
2
1
1
2
3
4
5
CONDITION CODE REGISTER  
ACCUMULATOR  
INDEX REGISTER  
PROGRAM COUNTER (HIGH BYTE)  
PROGRAM COUNTER (LOW BYTE)  
STACKING  
ORDER  
$00FD  
$00FE  
$00FF (TOP OF STACK)  
Figure 8-6. Interrupt Stacking Order  
Table 8-4. Reset/Interrupt Vector Addresses  
Local  
Mask  
Global  
Mask  
Priority  
(1 = Highest)  
Vector  
Address  
Function  
Source  
Power-On  
RESET Pin  
COP Watchdog(1)  
Illegal Address  
Reset  
None  
None  
1
$07FE$07FF  
Software Interrupt  
(SWI)  
Same Priority  
as Instruction  
User Code  
None  
IRQE  
None  
I Bit  
$07FC$07FD  
$07FA$07FB  
$07F8$07F9  
IRQ/VPP Pin  
External Interrupt  
Timer Interrupts  
2
3
RTIF Bit  
TOF Bit  
RTIE Bit  
TOIE Bit  
I Bit  
1. The COP watchdog is programmable in the mask option register.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
76  
Interrupts  
FROM RESET  
YES  
I BIT SET?  
NO  
YES  
EXTERNAL  
INTERRUPT?  
CLEAR IRQ LATCH.  
NO  
TIMER  
INTERRUPT?  
YES  
STACK PC, X, A, CCR.  
SET I BIT.  
LOAD PC WITH INTERRUPT VECTOR.  
NO  
FETCH NEXT  
INSTRUCTION.  
SWI  
INSTRUCTION?  
YES  
NO  
RTI  
INSTRUCTION?  
YES  
UNSTACK CCR, A, X, PC.  
EXECUTE INSTRUCTION.  
NO  
Figure 8-7. Interrupt Flowchart  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
77  
Resets and Interrupts  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
78  
Chapter 9  
Multifunction Timer Module  
9.1 Introduction  
The multifunction timer provides a timing reference with programmable real-time interrupt capability.  
Figure 9-2 shows the timer organization.  
9.2 Features  
Features of the multifunction timer include:  
Timer overflow  
Four selectable interrupt rates  
Computer operating properly (COP) watchdog timer  
9.3 Operation  
A 15-stage ripple counter, preceded by a prescaler that divides the internal clock signal by four, provides  
the timing reference for the timer functions. The value of the first eight timer stages can be read at any  
time by accessing the timer counter register at address $0009. A timer overflow function at the eighth  
stage allows a timer interrupt every 1024 internal clock cycles.  
The next four stages lead to the real-time interrupt (RTI) circuit. The RT1 and RT0 bits in the timer status  
and control register at address $0008 allow a timer interrupt every 16,384, 32,768, 65,536, or 131,072  
clock cycles. The last four stages drive the selectable COP system. For information on the COP, refer to  
Chapter 3 Computer Operating Properly Module (COP).  
Addr.  
Register Name  
Bit 7  
6
5
4
3
0
2
0
1
Bit 0  
Read:  
TOF  
RTIF  
Timer Status and Control Register  
TOIE  
RTIE  
RT1  
RT0  
$0008  
(TSCR) Write:  
TOFR  
0
RTIFR  
0
See page 81.  
Reset:  
0
0
0
0
1
1
Timer Counter Register Read:  
(TCR)  
TMR7  
TMR6  
TMR5  
TMR4  
TMR3  
TMR2  
TMR1  
TMR0  
$0009  
Write:  
See page 82.  
Reset:  
0
0
0
0
0
0
0
0
= Unimplemented  
Figure 9-1. I/O Register Summary  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
79  
Multifunction Timer Module  
RESET  
OVERFLOW  
INTERNAL CLOCK  
÷ 4  
TIMER COUNTER REGISTER  
(XTAL ÷ 2)  
BITS [0:7] OF 15-STAGE  
RIPPLE COUNTER  
RESET  
INTERRUPT  
REQUEST  
TIMER STATUS/CONTROL REGISTER  
RTI RATE SELECT  
RESET  
÷ 2  
÷ 2  
÷ 2  
÷ 2  
÷ 2  
÷ 2  
÷ 2  
BITS [8:14] OF 15-STAGE RIPPLE COUNTER  
COP RESET  
÷ 8  
S
Q
R
RESET  
Figure 9-2. Multifunction Timer Block Diagram  
9.4 Interrupts  
The following timer sources can generate interrupts:  
Timer overflow flag (TOF) — The TOF bit is set when the first eight stages of the counter roll over  
from $FF to $00. The timer overflow interrupt enable bit, TOIE, enables TOF interrupt requests.  
Real-time interrupt flag (RTIF) — The RTIF bit is set when the selected RTI output becomes active.  
The real-time interrupt enable bit, RTIE, enables RTIF interrupt requests.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
80  
Freescale Semiconductor  
I/O Registers  
9.5 I/O Registers  
The following registers control and monitor the timer operation:  
Timer status and control register (TSCR)  
Timer counter register (TCR)  
9.5.1 Timer Status and Control Register  
The read/write timer status and control register performs the following functions:  
Flags timer interrupts  
Enables timer interrupts  
Resets timer interrupt flags  
Selects real-time interrupt rates  
Address:  
$0008  
Bit 7  
6
5
TOIE  
0
4
RTIE  
0
3
2
1
RT1  
1
Bit 0  
RT0  
1
Read:  
Write:  
Reset:  
TOF  
RTIF  
0
TOFR  
0
0
RTIFR  
0
0
0
= Unimplemented  
Figure 9-3. Timer Status and Control Register (TSCR)  
TOF — Timer Overflow Flag  
This read-only flag becomes set when the first eight stages of the counter roll over from $FF to $00.  
TOF generates a timer overflow interrupt request if TOIE is also set. Clear TOF by writing a logic 1 to  
the TOFR bit. Writing to TOF has no effect. Reset clears TOF.  
RTIF — Real-Time Interrupt Flag  
This read-only flag becomes set when the selected RTI output becomes active. RTIF generates a  
real-time interrupt request if RTIE is also set. Clear RTIF by writing a logic 1 to the RTIFR bit. Writing  
to RTIF has no effect. Reset clears RTIF.  
TOIE — Timer Overflow Interrupt Enable Bit  
This read/write bit enables timer overflow interrupts. Reset clears TOIE.  
1 = Timer overflow interrupts enabled  
0 = Timer overflow interrupts disabled  
RTIE — Real-Time Interrupt Enable Bit  
This read/write bit enables real-time interrupts. Reset clears RTIE.  
1 = Real-time interrupts enabled  
0 = Real-time interrupts disabled  
TOFR — Timer Overflow Flag Reset Bit  
Writing a logic 1 to this write-only bit clears the TOF bit. TOFR always reads as logic 0. Reset clears  
TOFR.  
RTIFR — Real-Time Interrupt Flag Reset Bit  
Writing a logic 1 to this write-only bit clears the RTIF bit. RTIFR always reads as logic 0. Reset clears  
RTIFR.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
81  
Multifunction Timer Module  
RT1 and RT0 — Real-Time Interrupt Select Bits  
These read/write bits select one of four real-time interrupt rates, as shown in Table 9-1. Because the  
selected RTI output drives the COP watchdog, changing the real-time interrupt rate also changes the  
counting rate of the COP watchdog. Reset sets RT1 and RT0.  
NOTE  
Changing RT1 and RT0 when a COP timeout is imminent can cause a  
real-time interrupt request to be missed or an additional real-time interrupt  
request to be generated. To prevent this occurrence, clear the COP timer  
before changing RT1 and RT0.  
Table 9-1. Real-Time Interrupt Rate Selection  
Minimum COP Timeout  
RTI Period  
(fOP = 2 MHz)  
COP Timeout Period  
(–0/+1 RTI Period)  
Period  
(fOP = 2 MHz)  
RT1:RT0  
RTI Rate  
fOP ÷ 214  
fOP ÷ 215  
fOP ÷ 216  
fOP ÷ 217  
0 0  
0 1  
1 0  
1 1  
8.2 ms  
16.4 ms  
32.8 ms  
65.5 ms  
8 x RTI Period  
8 x RTI Period  
8 x RTI Period  
8 x RTI Period  
65.5 ms  
131.1 ms  
262.1 ms  
524.3 ms  
9.5.2 Timer Counter Register  
A 15-stage ripple counter is the core of the timer. The value of the first eight stages is readable at any  
time from the read-only timer counter register shown in Figure 9-4.  
Address:  
$0009  
Bit 7  
6
5
4
3
2
1
Bit 0  
Read:  
Write:  
Reset:  
TCR7  
TCR6  
TCR5  
TCR4  
TCR3  
TCR2  
TCR1  
TCR0  
0
0
0
0
0
0
0
0
= Unimplemented  
Figure 9-4. Timer Counter Register (TCR)  
Power-on clears the entire counter chain and the internal clock begins clocking the counter. After 4064  
cycles (or 16 cycles if the SOSCD bit in the mask option register is set), the power-on reset circuit is  
released, clearing the counter again and allowing the MCU to come out of reset.  
A timer overflow function at the eighth counter stage allows a timer interrupt every 1024 internal clock  
cycles.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
82  
Freescale Semiconductor  
Low-Power Modes  
9.6 Low-Power Modes  
The STOP and WAIT instructions put the MCU in low power-consumption standby states.  
9.6.1 Stop Mode  
The STOP instruction has the following effects on the timer:  
Clears the timer counter  
Clears interrupt flags (TOF and RTIF) and interrupt enable bits (TOFE and RTIE) in TSCR,  
removing any pending timer interrupt requests and disabling further timer interrupts  
9.6.2 Wait Mode  
The timer remains active after a WAIT instruction. Any enabled timer interrupt request can bring the MCU  
out of wait mode.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
83  
Multifunction Timer Module  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
84  
Chapter 10  
Electrical Specifications  
10.1 Maximum Ratings  
Maximum ratings are the extreme limits to which the microcontroller unit (MCU) can be exposed without  
permanently damaging it.  
NOTE  
This device is not guaranteed to operate properly at the maximum ratings.  
For guaranteed operating conditions, refer to 10.5 5.0-V DC Electrical  
Characteristics and 10.6 3.3-V DC Electrical Characteristics  
Table 10-1. Maximum Ratings(1)  
Rating  
Symbol  
Value  
–0.3 to +7.0  
Unit  
V
VDD  
Supply Voltage  
Current Drain per Pin (Excluding VDD, VSS  
)
I
25  
mA  
V
VIn  
VSS – 0.3 to VDD + 0.3  
VSS – 0.3 to 2 x VDD + 0.3  
Input Voltage  
IRQ/VPP Pin  
VPP  
TSTG  
V
Storage Temperature Range  
–65 to +150  
°C  
1. Voltages are referenced to V  
.
SS  
10.2 Operating Temperature Range  
Value (TL to TH)  
Package Type  
Symbol  
Unit  
MC68HC705KJ1C(1)P(2), CDW(3), CS(4)  
TA  
–40 to +85  
°C  
1. C = extended temperature range  
2. P = plastic dual in-line package (PDIP)  
3. DW = small outline integrated circuit (SOIC)  
4. S = ceramic DIP (Cerdip)  
10.3 Thermal Characteristics  
Characteristic  
Symbol  
Value  
Unit  
Thermal Resistance  
MC68HC705KJ1P(1)  
MC68HC705KJ1DW(2)  
MC68HC705KJ1S(3)  
θJA  
60  
°C/W  
1. P = plastic dual in-line package (PDIP)  
2. DW = small outline integrated circuit (SOIC)  
3. S = ceramic DIP (Cerdip)  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
85  
Electrical Specifications  
10.4 Power Considerations  
The average chip junction temperature, TJ, in °C can be obtained from:  
T
= T + (P × θ )  
(1)  
J
A
D
JA  
where:  
TA = ambient temperature in °C  
θ
JA = package thermal resistance, junction to ambient in °C/W  
PD = PINT + PI/O  
PINT = ICC × VCC = chip internal power dissipation  
PI/O = power dissipation on input and output pins (user-determined)  
For most applications, PI/O  
PINT and can be neglected.  
Ignoring PI/O, the relationship between PD and TJ is approximately:  
K
-----------------------------------  
J
P
=
(2)  
(3)  
D
T
+ 273 °C  
Solving equations (1) and (2) for K gives:  
= P x (T + 273°C) + ΘJ x (P )  
D
A
A
D
where K is a constant pertaining to the particular part. K can be determined from equation (3) by  
measuring PD (at equilibrium) for a known TA. Using this value of K, the values of PD and TJ can be  
obtained by solving equations (1) and (2) iteratively for any value of TA.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
86  
Freescale Semiconductor  
5.0-V DC Electrical Characteristics  
10.5 5.0-V DC Electrical Characteristics  
Characteristic(1)  
Typ(2)  
Symbol  
Min  
Max  
Unit  
Output high voltage  
(ILoad = –2.5 mA) PA4–PA7  
(ILoad = –5.5 mA) PB2–PB3, PA0–PA3  
VDD –0.8  
VDD –0.8  
VOH  
V
Output low voltage(8)  
(ILoad = 10.0 mA) PA0–PA7, PB2–PB3  
VOL  
VIH  
VIL  
0.7 × VDD  
VSS  
0.8  
VDD  
V
V
V
Input high voltage  
PA0–PA7, PB2–PB3, IRQ/VPP, RESET, OSC1  
Input low voltage  
PA0–PA7, PB2–PB3, IRQ/VPP, RESET, OSC1  
0.2 × VDD  
Supply current (fOP = 2.1 MHz; fOSC = 4.2 MHz)  
Run mode(3)  
Wait mode(4)  
Stop mode(5)  
4.0  
1.0  
0.1  
6.0  
2.8  
5.0  
mA  
mA  
µA  
IDD  
Supply current (fOP = 4.0 MHz; fOSC = 8.0 MHz)  
Run mode(3)  
Wait mode(4)  
Stop mode(5)  
5.2  
1.1  
0.1  
7.0  
3.3  
5.0  
mA  
mA  
µA  
IDD  
I/O Ports Hi-Z leakage current  
PA0–PA7, PB2–PB3 (without individual pulldown activated)  
IIL  
IIL  
IIL  
35  
0.2  
80  
1
µA  
µA  
µA  
Input pulldown current  
PA0–PA7, PB2–PB3 (with individual pulldown activated)  
200  
–85  
Input pullup current  
RESET  
–15  
–35  
Input current(6)  
RESET, IRQ/VPP, OSC1  
IIn  
0.2  
1
µA  
pF  
Capacitance  
Ports (As Inputs or Outputs)  
RESET, IRQ, OSC1, OSC2  
COut  
CIn  
12  
8
Crystal/ceramic resonator oscillator mode internal resistor  
OSC1 to OSC2(7)  
ROSC  
1.0  
2.0  
3.0  
MΩ  
1. VDD = 5.0 Vdc 10%, VSS = 0 Vdc, TA = –40°C to +85°C, unless otherwise noted.  
2. Typical values at midpoint of voltage range, 25°C only  
3. Run mode IDD is measured using external square wave clock source; all inputs 0.2 V from rail; no dc loads; less than 50 pF  
on all outputs; CL = 20 pF on OSC2.  
4. Wait mode IDD: only timer system active. Wait mode is affected linearly by OSC2 capacitance. Wait mode is measured  
with all ports configured as inputs; VIL = 0.2 V; VIH = VDD – 0.2 V. Wait mode IDD is measured using external square wave  
clock source; all inputs 0.2 V from rail; no dc loads; less than 50 pF on all outputs; CL = 20 pF on OSC2.  
5. Stop mode IDD is measured with OSC1 = VSS. Stop mode IDD is measured with all ports configured as inputs; VIL = 0.2 V;  
VIH = VDD – 0.2 V.  
6. Only input high current rated to +1 µA on RESET.  
7. The ROSC value selected for RC oscillator versions of this device is unspecified.  
8. Maximum current drain for all I/O pins combined should not exceed 100 mA.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
87  
Electrical Specifications  
10.6 3.3-V DC Electrical Characteristics  
Characteristic(1)  
Typ(2)  
Symbol  
Min  
Max  
Unit  
Output high voltage  
(ILoad = –0.8 mA) PA4–PA7  
(ILoad = –1.5 mA) PA0–PA3, PB2–PB3  
VDD –0.3  
VDD –0.3  
VOH  
V
Output low voltage  
(ILoad = 5.0 mA) PA4–PA7  
(ILoad = 3.5 mA) PA0–PA3, PB2–PB3  
VOL  
0.5  
0.5  
V
Input high voltage  
PA0–PA7, PB2–PB3, IRQ/VPP, RESET, OSC1  
VIH  
VIL  
0.7 × VDD  
VDD  
V
V
Input low voltage  
PA0–PA7, PB2–PB3, IRQ/VPP, RESET, OSC1  
VSS  
0.2 × VDD  
Supply current (fOP = 1.0 MHz; fOSC = 2.0 MHz)  
Run mode(3)  
Wait mode(4)  
Stop mode(5)  
1.2  
0.3  
0.1  
2.5  
0.8  
5.0  
mA  
mA  
µA  
IDD  
Supply current (fOP = 2.1 MHz; fOSC = 4.2 MHz)  
Run mode(3)  
Wait mode(4)  
Stop mode(5)  
1.4  
0.3  
0.1  
3.0  
1.0  
5.0  
mA  
mA  
µA  
IDD  
I/O ports hi-z leakage current  
PA0–PA7, PB2–PB3 (without individual pulldown activated)  
IIL  
IIL  
IIL  
12  
0.1  
30  
1
µA  
µA  
µA  
Input pulldown current  
PA0–PA7, PB2–PB3 (with individual pulldown activated)  
100  
–45  
Input pullup current  
RESET  
–10  
–25  
Input current(6)  
RESET, IRQ/VPP, OSC1  
IIn  
0.1  
1
µA  
pF  
Capacitance  
Ports (as inputs or outputs)  
RESET, IRQ/VPP, OSC1, OSC2  
COut  
CIn  
12  
8
Crystal/ceramic resonator oscillator mode internal resistor  
OSC1 to OSC2(7)  
ROSC  
1.0  
2.0  
3.0  
MΩ  
1. VDD = 3.3 Vdc 10%, VSS = 0 Vdc, TA = –40°C to +85°C, unless otherwise noted.  
2. Typical values at midpoint of voltage range, 25°C only  
3. Run mode IDD is measured using external square wave clock source; all inputs 0.2 V from rail; no dc loads; less than 50 pF  
on all outputs; CL = 20 pF on OSC2.  
4. Wait mode IDD: only timer system active. Wait mode is affected linearly by OSC2 capacitance. Wait mode is measured  
with all ports configured as inputs; VIL = 0.2 V; VIH = VDD – 0.2 V. Wait mode IDD is measured using external square wave  
clock source; all inputs 0.2 V from rail; no dc loads; less than 50 pF on all outputs; CL = 20 pF on OSC2.  
5. Stop mode IDD is measured with OSC1 = VSS. Stop mode IDD is measured with all ports configured as inputs; VIL = 0.2 V;  
VIH = VDD – 0.2 V.  
6. Only input high current rated to +1 µA on RESET.  
7. The ROSC value selected for RC oscillator versions of this device is unspecified.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
88  
Freescale Semiconductor  
Driver Characteristics  
10.7 Driver Characteristics  
800  
800  
700  
600  
500  
400  
300  
200  
100  
0
85°C  
25°C  
85°C  
25°C  
700  
600  
–40°C  
500  
–40°C  
400  
300  
200  
VDD = 5.0 V  
VDD = 3.3 V  
100  
0
0
–2  
–4  
–6  
–8  
–10  
0
–2  
–4  
–6  
–8  
–10  
I
OH (mA)  
IOH (mA)  
Notes:  
1. At VDD = 5.0 V, devices are specified and tested for (VDD – VOH) 800 mV @ IOH = –2.5 mA.  
2. At VDD = 3.3 V, devices are specified and tested for (VDD – VOH) 300 mV @ IOH = –0.8 mA.  
Figure 10-1. PA4–PA7 Typical High-Side Driver Characteristics  
800  
700  
600  
500  
400  
300  
200  
100  
0
800  
85°C  
25°C  
25°C  
700  
600  
500  
400  
300  
200  
100  
0
85°C  
–40°C  
–40°C  
VDD = 5.0 V  
VDD = 3.3 V  
0
–2  
–4  
–6  
–8  
–10  
0
–2  
–4  
–6  
–8  
–10  
I
OH (mA)  
IOH (mA)  
Notes:  
1. At VDD = 5.0 V, devices are specified and tested for (VDD – VOH) 800 mV @ IOH = –5.5 mA.  
2. At VDD = 3.3 V, devices are specified and tested for (VDD – VOH) 300 mV @ IOH = –1.5 mA.  
Figure 10-2. PA0–PA3 and PB2–PB3 Typical High-Side Driver Characteristics  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
89  
Electrical Specifications  
800  
700  
600  
500  
400  
300  
200  
100  
0
800  
700  
600  
500  
400  
300  
200  
100  
0
85°C  
25°C  
85°C  
25°C  
–40°C  
–40°C  
VDD = 5.0 V  
VDD = 3.3 V  
0
10  
20  
30  
IOL (mA)  
40  
50  
0
10  
20  
30  
IOL (mA)  
40  
50  
Notes:  
1. At VDD = 5.0 V, devices are specified and tested for VOL 800 mV @ IOL = 10.0 mA.  
2. At VDD = 3.3 V, devices are specified and tested for VOL 500 mV @ IOL = 5.0 mA.  
Figure 10-3. PA4–PA7 Typical Low-Side Driver Characteristics  
800  
800  
700  
600  
500  
400  
300  
200  
100  
0
85°C  
85°C  
700  
600  
500  
400  
300  
200  
100  
0
25°C  
–40°C  
25°C  
–40°C  
VDD = 5.0 V  
VDD = 3.3 V  
0
10  
20  
30  
0
10  
20  
30  
IOL (mA)  
I
OL (mA)  
Notes:  
1. At VDD = 5.0 V, devices are specified and tested for VOL 800 mV @ IOL = 10.0 mA.  
2. At VDD = 3.3 V, devices are specified and tested for VOL 500 mV @ IOL = 3.5 mA.  
Figure 10-4. PA0–PA3 and PB2–PB3 Typical Low-Side Driver Characteristics  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
90  
Freescale Semiconductor  
Typical Supply Currents  
10.8 Typical Supply Currents  
7.0 mA  
6.0 mA  
5.0 mA  
SEE NOTE 1  
5.5 V  
SEE NOTE 2  
4.0 mA  
4.5 V  
3.0 mA  
2.0 mA  
3.6 V  
3.0 V  
Notes:  
1.0 mA  
1. At VDD = 5.0 V, devices are specified and  
tested for IDD 7.0 mA @ fOP = 4.0 MHz.  
2. At VDD = 3.3 V, devices are specified and  
tested for IDD 4.25 mA @ fOP = 2.1 MHz.  
0
0
1.0 MHz  
2.0 MHz  
3.0 MHz  
4.0 MHz  
INTERNAL OPERATING FREQUENCY (fOP  
)
Figure 10-5. Typical Operating IDD (25°C)  
SEE NOTE 1  
SEE NOTE 2  
700 µA  
5.5 V  
600 µA  
500 µA  
400 µA  
300 µA  
200 µA  
100 µA  
0
4.5 V  
3.6 V  
3.0 V  
Notes:  
1. At VDD = 5.0 V, devices are specified and  
tested for IDD 3.25 mA @ fOP = 4.0 MHz.  
2. At VDD = 3.3 V, devices are specified and  
tested for IDD 1.75 mA @ fOP = 2.1 MHz.  
0
1.0 MHz  
2.0 MHz  
3.0 MHz  
4.0 MHz  
INTERNAL OPERATING FREQUENCY (fOP  
)
Figure 10-6. Typical Wait Mode IDD (25°C)  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
91  
Electrical Specifications  
10.9 EPROM Programming Characteristics  
Characteristic(1)  
Symbol  
Min  
Typ  
Max  
Unit  
Programming voltage  
IRQ/VPP  
VPP  
16.0  
16.5  
17.0  
V
Programming current  
IRQ/VPP  
IPP  
—¦  
3.0  
10.0  
mA  
ms  
Programming time  
Per array byte  
MOR  
tEPGM  
tMPGM  
4
4
1. VDD = 5.0 Vdc 10%, VSS = 0 Vdc, T = 40°C to +85°C, unless otherwise noted.  
A
10.10 Control Timing  
Table 10-2. Control Timing (VDD = 5.0 Vdc)(1)  
Characteristic  
Symbol  
Min  
Max  
Unit  
Oscillator frequency  
Crystal oscillator option  
External clock source  
fOSC  
dc  
8.0  
8.0  
MHz  
MHz  
Internal operating frequency (fOSC ÷ 2)  
Crystal oscillator  
External clock  
fOP  
dc  
4.0  
4.0  
Cycle time (1 ÷ fOP  
)
tcyc  
tRL  
250  
1.5  
ns  
tcyc  
RESET pulse width low  
IRQ interrupt pulse width low  
(edge-triggered)  
tILIH  
tILIL  
tIHIL  
tIHIH  
tcyc  
tcyc  
tcyc  
1.5  
1.5  
1.5  
IRQ interrupt pulse width low  
(edge- and level-triggered)  
Note(2)  
PA0–PA3 Interrupt pulse width high  
(edge-triggered)  
PA0–PA3 interrupt pulse width  
(edge- and level-triggered)  
Note(2)  
tcyc  
ns  
1.5  
t
OH, tOL  
OSC1 pulse width  
100  
1. VDD = 5.0 Vdc 10%, VSS = 0 Vdc, T = 40°C to +85°C, unless otherwise noted.  
A
2. The maximum width tILIL or tILIH should not be more than the number of cycles it takes to execute the interrupt service  
routine plus 19 tcyc or the interrupt service routine will be re-entered.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
92  
Freescale Semiconductor  
Control Timing  
Table 10-3. Control Timing (VDD = 3.3 Vdc)(1)  
Characteristic  
Symbol  
Min  
Max  
Unit  
Oscillator frequency  
Crystal oscillator option  
External clock source  
fOSC  
dc  
4.2  
4.2  
MHz  
Internal operating frequency (fOSC ÷ 2)  
Crystal oscillator  
External clock  
fOP  
dc  
2.1  
2.1  
MHz  
Cycle time (1 ÷ fOP  
)
tcyc  
tRL  
476  
1.5  
ns  
tcyc  
RESET pulse width low  
IRQ interrupt pulse width low  
(edge-triggered)  
tILIH  
tILIL  
tIHIL  
tcyc  
tcyc  
tcyc  
1.5  
1.5  
1.5  
IRQ interrupt pulse width low  
(edge- and level-triggered)  
Note(2)  
PA0–PA3 interrupt pulse width high  
(edge-triggered)  
PA0–PA3 interrupt pulse width  
(edge- and level-triggered)  
Note(2)  
tIHIH  
tcyc  
ns  
1.5  
tOH, tOL  
OSC1 pulse width  
200  
1. VDD = 3.3 Vdc 10%, VSS = 0 Vdc, T = 40°C to +85°C, unless otherwise noted.  
A
2. The maximum width tILIL or tILIH should not be more than the number of cycles it takes to execute the interrupt service  
routine plus 19 tcyc or the interrupt service routine will be re-entered.  
tILIL  
tILIH  
IRQ PIN  
tILIH  
IRQ1  
.
.
.
IRQn  
IRQ  
(INTERNAL)  
Figure 10-7. External Interrupt Timing  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
93  
Electrical Specifications  
OSC (NOTE 1)  
tRL  
RESET  
tILIH  
IRQ (NOTE 2)  
OSCILLATOR STABILIZATION DELAY(5)  
IRQ (NOTE 3)  
INTERNAL  
CLOCK  
INTERNAL  
ADDRESS BUS  
07FE  
(NOTE 4)  
07FE  
07FE  
07FE  
07FE  
07FF  
RESET OR INTERRUPT  
VECTOR FETCH  
Notes:  
1. Internal clocking from OSC1 pin  
2. Edge-triggered external interrupt mask option  
3. Edge- and level-triggered external interrupt mask option  
4. Reset vector shown as example  
5. 4064 tcyc or 128 tcyc, depending on the state of SOSCD bit in MOR  
Figure 10-8. Stop Mode Recovery Timing  
VDD  
(NOTE 1)  
OSCILLATOR STABILIZATION DELAY(3)  
OSC1 PIN  
INTERNAL  
CLOCK  
INTERNAL  
ADDRESS BUS  
07FE  
07FE  
07FE  
07FE  
07FE  
07FE  
07FF  
INTERNAL  
DATA BUS  
NEW  
PCH  
NEW  
PCL  
NOTES:  
1. Power-on reset threshold is typically between 1 V and 2 V.  
2. Internal clock, internal address bus, and internal data bus are not available externally.  
3. 4064 tcyc or 128 tcyc depending on the state of SOSCD bit in MOR  
Figure 10-9. Power-On Reset Timing  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
94  
Control Timing  
INTERNAL  
CLOCK  
INTERNAL  
ADDRESS BUS  
07FE  
07FE  
07FE  
07FE  
07FF  
NEW PC  
DUMMY  
NEW PC  
INTERNAL  
DATA BUS  
NEW  
PCH  
NEW  
PCL  
OP  
CODE  
tRL  
NOTES:  
1. Internal clock, internal address bus, and internal data bus are not available externally.  
2. The next rising edge of the internal clock after the rising edge of RESET initiates the reset sequence.  
Figure 10-10. External Reset Timing  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
95  
Electrical Specifications  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
96  
Chapter 11  
Ordering Information and Mechanical Specifications  
11.1 Introduction  
The MC68HC705J1A, the RC oscillator, and low-speed option devices described in Appendix A  
MC68HRC705KJ1 and Appendix B MC68HLC705KJ1 are available in these packages:  
648 — Plastic dual in-line package (PDIP)  
751G — Small outline integrated circuit (SOIC)  
620A — Ceramic DIP (Cerdip) (windowed)  
This section contains ordering information and mechanical specifications for the available package types.  
11.2 MCU Order Numbers  
Table 11-1 lists the MC order numbers.  
Table 11-1. Order Numbers(1)  
Package  
Type  
Case  
Outline  
Pin  
Count  
Operating  
Temperature  
Order Number  
PDIP  
SOIC  
Cerdip  
648  
16  
16  
16  
–40 to +85°C  
–40 to +85°C  
–40 to +85°C  
MC68HC705KJ1C(2)  
MC68HC705KJ1CDW(3)  
MC68HC705KJ1CS(4)  
751G  
620A  
1. Refer to Appendix A MC68HRC705KJ1 and Appendix B MC68HLC705KJ1 for ordering  
information on optional low-speed and resistor-capacitor oscillator devices.  
2. C = extended temperature range  
3. DW = small outline integrated circuit (SOIC)  
4. S = ceramic dual in-line package (Cerdip)  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
97  
Ordering Information and Mechanical Specifications  
11.3 16-Pin PDIP — Case #648  
NOTES:  
1. DIMENSIONING AND TOLERANCING PER ANSI  
Y14.5M, 1982.  
–A–  
2. CONTROLLING DIMENSION: INCH.  
3. DIMENSION L TO CENTER OF LEADS WHEN  
FORMED PARALLEL.  
4. DIMENSION B DOES NOT INCLUDE MOLD FLASH.  
5. ROUNDED CORNERS OPTIONAL.  
16  
1
9
8
B
S
INCHES  
DIM MIN MAX  
MILLIMETERS  
MIN  
18.80  
6.35  
3.69  
0.39  
1.02  
MAX  
19.55  
6.85  
4.44  
0.53  
1.77  
F
A
B
C
D
F
0.740  
0.250  
0.145  
0.015  
0.040  
0.770  
0.270  
0.175  
0.021  
0.70  
C
L
SEATING  
PLANE  
–T–  
G
H
J
K
L
0.100 BSC  
0.050 BSC  
2.54 BSC  
1.27 BSC  
K
M
0.008  
0.015  
0.130  
0.305  
10  
0.21  
0.38  
3.30  
7.74  
10  
H
J
0.110  
0.295  
0
2.80  
7.50  
0
G
D 16 PL  
0.25 (0.010)  
M
S
0.020  
0.040  
0.51  
1.01  
M
M
T A  
11.4 16-Pin SOIC — Case #751G  
-A-  
MILLIMETERS  
MIN MAX  
INCHES  
16  
9
DIM  
A
MIN  
MAX  
10.15  
7.40  
2.35  
0.35  
0.50  
10.45  
7.60  
2.65  
0.49  
0.90  
0.400  
0.292  
0.093  
0.014  
0.020  
0.411  
0.299  
0.104  
0.019  
0.035  
B
-B-  
8X P  
C
D
M
M
0.010 (0.25)  
B
F
G
J
1.27 BSC  
0.050 BSC  
1
8
0.25  
0.10  
0°  
0.32  
0.25  
7°  
0.010  
0.004  
0°  
0.012  
0.009  
7°  
K
J
M
P
D 16X  
10.05  
10.55  
0.395  
0.415  
R
0.25  
0.75  
0.010  
0.029  
M
S
S
B
0.010 (0.25)  
T
A
F
R X 45  
C
-T-  
SEATING  
PLANE  
G14X  
M
K
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
98  
16-Pin Cerdip — Case #620A  
11.5 16-Pin Cerdip — Case #620A  
NOTES:  
1. DIMENSIONING AND TOLERANCING PER  
ASME Y14.5M, 1994.  
2. CONTROLLING DIMENSION: INCH.  
3. DIMENSION L TO CENTER OF LEAD WHEN  
FORMED PARALLEL.  
4. DIMENSION F MAY NARROW TO 0.76 (0.030)  
WHERE THE LEAD ENTERS THE CERAMIC  
BODY.  
B
A
A
M
16  
1
9
8
B
L
INCHES  
DIM MIN MAX  
MILLIMETERS  
MIN  
19.05  
6.10  
–––  
MAX  
19.93  
7.49  
5.08  
0.50  
A
B
C
D
E
F
0.750  
0.240  
–––  
0.785  
0.295  
0.200  
0.020  
16X J  
0.015  
0.39  
M
0.25 (0.010)  
T B  
0.050 BSC  
1.27 BSC  
E
0.055  
0.065  
1.40  
1.65  
G
H
K
L
0.100 BSC  
2.54 BSC  
F
0.008  
0.125  
0.015  
0.170  
0.21  
3.18  
0.38  
4.31  
0.300 BSC  
7.62 BSC  
M
N
0
0.020  
15  
0.040  
0
0.51  
15  
1.01  
C
K
SEATING  
PLANE  
T
N
G
16X D  
M
0.25 (0.010)  
T A  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
99  
Ordering Information and Mechanical Specifications  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
100  
Appendix A  
MC68HRC705KJ1  
A.1 Introduction  
This appendix introduces the MC68HRC705KJ1, a resistor-capacitor (RC) oscillator mask option version  
of the MC68HC705KJ1. All of the information in MC68HC705KJ1 Technical Data applies to the  
MC68HRC705KJ1 with the exceptions given in this appendix.  
A.2 RC Oscillator Connections  
For greater cost reduction, the RC oscillator mask option allows the configuration shown in Figure A-1 to  
drive the on-chip oscillator. Mount the RC components as close as possible to the pins for startup  
stabilization and to minimize output distortion.  
OSC1  
R
OSC2  
MCU  
R
VDD  
C2 C1  
VSS  
Figure A-1. RC Oscillator Connections  
NOTE  
The optional internal resistor is not recommended for configurations that  
use the RC oscillator connections as shown in Figure A-1. For such  
configurations, the oscillator internal resistor (OSCRES) bit of the mask  
option register should be programmed to a logic 0.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
101  
MC68HRC705KJ1  
A.3 Typical Internal Operating Frequency for RC Oscillator Option  
Figure A-2 shows typical internal operating frequencies at 25°C for the RC oscillator option.  
NOTE  
Tolerance for resistance is ± 50%. When selecting resistor size, consider  
the tolerance to ensure that the resulting oscillator frequency does not  
exceed the maximum operating frequency.  
10  
5.5 V  
5.0 V  
4.5 V  
3.6 V  
3.0 V  
1
0.1  
1
10  
100  
1000  
RESISTANCE (k  
)
Figure A-2. Typical Internal Operating Frequency  
for Various VDD at 25°C — RC Oscillator Option Only  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
102  
Freescale Semiconductor  
RC Oscillator Connections (No External Resistor)  
A.4 RC Oscillator Connections (No External Resistor)  
For maximum cost reduction, the RC oscillator mask connections shown in Figure A-3 allow the on-chip  
oscillator to be driven with no external components. This can be accomplished by programming the  
oscillator internal resistor (OSCRES) bit in the mask option register to a logic 1. When programming the  
OSCRES bit for the MC68HRC705KJ1, an internal resistor is selected which yields typical internal  
oscillator frequencies as shown in Figure A-4. The internal resistance for this device is different than the  
resistance of the selectable internal resistor on the MC68HC705KJ1 and the MC68HRC705KJ1 devices.  
OSC1  
R
OSC2  
MCU  
VDD  
C2 C1  
(EXTERNAL CONNECTIONS LEFT OPEN)  
VSS  
Figure A-3. RC Oscillator Connections (No External Resistor)  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
103  
MC68HRC705KJ1  
A.5 Typical Internal Operating Frequency Versus Temperature  
(No External Resistor)  
3.00  
2.50  
2.00  
1.50  
1.00  
0.50  
0.00  
3.0 V  
3.6 V  
4.5 V  
5.0 V  
5.5 V  
–50  
0
50  
100  
150  
Temperature (°C)  
Figure A-4. Typical Internal Operating Frequency  
versus Temperature (OSCRES Bit = 1)  
NOTE  
Due to process variations, operating voltages, and temperature  
requirements, the internal resistance and tolerance are unspecified.  
Typically for a given voltage and temperature, the frequency should not  
vary more than ± ±500 kHz. However, this data is not guaranteed. It is the  
user’s responsibility to ensure that the resulting internal operating  
frequency meets user’s requirements.  
A.6 Package Types and Order Numbers  
Table A-1. MC68HRC705KJ1 (RC Oscillator Option)  
Order Numbers(1)  
Package  
Type  
Case  
Outline  
Pin  
Count  
Operating  
Order Number  
Temperature  
–40 to +85°C  
–40 to +85°C  
–40 to +85°C  
MC68HRC705KJ1C(2)P(3)  
MC68HRC705KJ1CDW(4)  
MC68HRC705KJ1CS(5)  
PDIP  
SOIC  
Cerdip  
648  
16  
751G  
620A  
16  
16  
1. Refer to Chapter 11 Ordering Information and Mechanical Specifications for standard part  
ordering information.  
2. C = extended temperature range  
3. P = plastic dual in-line package (PDIP)  
4. DW = small outline integrated circuit (SOIC)  
5. S = ceramic dual in-line package (Cerdip)  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
104  
Freescale Semiconductor  
Appendix B  
MC68HLC705KJ1  
B.1 Introduction  
This appendix introduces the MC68HLC705KJ1, a low-frequency version of the MC68HC705KJ1  
optimized for 32-kHz oscillators. All of the information in MC68HC705KJ1 Technical Data applies to the  
MC68HLC705KJ1 with the exceptions given in this appendix.  
B.2 DC Electrical Characteristics  
Table B-1. DC Electrical Characteristics (VDD = 5 V)  
Characteristic  
Symbol  
Min  
Typ  
Max  
Unit  
Supply Current (fOP = 16.0 kHz, fOSC = 32.0 kHz)  
IDD  
45  
20  
60  
30  
µA  
Run  
Wait  
Table B-2. DC Electrical Characteristics (VDD = 3.3 V)  
Characteristic  
Symbol  
Min  
Typ  
Max  
Unit  
Supply Current (fOP = 16.0 kHz, fOSC = 32.0 kHz)  
IDD  
25  
10  
35  
15  
µA  
Run  
Wait  
MCU  
RS  
RP  
32 kHz  
CL  
CL  
Figure B-1. Crystal Connections  
NOTE  
Supply current is impacted by crystal type and external components.Since  
each crystal has its own characteristics, the user should consult the crystal  
manufacturer for appropriate values for external components.  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
Freescale Semiconductor  
105  
MC68HLC705KJ1  
B.3 Package Types and Order Numbers  
Table B-3. MC68HLC705KJ1 (Low Frequency) Order Numbers(1)  
Package  
Type  
Case  
Outline  
Pin  
Count  
Operating  
Temperature  
Order Number  
MC68HLC705KJ1C(2)  
P
PDIP  
SOIC  
Cerdip  
648  
16  
16  
16  
–40 to +85°C  
–40 to +85°C  
–40 to +85°C  
MC68HLC705KJ1CDW(3)  
MC68HLC705KJ1CS(4)  
751G  
620A  
1. Refer to Chapter 11 Ordering Information and Mechanical Specifications for standard part  
ordering information.  
2. C = extended temperature range  
3. DW = small outline integrated circuit (SOIC)  
4. S = ceramic dual in-line package (Cerdip)  
MC68HC705KJ1 • MC68HRC705KJ1 • MC68HLC705KJ1 Data Sheet, Rev. 4.1  
106  
Freescale Semiconductor  
How to Reach Us:  
Home Page:  
www.freescale.com  
E-mail:  
support@freescale.com  
USA/Europe or Locations Not Listed:  
Freescale Semiconductor  
Technical Information Center, CH370  
1300 N. Alma School Road  
Chandler, Arizona 85224  
+1-800-521-6274 or +1-480-768-2130  
support@freescale.com  
Europe, Middle East, and Africa:  
Freescale Halbleiter Deutschland GmbH  
Technical Information Center  
Schatzbogen 7  
81829 Muenchen, Germany  
+44 1296 380 456 (English)  
+46 8 52200080 (English)  
+49 89 92103 559 (German)  
+33 1 69 35 48 48 (French)  
support@freescale.com  
Information in this document is provided solely to enable system and software  
implementers to use Freescale Semiconductor products. There are no express or  
implied copyright licenses granted hereunder to design or fabricate any integrated  
circuits or integrated circuits based on the information in this document.  
Freescale Semiconductor reserves the right to make changes without further notice to  
any products herein. Freescale Semiconductor makes no warranty, representation or  
guarantee regarding the suitability of its products for any particular purpose, nor does  
Freescale Semiconductor assume any liability arising out of the application or use of any  
product or circuit, and specifically disclaims any and all liability, including without  
limitation consequential or incidental damages. “Typical” parameters that may be  
provided in Freescale Semiconductor data sheets and/or specifications can and do vary  
in different applications and actual performance may vary over time. All operating  
parameters, including “Typicals”, must be validated for each customer application by  
customer’s technical experts. Freescale Semiconductor does not convey any license  
under its patent rights nor the rights of others. Freescale Semiconductor products are  
not designed, intended, or authorized for use as components in systems intended for  
surgical implant into the body, or other applications intended to support or sustain life,  
or for any other application in which the failure of the Freescale Semiconductor product  
could create a situation where personal injury or death may occur. Should Buyer  
purchase or use Freescale Semiconductor products for any such unintended or  
unauthorized application, Buyer shall indemnify and hold Freescale Semiconductor and  
its officers, employees, subsidiaries, affiliates, and distributors harmless against all  
claims, costs, damages, and expenses, and reasonable attorney fees arising out of,  
directly or indirectly, any claim of personal injury or death associated with such  
unintended or unauthorized use, even if such claim alleges that Freescale  
Japan:  
Freescale Semiconductor Japan Ltd.  
Headquarters  
ARCO Tower 15F  
1-8-1, Shimo-Meguro, Meguro-ku,  
Tokyo 153-0064  
Japan  
0120 191014 or +81 3 5437 9125  
support.japan@freescale.com  
Asia/Pacific:  
Freescale Semiconductor Hong Kong Ltd.  
Technical Information Center  
2 Dai King Street  
Tai Po Industrial Estate  
Tai Po, N.T., Hong Kong  
+800 2666 8080  
support.asia@freescale.com  
For Literature Requests Only:  
Freescale Semiconductor Literature Distribution Center  
P.O. Box 5405  
Denver, Colorado 80217  
1-800-441-2447 or 303-675-2140  
Fax: 303-675-2150  
Semiconductor was negligent regarding the design or manufacture of the part.  
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc.  
All other product or service names are the property of their respective owners.  
© Freescale Semiconductor, Inc. 2005. All rights reserved.  
LDCForFreescaleSemiconductor@hibbertgroup.com  
MC68HC705KJ1  
Rev. 4.1, 07/2005  

相关型号:

MC68HC705KJ1CP

Migrating from the MC68HC705K1 to the MC68HC705KJ1
FREESCALE

MC68HC705KJ1CP

8-BIT, OTPROM, 4MHz, MICROCONTROLLER, PDIP16, PLASTIC, DIP-16
MOTOROLA

MC68HC705KJ1CS

Computer Operation Properly Module
FREESCALE

MC68HC705KJ1CS

HCMOS Microcontroller Unit
MOTOROLA

MC68HC705L

Techinical Summary 8-Bit Microcontroller Unit
FREESCALE

MC68HC705L16

Microcontrollers
FREESCALE

MC68HC705L16CFU

8-BIT, OTPROM, 2.1MHz, MICROCONTROLLER, PQFP80, PLASTIC, QFP-80
MOTOROLA

MC68HC705L16FU

8-BIT, OTPROM, 2.1MHz, MICROCONTROLLER, PQFP80, PLASTIC, QFP-80
MOTOROLA

MC68HC705L1B

Microcontroller, 8-Bit, OTPROM, HCMOS, PDIP56, SDIP-56
ROCHESTER

MC68HC705L1FU

Microcontroller, 8-Bit, OTPROM, HCMOS, PQFP64, QFP-64
ROCHESTER

MC68HC705L28

Flexible general-purpose microcomputer
MOTOROLA

MC68HC705L28B

Flexible general-purpose microcomputer
MOTOROLA