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://www.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.
Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc.
This product incorporates SuperFlash® technology licensed from SST.
The MC68H(R)C908JL3E is a member of the low-cost, high-performance M68HC08 Family of 8-bit
microcontroller units (MCUs). The M68HC08 Family is based on the customer-specified integrated circuit
(CSIC) design strategy. All MCUs in the family use the enhanced M68HC08 central processor unit
(CPU08) and are available with a variety of modules, memory sizes and types, and package types.
A list of MC68H(R)C908JL3E device variations is shown in Table 1-1.
Table 1-1. Summary of Device Variations
Device
Type
FLASH3V, 5VYesYes
Low Voltage
FLASH
(2)
ROM
FLASH,
ADC-less
Operating
Voltage
2.2 to 5.5VNoYesXTAL
(1)
3V, 5VYesYes
(3)
3V, 5 VYesNoXTAL4,096 bytes FLASH
LVIADC
Oscillator
Option
XTAL
RC
XTAL
RC
Memory
4,096 bytes FLASH
1,536 bytes FLASH20MC68HC908JK1E
4,096 bytes FLASH
1,536 bytes FLASH20MC68HRC908JK3E
4,096 bytes FLASH
1,536 bytes FLASH20MC68HLC908JK1E
4,096 bytes ROM
Pin
Count
28MC68HC908JL3E
20MC68HC908JK3E
28MC68HRC908JL3E
20MC68HRC908JK3E
28MC68HLC908JL3E
20MC68HLC908JK3E
28MC68HC08JL3E
20MC68HC08JK3E
28MC68HRC08JL3E
20MC68HRC08JK3E
28MC68HC908KL3E
20MC68HC908KK3E
Device
1. Low-voltage FLASH devices are documented in Appendix A MC68HLC908JL3E/JK3E/JK1E.
2. ROM devices are documented in Appendix B MC68H(R)C08JL3E/JK3E.
3. FLASH, ADC-less devices are documented in Appendix C MC68HC908KL3E/KK3E.
All references to the MC68H(R)C908JL3E in this data book apply equally to the MC68H(R)C908JK3E
and MC68H(R)C908JK1E, unless otherwise stated.
MC68HC908JL3E Family Data Sheet, Rev. 3
Freescale Semiconductor15
General Description
1.2 Features
Features of the MC68H(R)C908JL3E include the following:
•EMC enhanced version of MC68H(R)C908JL3/JK3/JK1
•High-performance M68HC08 architecture
•Fully upward-compatible object code with M6805, M146805, and M68HC05 Families
•Low-power design; fully static with stop and wait modes
•Maximum internal bus frequency:
–8-MHz at 5V operating voltage
–4-MHz at 3V operating voltage
•Oscillator options:
–Crystal oscillator for MC68HC908JL3E/JK3E/JK1E
–RC oscillator for MC68HRC908JL3E/JK3E/JK1E
•User program FLASH memory with security
–4,096 bytes for MC68H(R)C908JL3E/JK3E
–1,536 bytes for MC68H(R)C908JK1E
Description of the pin functions are provided in Table 1-2.
Table 1-2. Pin Functions
PIN NAMEPIN DESCRIPTIONIN/OUTVOLTAGE LEVEL
VDDPower supply.In5V or 3V
VSSPower supply groundOut0V
RST
IRQ1
OSC1X-tal or RC oscillator input.InAnalog
OSC2
PTA[0:6]
PTB[0:7]
RESET input, active low.
With Internal pull-up and schmitt trigger input.
External IRQ pin.
With software programmable internal pull-up and schmitt
trigger input.
This pin is also used for mode entry selection.
MC68HC908JL3E/JK3E/JK1E:
X-tal oscillator output, this is the inverting OSC1 signal.
MC68HRC908JL3E/JK3E/JK1E:
Default is RC oscillator clock output, RCCLK.
Shared with PTA6/KBI6, with programmable pull-up.
7-bit general purpose I/O port.In/OutVDD
Shared with 7 keyboard interrupts KBI[0:6].InVDD
Each pin has programmable internal pull-up device.InVDD
PTA[0:5] have LED direct sink capabilityInVSS
8-bit general purpose I/O port.In/OutVDD
Shared with 8 ADC inputs, ADC[0:7].InAnalog
8-bit general purpose I/O port.In/OutVDD
InputVDD
Input
OutAnalog
In/OutVDD
VDD to VDD+V
HI
PTD[3:0] shared with 4 ADC inputs, ADC[8:11].InputAnalog
PTD[0:7]
PTD[4:5] shared with TIM channels, TCH0 and TCH1.In/OutVDD
PTD[2:3], PTD[6:7] have LED direct sink capabilityInVSS
PTD[6:7] can be configured as 25mA open-drain output with
pull-up.
In/OutVDD
NOTE
On the MC68H(R)C908JK3E/JK1E, the following pins are not available:
PTA0, PTA1, PTA2, PTA3, PTA4, PTA5, PTD0, and PTD1.
MC68HC908JL3E Family Data Sheet, Rev. 3
20Freescale Semiconductor
Chapter 2
Memory
2.1 Introduction
The CPU08 can address 64 Kbytes of memory space. The memory map, shown in Figure 2-1, includes:
•4,096 bytes of user FLASH — MC68H(R)C908JL3E/JK3E
1,536 bytes of user FLASH — MC68H(R)C908JK1E
•128 bytes of RAM
•48 bytes of user-defined vectors
•960 bytes of Monitor ROM
2.2 I/O Section
Addresses $0000–$003F, shown in Figure 2-2, contain most of the control, status, and data registers.
Additional I/O registers have the following addresses:
•$FE00; Break Status Register, BSR
•$FE01; Reset Status Register, RSR
•$FE02; Reserved
•$FE03; Break Flag Control Register, BFCR
•$FE04; Interrupt Status Register 1, INT1
•$FE05; Interrupt Status Register 2, INT2
•$FE06; Interrupt Status Register 3, INT3
•$FE07; Reserved
•$FE08; FLASH Control Register, FLCR
•$FE09; FLASH Block Protect Register, FLBPR
•$FE0A; Reserved
•$FE0B; Reserved
•$FE0C; Break Address Register High, BRKH
•$FE0D; Break Address Register Low, BRKL
•$FE0E; Break Status and Control Register, BRKSCR
•$FE0F; Reserved
•$FFFF; COP Control Register, COPCTL
2.3 Monitor ROM
The 960 bytes at addresses $FC00–$FDFF and $FE10–$FFCF are reserved ROM addresses that
contain the instructions for the monitor functions. (See Chapter 7 Monitor ROM (MON).)
Figure 2-2. Control, Status, and Data Registers (Sheet 1 of 4)
MC68HC908JL3E Family Data Sheet, Rev. 3
Freescale Semiconductor23
Memory
Addr.Register NameBit 7654321Bit 0
$001C
Unimplemented
Read:
Write:
IRQ Status and Control
$001D
$001E
$001F
† One-time writable register after each reset. * LVIT1 and LVIT0 reset to logic 0 by a power-on reset (POR) only.
Configuration Register 2
Configuration Register 1
Register
(INTSCR)
(CONFIG2)
(CONFIG1)
TIM Status and Control
$0020
Register
TIM Counter Register
$0021
(TCNTH)
TIM Counter Register
$0022
(TCNTL)
TIM Counter Modulo
$0023
Register High
(TMODH)
TIM Counter Modulo
$0024
Register Low
(TMODL)
TIM Channel 0 Status and
$0025
Control Register
(TSC0)
TIM Channel 0
$0026
Register High
(TCH0H)
TIM Channel 0
$0027
Register Low
(TCH0L)
TIM Channel 1 Status and
$0028
Control Register
(TSC1)
TIM Channel 1
$0029
Register High
(TCH1H)
TIM Channel 1
$002A
Register Low
(TCH1L)
Read:0000IRQF10
Write:
Reset:00000000
Read:
IRQPUDRRLVIT1LVIT0RRR
Write:
†
Reset:0000*0*000
Read:
Write:
†
Reset:00000000
Read:TOF
Write:0TRST
(TSC)
Reset:
COPRSRRLVIDRSSRECSTOPCOPD
TOIETSTOP
00100000
00
Read:Bit15Bit14Bit13Bit12Bit11Bit10Bit9Bit8
Write:
High
Reset:
00000000
Read:Bit7Bit6Bit5Bit4Bit3Bit2Bit1Bit0
Write:
Low
Reset:
Read:
Write:
Reset:
Read:
Write:
Reset:
Read:CH0F
Write:0
Reset:
Read:
Write:
Reset:
Read:
Write:
Reset:
Read:CH1F
Write:0
Reset:
Read:
Write:
Reset:
Read:
Write:
Reset:
00000000
Bit15Bit14Bit13Bit12Bit11Bit10Bit9Bit8
11111111
Bit7Bit6Bit5Bit4Bit3Bit2Bit1Bit0
11111111
CH0IEMS0BMS0AELS0BELS0ATOV0CH0MAX
00000000
Bit15Bit14Bit13Bit12Bit11Bit10Bit9Bit8
Indeterminate after reset
Bit7Bit6Bit5Bit4Bit3Bit2Bit1Bit0
Indeterminate after reset
CH1IE
00000000
0
MS1AELS1BELS1ATOV1CH1MAX
Bit15Bit14Bit13Bit12Bit11Bit10Bit9Bit8
Indeterminate after reset
Bit7Bit6Bit5Bit4Bit3Bit2Bit1Bit0
Indeterminate after reset
= UnimplementedR= Reserved
ACK1
IMASK1MODE1
PS2PS1PS0
Figure 2-2. Control, Status, and Data Registers (Sheet 2 of 4)
MC68HC908JL3E Family Data Sheet, Rev. 3
24Freescale Semiconductor
Monitor ROM
Addr.Register NameBit 7654321Bit 0
$002B
$003B
↓
Unimplemented
Read:
Write:
ADC Status and Control
$003C
$003D
$003E
$003F
$FE00 Break Status Register (BSR)
$FE01 Reset Status Register (RSR)
$FE02Reserved
$FE03
$FE04
$FE05
$FE06
$FE07Reserved
ADC Data Register
ADC Input Clock Register
Note: Writing a logic 0 clears SBSW.
Break Flag Control
Interrupt Status Register 1
Interrupt Status Register 2
Interrupt Status Register 3
Register
(ADSCR)
(ADR)
(ADICLK)
Unimplemented
Register
(BFCR)
(INT1)
(INT2)
(INT3)
Read:COCO
Write:
Reset:00011111
Read:AD7AD6AD5AD4AD3AD2AD1AD0
Write:
Reset:Indeterminate after reset
Read:
Write:
Reset:00000000
Read:
Write:
Read:
Write:See note
Reset:0
Read:PORPINCOPILOPILADMODRSTLVI0
Write:
POR:10000000
Read:
Write:
Read:
Write:
Reset:0
Read:0IF5IF4IF30IF100
Write:RRRRRRRR
Reset:00000000
Read:IF140000000
Write:RRRRRRRR
Reset:00000000
Read:0000000IF15
Write:RRRRRRRR
Reset:00000000
Read:
Write:
ADIV2ADIV1ADIV0
RRRRRR
RRRRRRRR
BCFERRRRRRR
RRRRRRRR
AIENADCOADCH4ADCH3ADCH2ADCH1ADCH0
00000
SBSW
R
$FE08
$FE09
FLASH Control Register
(FLCR)
FLASH Block Protect
Register (FLBPR)
Read:0000
Write:
Reset:00000000
Read:
Write:
Reset:00000000
BPR7BPR6BPR5BPR4BPR3BPR2BPR1BPR0
= UnimplementedR= Reserved
HVENMASSERASEPGM
Figure 2-2. Control, Status, and Data Registers (Sheet 3 of 4)
MC68HC908JL3E Family Data Sheet, Rev. 3
Freescale Semiconductor25
Memory
Addr.Register NameBit 7654321Bit 0
$FE0A
$FE0B
$FE0C
$FE0D
$FE0E
↓
Break Address High
Break Address low
Break Status and Control
Reserved
Register
(BRKH)
Register
(BRKL)
Register
(BRKSCR)
Read:
Write:
Read:
Write:
Reset:00000000
Read:
Write:
Reset:00000000
Read:
Write:
Reset:00000000
RRRRRRRR
Bit15Bit14Bit13Bit12Bit11Bit10Bit9Bit8
Bit7Bit6Bit5Bit4Bit3Bit2Bit1Bit0
BRKEBRKA
000000
$FFFF
COP Control Register
(COPCTL)
Read:Low byte of reset vector
Write:Writing clears COP counter (any value)
Reset:Unaffected by reset
= UnimplementedR= Reserved
Figure 2-2. Control, Status, and Data Registers (Sheet 4 of 4)
Table 2-1. Vector Addresses
Vector PriorityINT FlagAddressVector
Lowest
—
IF15
IF14
IF13
↓
IF6
IF5
IF4
IF3
IF2—Not Used
IF1
—
—
Highest
$FFD0
↓
$FFDD
$FFDEADC Conversion Complete Vector (High)
$FFDFADC Conversion Complete Vector (Low)
$FFE0Keyboard Vector (High)
$FFE1Keyboard Vector (Low)
—Not Used
$FFF2TIM Overflow Vector (High)
$FFF3TIM Overflow Vector (Low)
$FFF4TIM Channel 1 Vector (High)
$FFF5TIM Channel 1 Vector (Low)
$FFF6TIM Channel 0 Vector (High)
$FFF7TIM Channel 0 Vector (Low)
$FFFAIRQ1
$FFFBIRQ1
$FFFCSWI Vector (High)
$FFFDSWI Vector (Low)
$FFFEReset Vector (High)
$FFFFReset Vector (Low)
Not Used
Vector (High)
Vector (Low)
MC68HC908JL3E Family Data Sheet, Rev. 3
26Freescale Semiconductor
Random-Access Memory (RAM)
2.4 Random-Access Memory (RAM)
Addresses $0080 through $00FF are RAM locations. The location of the stack RAM is programmable.
The 16-bit stack pointer allows the stack to be anywhere in the 64-Kbyte memory space.
NOTE
For correct operation, the stack pointer must point only to RAM locations.
Within page zero are 128 bytes of RAM. Because the location of the stack RAM is programmable, all page
zero RAM locations can be used for I/O control and user data or code. When the stack pointer is moved
from its reset location at $00FF, direct addressing mode instructions can access efficiently all page zero
RAM locations. Page zero RAM, therefore, provides ideal locations for frequently accessed global
variables.
Before processing an interrupt, the CPU uses five bytes of the stack to save the contents of the CPU
registers.
NOTE
For M6805 compatibility, the H register is not stacked.
During a subroutine call, the CPU uses two bytes of the stack to store the return address. The stack
pointer decrements during pushes and increments during pulls.
NOTE
Be careful when using nested subroutines. The CPU may overwrite data in
the RAM during a subroutine or during the interrupt stacking operation.
2.5 FLASH Memory
This sub-section describes the operation of the embedded FLASH memory. The FLASH memory can be
read, programmed, and erased from a single external supply. The program and erase operations are
enabled through the use of an internal charge pump.
Device
MC68H(R)C908JL3E4,096$EC00—$FBFF
MC68H(R)C908JK3E4,096$EC00—$FBFF
MC68H(R)C908JK1E1,536$F600—$FBFF
Addr.Register NameBit 7654321Bit 0
Read:0000
Write:
Reset:00000000
Read:
Write:
Reset:00000000
BPR7BPR6BPR5BPR4BPR3BPR2BPR1BPR0
$FE08
$FE09
FLASH Control Register
(FLCR)
FLASH Block Protect
Register
(FLBPR)
FLASH Memory Size
(Bytes)
= Unimplemented
Memory Address Range
HVENMASSERASEPGM
Figure 2-3. FLASH I/O Register Summary
MC68HC908JL3E Family Data Sheet, Rev. 3
Freescale Semiconductor27
Memory
2.6 Functional Description
The FLASH memory consists of an array of 4,096 or 1,536 bytes with an additional 48 bytes for user
vectors. The minimum size of FLASH memory that can be erased is 64 bytes (a page); and the maximum
size of FLASH memory that can be programmed in a program cycle is 32 bytes (a row). Program and
erase operations are facilitated through control bits in the Flash Control Register (FLCR). Details for these
operations appear later in this section. The address ranges for the user memory and vectors are:
•$EC00–$FBFF; user memory; 4,096 bytes; MC68H(R)C908JL3E/JK3E
$F600–$FBFF; user memory; 1,536 bytes;
MC68H(R)C908JK1E
•$FFD0–$FFFF; user interrupt vectors; 48 bytes
NOTE
An erased bit reads as logic 1 and a programmed bit reads as logic 0.
A security feature prevents viewing of the FLASH contents.
(1)
2.7 FLASH Control Register
The FLASH Control Register controls FLASH program and erase operations.
Address:$FE08
Bit 7654321Bit 0
Read:0000
Write:
Reset:00000000
HVENMASSERASEPGM
Figure 2-4. FLASH Control Register (FLCR)
HVEN — High Voltage Enable Bit
This read/write bit enables high voltage from the charge pump to the memory for either program or
erase operation. It can only be set if either PGM= 1 or ERASE=1 and the proper sequence for program
or erase is followed.
1 = High voltage enabled to array and charge pump on
0 = High voltage disabled to array and charge pump off
MASS — Mass Erase Control Bit
This read/write bit configures the memory for mass erase operation or page erase operation when the
ERASE bit is set.
1. No security feature is absolutely secure. However, Motorola’s strategy is to make reading or copying the FLASH difficult for
unauthorized users.
MC68HC908JL3E Family Data Sheet, Rev. 3
28Freescale Semiconductor
FLASH Page Erase Operation
PGM — Program Control Bit
This read/write bit configures the memory for program operation. This bit and the ERASE bit should
not be set to 1 at the same time.
1 = Program operation selected
0 = Program operation not selected
2.8 FLASH Page Erase Operation
Use the following procedure to erase a page of FLASH memory. A page consists of 64 consecutive bytes
starting from addresses $XX00, $XX40, $XX80 or $XXC0. The 48-byte user interrupt vectors area also
forms a page. Any page within the 4K bytes user memory area ($EC00–$FBFF) can be erased alone.
The 48-byte user interrupt vectors cannot be erased by the page erase operation because of security
reasons. Mass erase is required to erase this page.
1.Set the ERASE bit and clear the MASS bit in the FLASH Control Register.
2.Write any data to any FLASH address within the page address range desired.
3.Wait for a time, t
4.Set the HVEN bit.
5.Wait for a time t
6.Clear the ERASE bit.
7.Wait for a time, t
8.Clear the HVEN bit.
9.After time, t
rcv
Programming and erasing of FLASH locations cannot be performed by
code being executed from the FLASH memory. While these operations
must be performed in the order as shown, but other unrelated operations
may occur between the steps.
(10µs).
nvs
(1ms).
Erase
(5µs).
nvh
(1µs), the memory can be accessed in read mode again.
NOTE
2.9 FLASH Mass Erase Operation
Use the following procedure to erase the entire FLASH memory:
1.Set both the ERASE bit and the MASS bit in the FLASH Control Register.
2.Write any data to any FLASH location within the FLASH memory address range.
3.Wait for a time, t
4.Set the HVEN bit.
5.Wait for a time t
6.Clear the ERASE bit.
7.Wait for a time, t
8.Clear the HVEN bit.
9.After time, t
rcv
Programming and erasing of FLASH locations cannot be performed by
code being executed from the FLASH memory. While these operations
must be performed in the order as shown, but other unrelated operations
may occur between the steps.
Freescale Semiconductor29
(10µs).
nvs
nvh1
(4ms).
(100µs).
MErase
(1µs), the memory can be accessed in read mode again.
NOTE
MC68HC908JL3E Family Data Sheet, Rev. 3
Memory
2.10 FLASH Program Operation
Programming of the FLASH memory is done on a row basis. A row consists of 32 consecutive bytes
starting from addresses $XX00, $XX20, $XX40, $XX60, $XX80, $XXA0, $XXC0 or $XXE0. Use this
step-by-step procedure to program a row of FLASH memory:
(Figure 2-5 shows a flowchart of the programming algorithm.)
1.Set the PGM bit. This configures the memory for program operation and enables the latching of
address and data for programming.
2.Write any data to any FLASH location within the address range of the row to be programmed.
3.Wait for a time, t
4.Set the HVEN bit.
5.Wait for a time, t
6.Write data to the byte being programmed.
(10µs).
nvs
(5µs).
pgs
7.Wait for time, t
PROG
(30µs).
8.Repeat step 6 and 7 until all the bytes within the row are programmed.
9.Clear the PGM bit.
10.Wait for time, t
nvh
(5µs).
11.Clear the HVEN bit.
12.After time, t
(1µs), the memory can be accessed in read mode again.
rcv
This program sequence is repeated throughout the memory until all data is programmed.
NOTE
The time between each FLASH address change (step 6 to step 6), or the
time between the last FLASH addressed programmed to clearing the PGM
bit (step 6 to step 10), must not exceed the maximum programming time,
max.
t
PROG
NOTE
Programming and erasing of FLASH locations cannot be performed by
code being executed from the FLASH memory. While these operations
must be performed in the order shown, other unrelated operations may
occur between the steps.
MC68HC908JL3E Family Data Sheet, Rev. 3
30Freescale Semiconductor
Loading...
+ 142 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.