Freescale MC68HC908LJ12 DATA SHEET

MC68HC908LJ12 Technical Data
M68HC08 Microcontrollers
Rev. 2.1 MC68HC908LJ12/D August 2, 2005
freescale.com
MC68HC908LJ12

Technical Data

Freescale reserves the right to make changes without further notice to any products herein. Freescale makes no warranty, representation or guarantee regarding the suitability of its products for any particular purpose, nor does Freescale 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 which may be provided in Freescale data sheets and/or specifications can and do vary in different applications and actual performance may vary over time. All operating par ameters, including "Typicals" m ust be validated for each customer application by customer's technical experts. Freescale does not convey any license under its pa tent rig hts n or th e righ ts of ot hers . Fre esca le pro duc ts 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 product could create a situation where personal injury or death may occur. Should Buyer pur chase or use Freescale products for any such unintended or unauthorized application, Buyer shall indemnify and hold Freescale 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 unintend ed or unauthorized use, even if such claim alleges that Freescale was negligent regarding the design or manufacture of the part. Freescale, Inc. is an Equal Opportunity/Affirmative Action Employer.
© Freescale, Inc., 2002
Freescale Semiconductor Technical Data 3
Technical Data
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
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
Date
February
2002
August, 2005 2.1 Updated to meet Freescale identity guidelines.
Revision
Level
2 First general release.
Description
Page
Number(s)
Technical Data MC68HC908LJ12Rev. 2.1
4 Technical Data Freescale Semiconductor
Technical Data — MC68HC908LJ12
Section 1. General Description . . . . . . . . . . . . . . . . . . . .33
Section 2. Memory Map . . . . . . . . . . . . . . . . . . . . . . . . . .43
Section 3. Random-Access Memory (RAM) . . . . . . . . . .59
Section 4. FLASH Memory (FLASH) . . . . . . . . . . . . . . . .61
Section 5. Configuration Registers (CONFIG) . . . . . . . .71
Section 6. Central Processor Unit (CPU) . . . . . . . . . . . .77
Section 7. Oscillator (OSC) . . . . . . . . . . . . . . . . . . . . . . .95
Section 8. Clock Generator Module (CGM). . . . . . . . . .101
Section 9. System Integration Module (SIM) . . . . . . . .131

List of Sections

Section 10. Monitor ROM (MON) . . . . . . . . . . . . . . . . . .155
Section 11. Timer Interface Module (TIM) . . . . . . . . . . .185
Section 12. Real Time Clock (RTC) . . . . . . . . . . . . . . . .209
Section 13. Infrared Serial Communications
Interface Module (IRSCI) . . . . . . . . . . . .227
Section 14. Serial Peripheral Interface Module (SPI). .269
Section 15. Analog-to-Digital Converter (ADC) . . . . . .301
Section 16. Liquid Crystal Display Driver (LCD) . . . . .317
Section 17. Input/Output (I/O) Ports . . . . . . . . . . . . . . .341
Section 18. External Interrupt (IRQ) . . . . . . . . . . . . . . .357
Section 19. Keyboard Interrupt Module (KBI). . . . . . . .363
Freescale Semiconductor List of Sections 5
List of Sections
Section 20. Computer Operating Properly (COP) . . . .371
Section 21. Low-Voltage Inhibit (LVI) . . . . . . . . . . . . . .377
Section 22. Break Module (BRK) . . . . . . . . . . . . . . . . . .383
Section 23. Electrical Specifications. . . . . . . . . . . . . . .391
Section 24. Mechanical Specifications . . . . . . . . . . . . .407
Section 25. Ordering Information . . . . . . . . . . . . . . . . .411
Technical Data MC68HC908LJ12Rev. 2.1
6 List of Sections Freescale Semiconductor
Technical Data — MC68HC908LJ12
Section 1. General Description
1.1 Contents . . . . . . . . . . .

Table of Contents

Freescale Semiconductor Table of Contents 7
Table of Contents
2.4 Reserved Memory Locations . . . . . . . . . . . . . . . . . . . . . . . . . .44
2.5 Input/Output (I/O) Section. . . . . . . . . . . . . . . . . . . . . . . . . . . . .44
Section 3. Random-Access Memory (RAM)
3.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .59
3.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .59
3.3 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .59
Section 4. FLASH Memory (FLASH)
4.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61
4.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .61
4.3 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .62
4.4 FLASH Control Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .63
4.5 FLASH Page Erase Operation . . . . . . . . . . . . . . . . . . . . . . . . .64
4.6 FLASH Mass Erase Operation . . . . . . . . . . . . . . . . . . . . . . . . .65
4.7 FLASH Program Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . .66
4.8 FLASH Protection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .68
4.8.1 FLASH Block Protect Register. . . . . . . . . . . . . . . . . . . . . . .68
Section 5. Configuration Registers (CONFIG)
5.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71
5.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71
5.3 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .72
5.4 Configuration Register 1 (CONFIG1) . . . . . . . . . . . . . . . . . . . .73
5.5 Configuration Register 2 (CONFIG2) . . . . . . . . . . . . . . . . . . . .75
Technical Data MC68HC908LJ12Rev. 2.1
8 Table of Contents Freescale Semiconductor
Table of Contents
Section 6. Central Processor Unit (CPU)
6.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .77
6.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .78
6.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .78
6.4 CPU Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79
6.4.1 Accumulator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79
6.4.2 Index Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .80
6.4.3 Stack Pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .80
6.4.4 Program Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81
6.4.5 Condition Code Register . . . . . . . . . . . . . . . . . . . . . . . . . . .82
6.5 Arithmetic/Logic Unit (ALU) . . . . . . . . . . . . . . . . . . . . . . . . . . .84
6.6 Low-Power Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .84
6.6.1 Wait Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .84
6.6.2 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .85
6.7 CPU During Break Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . .85
6.8 Instruction Set Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . .85
6.9 Opcode Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .85
Section 7. Oscillator (OSC)
7.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .95
7.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .95
7.3 Internal Oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .97
7.4 Crystal (X-tal) Oscillator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .97
7.5 I/O Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .97
7.5.1 Crystal Amplifier Input Pin (OSC1). . . . . . . . . . . . . . . . . . . .98
7.5.2 Crystal Amplifier Output Pin (OSC2) . . . . . . . . . . . . . . . . . .98
7.5.3 Oscillator Enable Signal (SIMOSCEN). . . . . . . . . . . . . . . . .98
7.5.4 Internal RC Clock (ICLK) . . . . . . . . . . . . . . . . . . . . . . . . . . .98
7.5.5 CGM Oscillator Clock (CGMXCLK) . . . . . . . . . . . . . . . . . . .98
7.5.6 CGM Reference Clock (CGMRCLK) . . . . . . . . . . . . . . . . . .98
Freescale Semiconductor Table of Contents 9
Table of Contents
7.6 Low Power Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .98
7.6.1 Wait Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99
7.6.2 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .99
7.7 Oscillator During Break Mode. . . . . . . . . . . . . . . . . . . . . . . . . .99
Section 8. Clock Generator Module (CGM)
8.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .101
8.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .102
8.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .103
8.4 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .103
8.4.1 Oscillator Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .106
8.4.2 Phase-Locked Loop Circuit (PLL) . . . . . . . . . . . . . . . . . . .106
8.4.3 PLL Circuits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .106
8.4.4 Acquisition and Tracking Modes . . . . . . . . . . . . . . . . . . . .108
8.4.5 Manual and Automatic PLL Bandwidth Modes. . . . . . . . . .108
8.4.6 Programming the PLL . . . . . . . . . . . . . . . . . . . . . . . . . . . .110
8.4.7 Special Programming Exceptions . . . . . . . . . . . . . . . . . . .114
8.4.8 Base Clock Selector Circuit . . . . . . . . . . . . . . . . . . . . . . . .114
8.4.9 CGM External Connections . . . . . . . . . . . . . . . . . . . . . . . .115
8.5 I/O Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .115
8.5.1 External Filter Capacitor Pin (CGMXFC) . . . . . . . . . . . . . .116
8.5.2 PLL Analog Power Pin (V
8.5.3 PLL Analog Ground Pin (V
) . . . . . . . . . . . . . . . . . . . . . .116
DDA
) . . . . . . . . . . . . . . . . . . . . .116
SSA
8.5.4 Oscillator Output Frequency Signal (CGMXCLK) . . . . . . .116
8.5.5 CGM Reference Clock (CGMRCLK) . . . . . . . . . . . . . . . . .116
8.5.6 CGM VCO Clock Output (CGMVCLK). . . . . . . . . . . . . . . .117
8.5.7 CGM Base Clock Output (CGMOUT). . . . . . . . . . . . . . . . .117
8.5.8 CGM CPU Interrupt (CGMINT) . . . . . . . . . . . . . . . . . . . . .117
8.6 CGM Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .117
8.6.1 PLL Control Register . . . . . . . . . . . . . . . . . . . . . . . . . . . . .118
8.6.2 PLL Bandwidth Control Register . . . . . . . . . . . . . . . . . . . .120
8.6.3 PLL Multiplier Select Registers . . . . . . . . . . . . . . . . . . . . .122
8.6.4 PLL VCO Range Select Register. . . . . . . . . . . . . . . . . . . .123
8.6.5 PLL Reference Divider Select Register . . . . . . . . . . . . . . .124
Technical Data MC68HC908LJ12Rev. 2.1
10 Table of Contents Freescale Semiconductor
Table of Contents
8.7 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125
8.8 Special Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125
8.8.1 Wait Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .125
8.8.2 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .126
8.8.3 CGM During Break Interrupts. . . . . . . . . . . . . . . . . . . . . . .126
8.9 Acquisition/Lock Time Specifications . . . . . . . . . . . . . . . . . . .127
8.9.1 Acquisition/Lock Time Definitions. . . . . . . . . . . . . . . . . . . .127
8.9.2 Parametric Influences on Reaction Time . . . . . . . . . . . . . .127
8.9.3 Choosing a Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129
Section 9. System Integration Module (SIM)
9.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .131
9.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .132
9.3 SIM Bus Clock Control and Generation . . . . . . . . . . . . . . . . .134
9.3.1 Bus Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135
9.3.2 Clock Start-up from POR or LVI Reset. . . . . . . . . . . . . . . .135
9.3.3 Clocks in Stop Mode and Wait Mode. . . . . . . . . . . . . . . . .136
9.4 Reset and System Initialization. . . . . . . . . . . . . . . . . . . . . . . .136
9.4.1 External Pin Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .137
9.4.2 Active Resets from Internal Sources . . . . . . . . . . . . . . . . .137
9.4.2.1 Power-On Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .138
9.4.2.2 Computer Operating Properly (COP) Reset. . . . . . . . . .139
9.4.2.3 Illegal Opcode Reset . . . . . . . . . . . . . . . . . . . . . . . . . . .140
9.4.2.4 Illegal Address Reset. . . . . . . . . . . . . . . . . . . . . . . . . . .140
9.4.2.5 Low-Voltage Inhibit (LVI) Reset. . . . . . . . . . . . . . . . . . .140
9.4.2.6 Monitor Mode Entry Module Reset (MODRST) . . . . . . .140
9.5 SIM Counter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .141
9.5.1 SIM Counter During Power-On Reset . . . . . . . . . . . . . . . .141
9.5.2 SIM Counter During Stop Mode Recovery. . . . . . . . . . . . .141
9.5.3 SIM Counter and Reset States. . . . . . . . . . . . . . . . . . . . . .141
9.6 Exception Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .142
9.6.1 Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .142
9.6.1.1 Hardware Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . .144
9.6.1.2 SWI Instruction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .145
Freescale Semiconductor Table of Contents 11
Table of Contents
9.6.1.3 Interrupt Status Registers . . . . . . . . . . . . . . . . . . . . . . .145
9.6.1.4 Interrupt Status Register 1. . . . . . . . . . . . . . . . . . . . . . .145
9.6.1.5 Interrupt Status Register 2. . . . . . . . . . . . . . . . . . . . . . .147
9.6.1.6 Interrupt Status Register 3. . . . . . . . . . . . . . . . . . . . . . .147
9.6.2 Reset . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .148
9.6.3 Break Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .148
9.6.4 Status Flag Protection in Break Mode . . . . . . . . . . . . . . . .148
9.7 Low-Power Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .149
9.7.1 Wait Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .149
9.7.2 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .150
9.8 SIM Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .151
9.8.1 SIM Break Status Register. . . . . . . . . . . . . . . . . . . . . . . . .152
9.8.2 SIM Reset Status Register . . . . . . . . . . . . . . . . . . . . . . . .153
9.8.3 SIM Break Flag Control Register . . . . . . . . . . . . . . . . . . . .154
Section 10. Monitor ROM (MON)
10.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .155
10.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .156
10.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .156
10.4 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .157
10.4.1 Entering Monitor Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . .159
10.4.2 Data Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .163
10.4.3 Break Signal. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .163
10.4.4 Baud Rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .163
10.4.5 Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .164
10.5 Security. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .169
10.6 ROM-Resident Routines. . . . . . . . . . . . . . . . . . . . . . . . . . . . .171
10.6.1 PRGRNGE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .173
10.6.2 ERARNGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .175
10.6.3 LDRNGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176
10.6.4 MON_PRGRNGE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .177
10.6.5 MON_ERARNGE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .178
10.6.6 MON_LDRNGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .179
10.6.7 EE_WRITE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .180
10.6.8 EE_READ. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183
Technical Data MC68HC908LJ12Rev. 2.1
12 Table of Contents Freescale Semiconductor
Table of Contents
Section 11. Timer Interface Module (TIM)
11.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .185
11.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .186
11.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .186
11.4 Pin Name Conventions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .187
11.5 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .187
11.5.1 TIM Counter Prescaler. . . . . . . . . . . . . . . . . . . . . . . . . . . .191
11.5.2 Input Capture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .191
11.5.3 Output Compare. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .192
11.5.3.1 Unbuffered Output Compare . . . . . . . . . . . . . . . . . . . . .192
11.5.3.2 Buffered Output Compare . . . . . . . . . . . . . . . . . . . . . . .193
11.5.4 Pulse Width Modulation (PWM) . . . . . . . . . . . . . . . . . . . . .193
11.5.4.1 Unbuffered PWM Signal Generation . . . . . . . . . . . . . . .194
11.5.4.2 Buffered PWM Signal Generation . . . . . . . . . . . . . . . . .195
11.5.4.3 PWM Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . .196
11.6 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .197
11.7 Low-Power Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .197
11.7.1 Wait Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .198
11.7.2 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .198
11.8 TIM During Break Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . .198
11.9 I/O Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .199
11.10 I/O Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .199
11.10.1 TIM Status and Control Register . . . . . . . . . . . . . . . . . . . .200
11.10.2 TIM Counter Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . .202
11.10.3 TIM Counter Modulo Registers . . . . . . . . . . . . . . . . . . . . .203
11.10.4 TIM Channel Status and Control Registers . . . . . . . . . . . .204
11.10.5 TIM Channel Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . .207
Section 12. Real Time Clock (RTC)
12.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .209
12.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .210
Freescale Semiconductor Table of Contents 13
Table of Contents
12.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .210
12.4 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .212
12.4.1 Time Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .214
12.4.2 Calendar Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .214
12.4.3 Alarm Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .214
12.4.4 Timebase Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .214
12.4.5 Chronograph Functions . . . . . . . . . . . . . . . . . . . . . . . . . . .215
12.5 Low-Power Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .215
12.5.1 Wait Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .215
12.5.2 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .215
12.6 RTC Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .216
12.6.1 RTC Control Register 1 (RTCCR1) . . . . . . . . . . . . . . . . . .216
12.6.2 RTC Control Register 2 (RTCCR2) . . . . . . . . . . . . . . . . . .218
12.6.3 RTC Status Register (RTCSR). . . . . . . . . . . . . . . . . . . . . .219
12.6.4 Alarm Minute and Hour Registers (ALMR and ALHR). . . .222
12.6.5 Second Register (SECR) . . . . . . . . . . . . . . . . . . . . . . . . . .223
12.6.6 Minute Register (MINR) . . . . . . . . . . . . . . . . . . . . . . . . . . .223
12.6.7 Hour Register (HRR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .224
12.6.8 Day Register (DAYR). . . . . . . . . . . . . . . . . . . . . . . . . . . . .224
12.6.9 Month Register (MTHR). . . . . . . . . . . . . . . . . . . . . . . . . . .225
12.6.10 Year Register (YRR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225
12.6.11 Day-Of-Week Register (DOWR) . . . . . . . . . . . . . . . . . . . .226
12.6.12 Chronograph Data Register (CHRR) . . . . . . . . . . . . . . . . .226
Section 13. Infrared Serial Communications
Interface Module (IRSCI)
13.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .227
13.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .228
13.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .229
13.4 Pin Name Conventions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .231
13.5 IRSCI Module Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . .231
13.6 Infrared Functional Description. . . . . . . . . . . . . . . . . . . . . . . .232
13.6.1 Infrared Transmit Encoder . . . . . . . . . . . . . . . . . . . . . . . . .233
Technical Data MC68HC908LJ12Rev. 2.1
14 Table of Contents Freescale Semiconductor
Table of Contents
13.6.2 Infrared Receive Decoder . . . . . . . . . . . . . . . . . . . . . . . . .233
13.7 SCI Functional Description. . . . . . . . . . . . . . . . . . . . . . . . . . .234
13.7.1 Data Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .235
13.7.2 Transmitter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .236
13.7.2.1 Character Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .237
13.7.2.2 Character Transmission. . . . . . . . . . . . . . . . . . . . . . . . .237
13.7.2.3 Break Characters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .238
13.7.2.4 Idle Characters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .238
13.7.2.5 Transmitter Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . .239
13.7.3 Receiver. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .239
13.7.3.1 Character Length . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .239
13.7.3.2 Character Reception . . . . . . . . . . . . . . . . . . . . . . . . . . .241
13.7.3.3 Data Sampling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .241
13.7.3.4 Framing Errors. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .243
13.7.3.5 Baud Rate Tolerance. . . . . . . . . . . . . . . . . . . . . . . . . . .243
13.7.3.6 Receiver Wakeup. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .246
13.7.3.7 Receiver Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . .247
13.7.3.8 Error Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .247
13.8 Low-Power Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .248
13.8.1 Wait Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .248
13.8.2 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .248
13.9 SCI During Break Module Interrupts. . . . . . . . . . . . . . . . . . . .249
13.10 I/O Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .249
13.10.1 PTB0/TxD (Transmit Data). . . . . . . . . . . . . . . . . . . . . . . . .249
13.10.2 PTB1/RxD (Receive Data) . . . . . . . . . . . . . . . . . . . . . . . . .249
13.11 I/O Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .250
13.11.1 SCI Control Register 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . .251
13.11.2 SCI Control Register 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . .253
13.11.3 SCI Control Register 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . .256
13.11.4 SCI Status Register 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . .258
13.11.5 SCI Status Register 2 (SCS2) . . . . . . . . . . . . . . . . . . . . . .262
13.11.6 SCI Data Register (SCDR). . . . . . . . . . . . . . . . . . . . . . . . .263
13.11.7 SCI Baud Rate Register (SCBR) . . . . . . . . . . . . . . . . . . . .264
13.11.8 SCI Infrared Control Register. . . . . . . . . . . . . . . . . . . . . . .267
Freescale Semiconductor Table of Contents 15
Table of Contents
Section 14. Serial Peripheral Interface Module (SPI)
14.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .269
14.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .270
14.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .270
14.4 Pin Name Conventions and I/O Register Addresses . . . . . . .271
14.5 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .271
14.5.1 Master Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .273
14.5.2 Slave Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .274
14.6 Transmission Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .275
14.6.1 Clock Phase and Polarity Controls. . . . . . . . . . . . . . . . . . .275
14.6.2 Transmission Format When CPHA = 0 . . . . . . . . . . . . . . .276
14.6.3 Transmission Format When CPHA = 1 . . . . . . . . . . . . . . .278
14.6.4 Transmission Initiation Latency . . . . . . . . . . . . . . . . . . . . .279
14.7 Queuing Transmission Data. . . . . . . . . . . . . . . . . . . . . . . . . .281
14.8 Error Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .282
14.8.1 Overflow Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .282
14.8.2 Mode Fault Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .284
14.9 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .286
14.10 Resetting the SPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .288
14.11 Low-Power Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .289
14.11.1 Wait Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .289
14.11.2 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .289
14.12 SPI During Break Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . .290
14.13 I/O Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .290
14.13.1 MISO (Master In/Slave Out). . . . . . . . . . . . . . . . . . . . . . . .291
14.13.2 MOSI (Master Out/Slave In). . . . . . . . . . . . . . . . . . . . . . . .291
14.13.3 SPSCK (Serial Clock). . . . . . . . . . . . . . . . . . . . . . . . . . . . .292
14.13.4 SS
14.13.5 CGND (Clock Ground) . . . . . . . . . . . . . . . . . . . . . . . . . . . .293
(Slave Select). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .292
14.14 I/O Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .294
14.14.1 SPI Control Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .294
Technical Data MC68HC908LJ12Rev. 2.1
16 Table of Contents Freescale Semiconductor
Table of Contents
14.14.2 SPI Status and Control Register . . . . . . . . . . . . . . . . . . . .296
14.14.3 SPI Data Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .299
Section 15. Analog-to-Digital Converter (ADC)
15.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .301
15.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .302
15.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .302
15.4 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .303
15.4.1 ADC Port I/O Pins . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .303
15.4.2 Voltage Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .305
15.4.3 Conversion Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .305
15.4.4 Continuous Conversion . . . . . . . . . . . . . . . . . . . . . . . . . . .306
15.4.5 Result Justification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .306
15.4.6 Monotonicity. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .307
15.5 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .308
15.6 Low-Power Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .308
15.6.1 Wait Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .308
15.6.2 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .308
15.7 I/O Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .308
15.7.1 ADC Voltage In (V
15.7.2 ADC Analog Power Pin (V
15.7.3 ADC Voltage Reference High Pin (V
15.7.4 ADC Voltage Reference Low Pin (V
) . . . . . . . . . . . . . . . . . . . . . . . . . . .309
ADIN
) . . . . . . . . . . . . . . . . . . . . .309
DDA
). . . . . . . . . . . . .309
REFH
) . . . . . . . . . . . . .309
REFL
15.8 I/O Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .310
15.8.1 ADC Status and Control Register. . . . . . . . . . . . . . . . . . . .310
15.8.2 ADC Data Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .312
15.8.3 ADC Clock Control Register. . . . . . . . . . . . . . . . . . . . . . . .314
Section 16. Liquid Crystal Display Driver (LCD)
16.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .317
16.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .318
16.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .318
Freescale Semiconductor Table of Contents 17
Table of Contents
16.4 Pin Name Conventions and I/O Register Addresses . . . . . . .318
16.5 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .320
16.5.1 LCD Duty . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .321
16.5.2 LCD Voltages (V
LCD
, V
LCD1
, V
LCD2
, V
) . . . . . . . . . . .323
LCD3
16.5.3 LCD Cycle Frame. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .323
16.5.4 Fast Charge and Low Current . . . . . . . . . . . . . . . . . . . . . .324
16.5.5 Contrast Control. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .325
16.6 Low-Power Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .325
16.6.1 Wait Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .325
16.6.2 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .325
16.7 I/O Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .326
16.7.1 BP0–BP3 (Backplane Drivers). . . . . . . . . . . . . . . . . . . . . .326
16.7.2 FP0–FP26 (Frontplane Drivers). . . . . . . . . . . . . . . . . . . . .328
16.8 Seven Segment Display Connection . . . . . . . . . . . . . . . . . . .332
16.9 I/O Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .335
16.9.1 LCD Control Register (LCDCR) . . . . . . . . . . . . . . . . . . . . .335
16.9.2 LCD Clock Register (LCDCLK) . . . . . . . . . . . . . . . . . . . . .337
16.9.3 LCD Data Registers (LDAT1–LDAT14) . . . . . . . . . . . . . . .339
Section 17. Input/Output (I/O) Ports
17.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .341
17.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .341
17.3 Port A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .344
17.3.1 Port A Data Register (PTA) . . . . . . . . . . . . . . . . . . . . . . . .344
17.3.2 Data Direction Register A (DDRA). . . . . . . . . . . . . . . . . . .345
17.4 Port B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .347
17.4.1 Port B Data Register (PTB) . . . . . . . . . . . . . . . . . . . . . . . .347
17.4.2 Data Direction Register B (DDRB). . . . . . . . . . . . . . . . . . .348
17.4.3 Port B LED Control Register (LEDB) . . . . . . . . . . . . . . . . .350
17.5 Port C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .351
17.5.1 Port C Data Register (PTC) . . . . . . . . . . . . . . . . . . . . . . . .351
17.5.2 Data Direction Register C (DDRC). . . . . . . . . . . . . . . . . . .352
Technical Data MC68HC908LJ12Rev. 2.1
18 Table of Contents Freescale Semiconductor
Table of Contents
17.6 Port D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .354
17.6.1 Port D Data Register (PTD) . . . . . . . . . . . . . . . . . . . . . . . .354
17.6.2 Data Direction Register D (DDRD). . . . . . . . . . . . . . . . . . .355
Section 18. External Interrupt (IRQ)
18.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .357
18.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .357
18.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .357
18.4 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .358
18.4.1 IRQ Pin. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .360
18.5 IRQ Module During Break Interrupts . . . . . . . . . . . . . . . . . . .361
18.6 IRQ Status and Control Register (INTSCR) . . . . . . . . . . . . . .361
Section 19. Keyboard Interrupt Module (KBI)
19.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .363
19.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .363
19.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .364
19.4 I/O Pins. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .364
19.5 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .365
19.5.1 Keyboard Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . .367
19.6 Keyboard Interrupt Registers . . . . . . . . . . . . . . . . . . . . . . . . .367
19.6.1 Keyboard Status and Control Register. . . . . . . . . . . . . . . .368
19.6.2 Keyboard Interrupt Enable Register. . . . . . . . . . . . . . . . . .369
19.7 Low-Power Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .369
19.8 Wait Mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .369
19.9 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .370
19.10 Keyboard Module During Break Interrupts . . . . . . . . . . . . . . .370
Freescale Semiconductor Table of Contents 19
Table of Contents
Section 20. Computer Operating Properly (COP)
20.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .371
20.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .371
20.3 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .372
20.4 I/O Signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .373
20.4.1 ICLK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .373
20.4.2 STOP Instruction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .373
20.4.3 COPCTL Write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .373
20.4.4 Power-On Reset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .373
20.4.5 Internal Reset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .374
20.4.6 Reset Vector Fetch. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .374
20.4.7 COPD (COP Disable). . . . . . . . . . . . . . . . . . . . . . . . . . . . .374
20.4.8 COPRS (COP Rate Select) . . . . . . . . . . . . . . . . . . . . . . . .374
20.5 COP Control Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .375
20.6 Interrupts. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .375
20.7 Monitor Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .375
20.8 Low-Power Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .375
20.8.1 Wait Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .376
20.8.2 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .376
20.9 COP Module During Break Mode. . . . . . . . . . . . . . . . . . . . . .376
Section 21. Low-Voltage Inhibit (LVI)
21.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .377
21.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .377
21.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .377
21.4 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .378
21.4.1 Interrupt LVI Operation. . . . . . . . . . . . . . . . . . . . . . . . . . . .380
21.4.2 Forced Reset Operation. . . . . . . . . . . . . . . . . . . . . . . . . . .380
21.4.3 Voltage Hysteresis Protection . . . . . . . . . . . . . . . . . . . . . .380
21.4.4 LVI Trip Selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .381
21.5 LVI Status Register. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .381
Technical Data MC68HC908LJ12Rev. 2.1
20 Table of Contents Freescale Semiconductor
Table of Contents
21.6 Low-Power Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .382
21.6.1 Wait Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .382
21.6.2 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .382
Section 22. Break Module (BRK)
22.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .383
22.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .383
22.3 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .384
22.4 Functional Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .384
22.4.1 Flag Protection During Break Interrupts. . . . . . . . . . . . . . .386
22.4.2 CPU During Break Interrupts . . . . . . . . . . . . . . . . . . . . . . .386
22.4.3 TIM1 and TIM2 During Break Interrupts. . . . . . . . . . . . . . .386
22.4.4 COP During Break Interrupts . . . . . . . . . . . . . . . . . . . . . . .386
22.5 Low-Power Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .386
22.5.1 Wait Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .386
22.5.2 Stop Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .387
22.6 Break Module Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . .387
22.6.1 Break Status and Control Register. . . . . . . . . . . . . . . . . . .387
22.6.2 Break Address Registers . . . . . . . . . . . . . . . . . . . . . . . . . .388
22.6.3 SIM Break Status Register. . . . . . . . . . . . . . . . . . . . . . . . .388
22.6.4 SIM Break Flag Control Register . . . . . . . . . . . . . . . . . . . .390
Section 23. Electrical Specifications
23.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .391
23.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .392
23.3 Absolute Maximum Ratings . . . . . . . . . . . . . . . . . . . . . . . . . .392
23.4 Functional Operating Range. . . . . . . . . . . . . . . . . . . . . . . . . .393
23.5 Thermal Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . .393
23.6 5.0V DC Electrical Characteristics . . . . . . . . . . . . . . . . . . . . .394
23.7 3.3V DC Electrical Characteristics . . . . . . . . . . . . . . . . . . . . .396
23.8 5.0V Control Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .397
Freescale Semiconductor Table of Contents 21
Table of Contents
23.9 3.3V Control Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .397
23.10 5.0V Oscillator Characteristics . . . . . . . . . . . . . . . . . . . . . . . .398
23.11 3.3V Oscillator Characteristics . . . . . . . . . . . . . . . . . . . . . . . .398
23.12 5.0V ADC Electrical Characteristics. . . . . . . . . . . . . . . . . . . .399
23.13 3.3V ADC Electrical Characteristics. . . . . . . . . . . . . . . . . . . .400
23.14 Timer Interface Module Characteristics . . . . . . . . . . . . . . . . .401
23.15 CGM Electrical Specifications. . . . . . . . . . . . . . . . . . . . . . . . .401
23.16 5.0V SPI Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . .402
23.17 3.3V SPI Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . .403
23.18 FLASH Memory Characteristics . . . . . . . . . . . . . . . . . . . . . . .406
Section 24. Mechanical Specifications
24.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .407
24.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .407
24.3 52-Pin Low-Profile Quad Flat Pack (LQFP) . . . . . . . . . . . . . .408
24.4 64-Pin Low-Profile Quad Flat Pack (LQFP) . . . . . . . . . . . . . .409
24.5 64-Pin Quad Flat Pack (QFP). . . . . . . . . . . . . . . . . . . . . . . . .410
Section 25. Ordering Information
25.1 Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .411
25.2 Introduction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .411
25.3 MC Order Numbers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .411
Technical Data MC68HC908LJ12Rev. 2.1
22 Table of Contents Freescale Semiconductor
Technical Data — MC68HC908LJ12
Figure Title Page
1-1 MC68HC908LJ12 Block Diagram. . . . . . . . . . . . . . . . . . . . . . .37
1-2 64-Pin QFP and 64-Pin LQFP Pin Assignment . . . . . . . . . . . .38
1-3 52-Pin LQFP Pin Assignment. . . . . . . . . . . . . . . . . . . . . . . . . .39
1-4 Power Supply Bypassing . . . . . . . . . . . . . . . . . . . . . . . . . . . . .40
2-1 Memory Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .45
2-2 Control, Status, and Data Registers. . . . . . . . . . . . . . . . . . . . .46
4-1 FLASH I/O Register Summary . . . . . . . . . . . . . . . . . . . . . . . . .62
4-2 FLASH Control Register (FLCR) . . . . . . . . . . . . . . . . . . . . . . .63
4-3 FLASH Programming Flowchart. . . . . . . . . . . . . . . . . . . . . . . .67
4-4 FLASH Block Protect Register (FLBPR). . . . . . . . . . . . . . . . . .68
4-5 FLASH Block Protect Start Address. . . . . . . . . . . . . . . . . . . . .68

List of Figures

5-1 CONFIG Registers Summary. . . . . . . . . . . . . . . . . . . . . . . . . .72
5-2 Configuration Register 1 (CONFIG1) . . . . . . . . . . . . . . . . . . . .73
5-3 Configuration Register 2 (CONFIG2) . . . . . . . . . . . . . . . . . . . .75
6-1 CPU Registers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79
6-2 Accumulator (A) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79
6-3 Index Register (H:X). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .80
6-4 Stack Pointer (SP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .80
6-5 Program Counter (PC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .81
6-6 Condition Code Register (CCR) . . . . . . . . . . . . . . . . . . . . . . . .82
7-1 Oscillator Module Block Diagram . . . . . . . . . . . . . . . . . . . . . . .96
8-1 CGM Block Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .104
8-2 CGM I/O Register Summary. . . . . . . . . . . . . . . . . . . . . . . . . .105
8-3 CGM External Connections . . . . . . . . . . . . . . . . . . . . . . . . . .115
Freescale Semiconductor List of Figures 23
List of Figures
Figure Title Page
8-4 PLL Control Register (PCTL) . . . . . . . . . . . . . . . . . . . . . . . . .118
8-5 PLL Bandwidth Control Register (PBWCR) . . . . . . . . . . . . . .121
8-6 PLL Multiplier Select Register High (PMSH) . . . . . . . . . . . . .122
8-7 PLL Multiplier Select Register Low (PMSL) . . . . . . . . . . . . . .122
8-8 PLL VCO Range Select Register (PMRS) . . . . . . . . . . . . . . .123
8-9 PLL Reference Divider Select Register (PMDS) . . . . . . . . . .124
8-10 PLL Filter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .129
9-1 SIM Block Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .133
9-2 SIM I/O Register Summary. . . . . . . . . . . . . . . . . . . . . . . . . . .134
9-3 CGM Clock Signals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .135
9-4 External Reset Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .137
9-5 Internal Reset Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .138
9-6 Sources of Internal Reset. . . . . . . . . . . . . . . . . . . . . . . . . . . .138
9-7 POR Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .139
9-8 Interrupt Entry Timing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .142
9-9 Interrupt Recovery Timing . . . . . . . . . . . . . . . . . . . . . . . . . . .142
9-10 Interrupt Processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .143
9-11 Interrupt Recognition Example. . . . . . . . . . . . . . . . . . . . . . . .144
9-12 Interrupt Status Register 1 (INT1). . . . . . . . . . . . . . . . . . . . . .145
9-13 Interrupt Status Register 2 (INT2). . . . . . . . . . . . . . . . . . . . . .147
9-14 Interrupt Status Register 3 (INT3). . . . . . . . . . . . . . . . . . . . . .147
9-15 Wait Mode Entry Timing. . . . . . . . . . . . . . . . . . . . . . . . . . . . .149
9-16 Wait Recovery from Interrupt or Break. . . . . . . . . . . . . . . . . .150
9-17 Wait Recovery from Internal Reset. . . . . . . . . . . . . . . . . . . . .150
9-18 Stop Mode Entry Timing. . . . . . . . . . . . . . . . . . . . . . . . . . . . .151
9-19 Stop Mode Recovery from Interrupt or Break. . . . . . . . . . . . .151
9-20 SIM Break Status Register (SBSR) . . . . . . . . . . . . . . . . . . . .152
9-21 SIM Reset Status Register (SRSR) . . . . . . . . . . . . . . . . . . . .153
9-22 SIM Break Flag Control Register (SBFCR) . . . . . . . . . . . . . .154
10-1 Monitor Mode Circuit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .158
10-2 Low-Voltage Monitor Mode Entry Flowchart. . . . . . . . . . . . . .162
10-3 Monitor Data Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .163
10-4 Break Transaction. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .163
10-5 Read Transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .165
Technical Data MC68HC908LJ12Rev. 2.1
24 List of Figures Freescale Semiconductor
List of Figures
Figure Title Page
10-6 Write Transaction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .165
10-7 Stack Pointer at Monitor Mode Entry . . . . . . . . . . . . . . . . . . .168
10-8 Monitor Mode Entry Timing. . . . . . . . . . . . . . . . . . . . . . . . . . .169
10-9 Data Block Format for ROM-Resident Routines. . . . . . . . . . .172
10-10 EE_WRITE FLASH Memory Usage. . . . . . . . . . . . . . . . . . . .181
11-1 TIM Block Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .188
11-2 TIM I/O Register Summary. . . . . . . . . . . . . . . . . . . . . . . . . . .189
11-3 PWM Period and Pulse Width . . . . . . . . . . . . . . . . . . . . . . . .194
11-4 TIM Status and Control Register (TSC) . . . . . . . . . . . . . . . . .200
11-5 TIM Counter Registers High (TCNTH) . . . . . . . . . . . . . . . . . .202
11-6 TIM Counter Registers Low (TCNTL). . . . . . . . . . . . . . . . . . .202
11-7 TIM Counter Modulo Register High (TMODH) . . . . . . . . . . . .203
11-8 TIM Counter Modulo Register Low (TMODL). . . . . . . . . . . . .203
11-9 TIM Channel 0 Status and Control Register (TSC0) . . . . . . .204
11-10 TIM Channel 1 Status and Control Register (TSC1) . . . . . . .204
11-11 CHxMAX Latency. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .207
11-12 TIM Channel 0 Register High (TCH0H) . . . . . . . . . . . . . . . . .208
11-13 TIM Channel 0 Register Low (TCH0L). . . . . . . . . . . . . . . . . .208
11-14 TIM Channel 1 Register High (TCH1H) . . . . . . . . . . . . . . . . .208
11-15 TIM Channel 1 Register Low (TCH1L). . . . . . . . . . . . . . . . . .208
12-1 RTC I/O Register Summary . . . . . . . . . . . . . . . . . . . . . . . . . .210
12-2 RTC Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .213
12-3 RTC Control Register 1 (RTCCR1) . . . . . . . . . . . . . . . . . . . .216
12-4 RTC Control Register 2 (RTCCR2) . . . . . . . . . . . . . . . . . . . .218
12-5 RTC Status Register (RTCSR). . . . . . . . . . . . . . . . . . . . . . . .219
12-6 Alarm Minute Register (ALMR). . . . . . . . . . . . . . . . . . . . . . . .222
12-7 Alarm Hour Register (ALHR) . . . . . . . . . . . . . . . . . . . . . . . . .222
12-8 Second Register (SECR) . . . . . . . . . . . . . . . . . . . . . . . . . . . .223
12-9 Minute Register (MINR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .223
12-10 Hour Register (HRR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .224
12-11 Day Register (DAYR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .224
12-12 Month Register (MTHR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225
12-13 Year Register (YRR). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .225
12-14 Day-Of-Week Register (DOWR). . . . . . . . . . . . . . . . . . . . . . .226
12-15 Chronograph Data Register (CHRR) . . . . . . . . . . . . . . . . . . .226
Freescale Semiconductor List of Figures 25
List of Figures
Figure Title Page
13-1 IRSCI I/O Registers Summary . . . . . . . . . . . . . . . . . . . . . . . .230
13-2 IRSCI Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .231
13-3 Infrared Sub-Module Diagram . . . . . . . . . . . . . . . . . . . . . . . .232
13-4 Infrared SCI Data Example. . . . . . . . . . . . . . . . . . . . . . . . . . .233
13-5 SCI Module Block Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . .234
13-6 SCI Data Formats. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .235
13-7 SCI Transmitter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .236
13-8 SCI Receiver Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . .240
13-9 Receiver Data Sampling. . . . . . . . . . . . . . . . . . . . . . . . . . . . .241
13-10 Slow Data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .244
13-11 Fast Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .245
13-12 SCI Control Register 1 (SCC1). . . . . . . . . . . . . . . . . . . . . . . .251
13-13 SCI Control Register 2 (SCC2). . . . . . . . . . . . . . . . . . . . . . . .254
13-14 SCI Control Register 3 (SCC3). . . . . . . . . . . . . . . . . . . . . . . .256
13-15 SCI Status Register 1 (SCS1) . . . . . . . . . . . . . . . . . . . . . . . .258
13-16 Flag Clearing Sequence. . . . . . . . . . . . . . . . . . . . . . . . . . . . .261
13-17 SCI Status Register 2 (SCS2) . . . . . . . . . . . . . . . . . . . . . . . .262
13-18 SCI Data Register (SCDR). . . . . . . . . . . . . . . . . . . . . . . . . . .263
13-19 SCI Baud Rate Register (SCBR) . . . . . . . . . . . . . . . . . . . . . .264
13-20 SCI Infrared Control Register (SCIRCR) . . . . . . . . . . . . . . . .267
14-1 SPI I/O Register Summary . . . . . . . . . . . . . . . . . . . . . . . . . . .271
14-2 SPI Module Block Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . .272
14-3 Full-Duplex Master-Slave Connections . . . . . . . . . . . . . . . . .273
14-4 Transmission Format (CPHA = 0) . . . . . . . . . . . . . . . . . . . . .277
14-5 CPHA/SS Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .277
14-6 Transmission Format (CPHA = 1) . . . . . . . . . . . . . . . . . . . . .278
14-7 Transmission Start Delay (Master). . . . . . . . . . . . . . . . . . . . .280
14-8 SPRF/SPTE CPU Interrupt Timing. . . . . . . . . . . . . . . . . . . . .281
14-9 Missed Read of Overflow Condition . . . . . . . . . . . . . . . . . . . .283
14-10 Clearing SPRF When OVRF Interrupt Is Not Enabled. . . . . .284
14-11 SPI Interrupt Request Generation . . . . . . . . . . . . . . . . . . . . .287
14-12 CPHA/SS
Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .292
14-13 SPI Control Register (SPCR) . . . . . . . . . . . . . . . . . . . . . . . . .294
14-14 SPI Status and Control Register (SPSCR). . . . . . . . . . . . . . .296
14-15 SPI Data Register (SPDR) . . . . . . . . . . . . . . . . . . . . . . . . . . .299
Technical Data MC68HC908LJ12Rev. 2.1
26 List of Figures Freescale Semiconductor
List of Figures
Figure Title Page
15-1 ADC I/O Register Summary . . . . . . . . . . . . . . . . . . . . . . . . . .303
15-2 ADC Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .304
15-3 8-Bit Truncation Mode Error . . . . . . . . . . . . . . . . . . . . . . . . . .307
15-4 ADC Status and Control Register (ADSCR). . . . . . . . . . . . . .310
15-5 ADRH and ADRL in 8-Bit Truncated Mode. . . . . . . . . . . . . . .312
15-6 ADRH and ADRL in Right Justified Mode. . . . . . . . . . . . . . . .312
15-7 ADRH and ADRL in Left Justified Mode. . . . . . . . . . . . . . . . .313
15-8 ADRH and ADRL in Left Justified Sign Data Mode . . . . . . . .313
15-9 ADC Clock Control Register (ADICLK). . . . . . . . . . . . . . . . . .314
16-1 LCD I/O Register Summary . . . . . . . . . . . . . . . . . . . . . . . . . .319
16-2 LCD Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .321
16-3 Simplified LCD Schematic (1/3 Duty, 1/3 Bias) . . . . . . . . . . .322
16-4 Fast Charge Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .324
16-5 1/3 Duty LCD Backplane Driver Waveforms. . . . . . . . . . . . . .326
16-6 Static LCD Backplane Driver Waveform. . . . . . . . . . . . . . . . .327
16-7 1/4 Duty LCD Backplane Driver Waveforms. . . . . . . . . . . . . .327
16-8 Static LCD Frontplane Driver Waveforms. . . . . . . . . . . . . . . .328
16-9 1/3 Duty LCD Frontplane Driver Waveforms . . . . . . . . . . . . .329
16-10 1/4 Duty LCD Frontplane Driver Waveforms . . . . . . . . . . . . .330
16-11 1/4 Duty LCD Frontplane Driver Waveforms (continued). . . .331
16-12 7-Segment Display Example . . . . . . . . . . . . . . . . . . . . . . . . .332
16-13 BP0–BP2 and FP0–FP2 Output Waveforms for
7-Segment Display Example . . . . . . . . . . . . . . . . . . . . . . .333
16-14 "f" Segment Voltage Waveform . . . . . . . . . . . . . . . . . . . . . . .334
16-15 "e" Segment Voltage Waveform. . . . . . . . . . . . . . . . . . . . . . .334
16-16 LCD Control Register (L CDCR) . . . . . . . . . . . . . . . . . . . . . . .335
16-17 LCD Clock Register (LCDCLK). . . . . . . . . . . . . . . . . . . . . . . .337
16-18 LCD Data Registers 1–14 (LDAT1–LDAT14). . . . . . . . . . . . .339
17-1 I/O Port Register Summary. . . . . . . . . . . . . . . . . . . . . . . . . . .342
17-2 Port A Data Register (PTA) . . . . . . . . . . . . . . . . . . . . . . . . . .344
17-3 Data Direction Register A (DDRA) . . . . . . . . . . . . . . . . . . . . .345
17-4 Port A I/O Circuit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .346
17-5 Port B Data Register (PTB) . . . . . . . . . . . . . . . . . . . . . . . . . .347
17-6 Data Direction Register B (DDRB) . . . . . . . . . . . . . . . . . . . . .349
17-7 Port B I/O Circuit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .349
Freescale Semiconductor List of Figures 27
List of Figures
Figure Title Page
17-8 Port B LED Control Register (LEDB) . . . . . . . . . . . . . . . . . . .350
17-9 Port C Data Register (PTC) . . . . . . . . . . . . . . . . . . . . . . . . . .351
17-10 Data Direction Register B (DDRB) . . . . . . . . . . . . . . . . . . . . .352
17-11 Port C I/O Circuit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .352
17-12 Port D Data Register (PTD) . . . . . . . . . . . . . . . . . . . . . . . . . .354
17-13 Data Direction Register D (DDRD). . . . . . . . . . . . . . . . . . . . .355
17-14 Port D I/O Circuit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .356
18-1 IRQ Module Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . .359
18-2 IRQ Status and Control Register (INTSCR) . . . . . . . . . . . . . .362
19-1 KBI I/O Register Summary . . . . . . . . . . . . . . . . . . . . . . . . . . .364
19-2 Keyboard Interrupt Block Diagram . . . . . . . . . . . . . . . . . . . . .365
19-3 Keyboard Status and Control Register (KBSCR) . . . . . . . . . .368
19-4 Keyboard Interrupt Enable Register (KBIER). . . . . . . . . . . . .369
20-1 COP Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .372
20-2 Configuration Register 1 (CONFIG1) . . . . . . . . . . . . . . . . . . .374
20-3 COP Control Register (COPCTL). . . . . . . . . . . . . . . . . . . . . .375
21-1 LVI I/O Register Summary . . . . . . . . . . . . . . . . . . . . . . . . . . .378
21-2 LVI Module Block Diagram. . . . . . . . . . . . . . . . . . . . . . . . . . .378
22-1 Break Module Block Diagram. . . . . . . . . . . . . . . . . . . . . . . . .385
22-2 Break Module I/O Register Summary. . . . . . . . . . . . . . . . . . .385
22-3 Break Status and Control Register (BRKSCR). . . . . . . . . . . .387
22-4 Break Address Register High (BRKH) . . . . . . . . . . . . . . . . . .388
22-5 Break Address Register Low (BRKL) . . . . . . . . . . . . . . . . . . .388
22-6 SIM Break Status Register (SBSR) . . . . . . . . . . . . . . . . . . . .389
22-7 SIM Break Flag Control Register (SBFCR) . . . . . . . . . . . . . .390
23-1 SPI Master Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .404
23-2 SPI Slave Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .405
24-1 52-Pin Low-Profile Quad Flat Pack (Case No. 848D). . . . . . .408
24-2 64-Pin Low-Profile Quad Flat Pack (Case No. 840F). . . . . . .409
24-3 64-Pin Quad Flat Pack (Case No. 840B) . . . . . . . . . . . . . . . .410
Technical Data MC68HC908LJ12Rev. 2.1
28 List of Figures Freescale Semiconductor
Technical Data — MC68HC908LJ12
Table Title Page
2-1 Vector Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .58
5-1 LVI Trip Point Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .76
6-1 Instruction Set Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . .86
6-2 Opcode Map. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .94
8-1 Numeric Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .113
8-3 VPR1 and VPR0 Programming . . . . . . . . . . . . . . . . . . . . . . .120
8-2 PRE 1 and PRE0 Programming . . . . . . . . . . . . . . . . . . . . . . .120
9-1 Signal Name Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . .133
9-2 PIN Bit Set Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .137
9-3 Vector Addresses . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .146

List of Tables

10-1 Monitor Mode Signal Requirements and Options. . . . . . . . . .160
10-2 Mode Differences (Vectors) . . . . . . . . . . . . . . . . . . . . . . . . . .162
10-3 Monitor Baud Rate Selection . . . . . . . . . . . . . . . . . . . . . . . . .164
10-4 READ (Read Memory) Command . . . . . . . . . . . . . . . . . . . . .165
10-5 WRITE (Write Memory) Command. . . . . . . . . . . . . . . . . . . . .166
10-6 IREAD (Indexed Read) Command . . . . . . . . . . . . . . . . . . . . .166
10-7 IWRITE (Indexed Write) Command . . . . . . . . . . . . . . . . . . . .167
10-8 READSP (Read Stack Pointer) Command. . . . . . . . . . . . . . .167
10-9 RUN (Run User Program) Command. . . . . . . . . . . . . . . . . . .168
10-10 Summary of ROM-Resident Routines . . . . . . . . . . . . . . . . . .171
10-11 PRGRNGE Routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .173
10-12 ERARNGE Routine. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .175
10-13 LDRNGE Routine. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .176
10-14 MON_PRGRNGE Routine . . . . . . . . . . . . . . . . . . . . . . . . . . .177
10-15 MON_ERARNGE Routine . . . . . . . . . . . . . . . . . . . . . . . . . . .178
Freescale Semiconductor List of Tables 29
List of Tables
Table Title Page
10-16 ICP_LDRNGE Routine. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .179
10-17 EE_WRITE Routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .180
10-18 EE_READ Routine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .183
11-1 Pin Name Conventions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .187
11-2 Prescaler Selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .201
11-3 Mode, Edge, and Level Selection. . . . . . . . . . . . . . . . . . . . . .206
12-1 CGMXCLK Frequency for RTC Input Reference . . . . . . . . . .219
13-1 Pin Name Conventions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .231
13-2 Start Bit Verification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .242
13-3 Data Bit Recovery. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .242
13-4 Stop Bit Recovery. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .243
13-5 SCI Pin Functions (Standard and Infrared). . . . . . . . . . . . . . .250
13-6 Character Format Selection . . . . . . . . . . . . . . . . . . . . . . . . . .253
13-7 SCI Baud Rate Prescaling . . . . . . . . . . . . . . . . . . . . . . . . . . .264
13-8 SCI Baud Rate Selection . . . . . . . . . . . . . . . . . . . . . . . . . . . .265
13-9 SCI Baud Rate Selection Examples. . . . . . . . . . . . . . . . . . . .266
13-10 Infrared Narrow Pulse Selection. . . . . . . . . . . . . . . . . . . . . . .267
14-1 Pin Name Conventions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .271
14-2 SPI Interrupts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .286
14-3 SPI Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .293
14-4 SPI Master Baud Rate Selection . . . . . . . . . . . . . . . . . . . . . .298
15-1 MUX Channel Select . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .311
15-2 ADC Clock Divide Ratio . . . . . . . . . . . . . . . . . . . . . . . . . . . . .314
15-3 ADC Mode Select. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .315
16-1 Pin Name Conventions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .318
16-3 LCD Bias Voltage Control. . . . . . . . . . . . . . . . . . . . . . . . . . . .336
16-2 Resistor Ladder Selection. . . . . . . . . . . . . . . . . . . . . . . . . . . .336
16-4 Fast Charge Duty Cycle Selection . . . . . . . . . . . . . . . . . . . . .337
16-5 LCD Duty Cycle Selection . . . . . . . . . . . . . . . . . . . . . . . . . . .338
16-6 LCD Waveform Base Clock Selection . . . . . . . . . . . . . . . . . .338
Technical Data MC68HC908LJ12Rev. 2.1
30 List of Tables Freescale Semiconductor
Loading...
+ 384 hidden pages