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://motorola.com/semiconductors/
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.
The MC68HC908AP64 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)
nc...
I
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.
cale Semiconductor,
Frees
1.2 Features
Table 1-1. Summary of Device Variations
Device
MC68HC908AP642,04862,368
MC68HC908AP322,04832,768
MC68HC908AP161,02416,384
MC68HC908AP81,0248,192
Features of the MC68HC908AP64 include the following:
•High-performance M68HC08 architecture
•Fully upward-compatible object code with M6805, M146805, and
M68HC05 Families
•Maximum internal bus frequency:
–8-MHz at 5V or 3V operating voltage
RAM Size
(bytes)
FLASH Memory Size
(bytes)
•Clock input options:
–RC-oscillator
–32-kHz crystal-oscillator with 32MHz internal phase-lock-loop
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA23
For More Information On This Product,
Go to: www.freescale.com
General Description
Freescale Semiconductor, Inc.
•User program FLASH memory with security1 feature
•On-chip RAM
–62,368 bytes for MC68HC908AP64
–32,768 bytes for MC68HC908AP32
–16,384 bytes for MC68HC908AP16
–8,192 bytes for MC68HC908AP8
–2,048 bytes for MC68HC908AP64 and MC68HC908AP32
–1,024 bytes for MC68HC908AP16 and MC68HC908AP8
nc...
I
cale Semiconductor,
Frees
•Two 16-bit, 2-channel timer interface modules (TIM1 and TIM2)
with selectable input capture, output compare, and PWM
capability on each channel
•Timebase module
•Serial communications interface module 1 (SCI)
•Serial communications interface module 2 (SCI) with
infrared (IR) encoder/decoder
•Serial peripheral interface module (SPI)
•System management bus (SMBus), version 1.0/1.1
(multi-master IIC bus)
8-bit general purpose I/O port; PTB0–PTB3 are open drain
when configured as output. PTB4–PTB7 have schmitt
trigger inputs.
PTB0/SDA
PTB1/SCL
PTB2/TxD
PTB3/RxD
PTB4/T1CH0
nc...
I
cale Semiconductor,
PTB5/T1CH1
PTB6/T2CH0
PTB7/T2CH1
PTC0/IRQ2
PTC1
PTC2/MISO
PTC3/MOSI
PTC4/SS
PTC5/SPSCK
PTC6/SCTxD
PTC7/SCRxD
PTB0 as SDA of MMIIC.In/Out
PTB1 as SCL of MMIIC.In/Out
PTB2 as TxD of SCI; open drain output.Out
PTB3 as RxD of SCI.In
PTB4 as T1CH0 of TIM1.In/Out
PTB5 as T1CH1 of TIM1.In/Out
PTB6 as T2CH0 of TIM2.In/Out
PTB7 as T2CH1 of TIM2.In/Out
8-bit general purpose I/O port; PTC6 and PTC7 are open
drain when configured as output.
PTC0 is shared with IRQ2 and has schmitt trigger input.In
PTC2 as MISO of SPI.In
PTC3 as MOSI of SPI.Out
PTC4 as SS of SPI.In
PTC5 as SPSCK of SPI.In/Out
PTC6 as SCTxD of IRSCI; open drain output.Out
PTC7 as SCRxD of IRSCI.In
In/Out
In/Out
VOLTAGE
LEVEL
V
DD
V
DD
V
DD
V
DD
V
DD
V
DD
V
DD
V
DD
V
DD
V
DD
V
DD
V
DD
V
DD
V
DD
V
DD
V
DD
V
DD
Frees
PTD0/KBI0
:
PTD7/KBI7
Notes:
1. See Section 24. Electrical Specifications for V
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA31
8-bit general purpose I/O port with schmitt trigger inputs.In/Out
Pins as keyboard interrupts (with pullup), KBI0–KBI7. In
tolerance.
REG
For More Information On This Product,
Go to: www.freescale.com
V
V
DD
DD
Freescale Semiconductor, Inc.
General Description
1.6 Power Supply Bypassing (VDD, VDDA, VSS, VSSA)
VDD and VSS are the power supply and ground pins, the MCU operates
from a single power supply together with an on chip voltage regulator.
Fast signal transitions on MCU pins place high. short-duration current
demands on the power supply. To prevent noise problems, take special
care to provide power supply bypassing at the MCU as Figure 1-5
shows. Place the bypass capacitors as close to the MCU power pins as
possible. Use high-frequency-response ceramic capacitor for C
C
that require the port pins to source high current level.
are optional bulk current bypass capacitors for use in applications
BULK
BYPASS
,
nc...
I
cale Semiconductor,
Frees
V
DDA
and V
are the power supply and ground pins for the analog
SSA
circuits of the MCU. These pins should be decoupled as per the digital
power supply pins.
is the output from the on-chip regulator. All internal logics, except
REG
for the I/O pads, are powered by V
ceramic bypass capacitor of 100 nF as Figure 1-6 shows. Place the
bypass capacitor as close to the V
output. V
REG
REG
MCU
requires an external
REG
pin as possible.
General Description
V
REG
nc...
I
C
VREGBYPASS
100 nF
Figure 1-6. Regulator Power Supply Bypassing
cale Semiconductor,
V
SS
Frees
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA33
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
General Description
nc...
I
cale Semiconductor,
Frees
Data SheetMC68HC908AP Family — Rev. 2.5
34MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Data Sheet – MC68HC908AP Family
2.1 Introduction
The CPU08 can address 64k-bytes of memory space. The memory map,
shown in Figure 2-1, includes:
Section 2. Memory Map
nc...
I
cale Semiconductor,
Frees
•62,368 bytes of user FLASH — MC68HC908AP64
32,768 bytes of user FLASH — MC68HC908AP32
16,384 bytes of user FLASH — MC68HC908AP16
8,192 bytes of user FLASH — MC68HC908AP8
•2,048 bytes of RAM — MC68HC908AP64 and MC68HC908AP32
1,024 bytes of RAM — MC68HC908AP16 and MC68HC908AP8
•48 bytes of user-defined vectors
•959 bytes of monitor ROM
2.2 Unimplemented Memory Locations
Accessing an unimplemented location can cause an illegal address
reset if illegal address resets are enabled. In the memory map
(Figure 2-1) 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 the Figure 2-1 and in register figures in this document,
reserved locations are marked with the word Reserved or with the
letter R.
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA35
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Memory Map
2.4 Input/Output (I/O) Section
Most of the control, status, and data registers are in the zero page area
of $0000–$005F. Additional I/O registers have these addresses:
•$FE00; SIM break status register, SBSR
•$FE01; SIM reset status register, SRSR
•$FE02; Reserved
•$FE03; SIM break flag control register, SBFCR
•$FE04; interrupt status register 1, INT1
nc...
I
cale Semiconductor,
Frees
•$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; LVI Status register, LVISR
•$FFCF; Mask option register, MOR (FLASH register)
•$FFFF; COP control register, COPCTL
Data registers are shown in Figure 2-2. Table 2-1 is a list of vector
locations.
Data SheetMC68HC908AP Family — Rev. 2.5
36MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Memory Map
Input/Output (I/O) Section
nc...
I
cale Semiconductor,
Frees
$0000
↓
$005F
$0060
↓
$085F
$0860
↓
$FBFF
$FC00
↓
$FDFF
$FE00SIM Break Status Register
$FE01SIM Reset Status Register
$FE02Reserved
$FE03SIM Break Flag Control Register
$FE04Interrupt Status Register 1
$FE05Interrupt Status Register 2
$FE06Interrupt Status Register 3
$FE07Reserved
$FE08FLASH Control Register
$FE09FLASH Block Protect Register
$FE0AReserved
$FE0BReserved
$FE0CBreak Address Register High
$FE0DBreak Address Register Low
$FE0EBreak Status and Control Register
$FE0FLVI Status Register
$FE10
↓
$FFCE
$FFCFMask Option Register
$FFD0
↓
$FFFF
I/O Registers
96 Bytes
RAM
2,048 Bytes
(MC68HC908AP64)
FLASH Memory
62,368 Bytes
(MC68HC908AP64)
Monitor ROM 2
512 Bytes
Monitor ROM 1
447 Bytes
FLASH Vectors
48 Bytes
MC68HC908AP32MC68HC908AP16MC68HC908AP8
RAM
2,048 Bytes
FLASH Memory
32,768 Bytes
Unimplemented
29,600 Bytes
$0060
↓
$085F
$0860
↓
$885F
$8860
↓
$FBFF
RAM
1,024 Bytes
Unimplemented
1,024 Bytes
FLASH Memory
16,384 Bytes
Unimplemented
45,984 Bytes
$0060
$045F
$0860
↓
$485F
$4860
↓
$FBFF
RAM
1,024 Bytes
Unimplemented
1,024 Bytes
FLASH Memory
8,192 Bytes
Unimplemented
54,176 Bytes
Figure 2-1. Memory Map
$0060
$045F
$0860
$285F
$2860
↓
$FBFF
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA37
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Memory Map
Addr.Register NameBit 7654321Bit 0
nc...
I
cale Semiconductor,
Frees
Read:
$0000
$0001
$0002
$0003
$0004
$0005
$0006
$0007
$0008
Port A Data Register
(PTA)
Port B Data Register
(PTB)
Port C Data Register
(PTC)
Port D Data Register
(PTD)
Data Direction Register A
(DDRA)
Data Direction Register B
(DDRB)
Data Direction Register C
(DDRC)
Data Direction Register D
(DDRD)
Unimplemented
Write:
Reset:Unaffected by reset
Read:
Write:
Reset:Unaffected by reset
Read:
Write:
Reset:Unaffected by reset
Read:
Write:
Reset:Unaffected by reset
Read:
Write:
Reset:00000000
Read:
Write:
Reset:00000000
Read:
Write:
Reset:00000000
Read:
Write:
Reset:00000000
Read:
Write:
PTA7PTA6PTA5PTA4PTA3PTA2PTA1PTA0
PTB7PTB6PTB5PTB4PTB3PTB2PTB1PTB0
PTC7PTC6PTC5PTC4PTC3PTC2PTC1PTC0
PTD7PTD6PTD5PTD4PTD3PTD2PTD1PTD0
DDRA7DDRA6DDRA5DDRA4DDRA3DDRA2DDRA1DDRA0
DDRB7DDRB6DDRB5DDRB4DDRB3DDRB2DDRB1DDRB0
DDRC7DDRC6DDRC5DDRC4DDRC3DDRC2DDRC1DDRC0
DDRD7DDRD6DDRD5DDRD4DDRD3DDRD2DDRD1DDRD0
Reset:
Read:
$0009 Unimplemented
U = UnaffectedX = Indeterminate
Write:
Reset:
= UnimplementedR= Reserved
Figure 2-2. Control, Status, and Data Registers (Sheet 1 of 12)
Data SheetMC68HC908AP Family — Rev. 2.5
38MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Addr.Register NameBit 7654321Bit 0
Read:
Memory Map
Input/Output (I/O) Section
nc...
I
cale Semiconductor,
Frees
$000AUnimplemented
$000BUnimplemented
Port-A LED Control
$000C
$000DUnimplemented
$000EUnimplemented
$000FUnimplemented
$0010
$0011
$0012
SPI Control Register
SPI Status and Control
SPI Data Register
Register
(LEDA)
(SPCR)
Register
(SPSCR)
(SPDR)
Write:
Reset:
Read:
Write:
Reset:
Read:
Write:
Reset:00000000
Read:
Write:
Reset:
Read:
Write:
Reset:
Read:
Write:
Reset:
Read:
Write:
Reset:00101000
Read:SPRF
Write:
Reset:00001000
Read:R7R6R5R4R3R2R1R0
Write:T7T6T5T4T3T2T1T0
Reset:Unaffected by reset
LEDA7 LEDA6 LEDA5 LEDA4 LEDA3 LEDA2 LEDA1 LEDA0
SPRIERSPMSTRCPOLCPHASPWOMSPESPTIE
ERRIE
OVRFMODFSPTE
MODFENSPR1SPR0
$0013
Read:
SCI Control Register 1
(SCC1)
U = UnaffectedX = Indeterminate
Write:
Reset:00000000
LOOPSENSCITXINVMWAKEILTYPENPTY
= UnimplementedR= Reserved
Figure 2-2. Control, Status, and Data Registers (Sheet 2 of 12)
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA39
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Memory Map
Addr.Register NameBit 7654321Bit 0
nc...
I
cale Semiconductor,
Frees
Read:
$0014
$0015
$0016
$0017
$0018
$0019
$001A
$001B
$001C
SCI Control Register 2
(SCC2)
SCI Control Register 3
(SCC3)
SCI Status Register 1
(SCS1)
SCI Status Register 2
(SCS2)
SCI Data Register
(SCDR)
SCI Baud Rate Register
(SCBR)
Keyboard Status and
Control Register
(KBSCR)
Keyboard Interrupt
Enable Register
(KBIER)
IRQ2 Status and Control
Register
(INTSCR2)
Write:
Reset:00000000
Read:R8
Write:
Reset:UU000000
Read:SCTETCSCRFIDLEORNFFEPE
Write:
Reset:11000000
Read:000000BKFRPF
Write:
Reset:00000000
Read:R7R6R5R4R3R2R1R0
Write:T7T6T5T4T3T2T1T0
Reset:Unaffected by reset
Read:00
Write:
Reset:00000000
Read:0000KEYF0
Write:
Reset:00000000
Read:
Write:
Reset:00000000
Read:0
Write:
Reset:00000000
SCTIETCIESCRIEILIETERERWUSBK
T8DMAREDMATEORIENEIEFEIEPEIE
SCP1SCP0RSCR2SCR1SCR0
ACK
KBIE7KBIE6KBIE5KBIE4KBIE3KBIE2KBIE1KBIE0
00IRQ2F0
PUC0ENB
ACK2
IMASKMODE
IMASK2MODE2
Read:
$001D
† One-time writable register after each reset.
Configuration Register 2
(CONFIG2)
U = UnaffectedX = Indeterminate
Write:
†
Reset:00000000
STOP_
ICLKDIS
STOP_
RCLKEN
STOP_
XCLKEN
OSCCLK1 OSCCLK0
= UnimplementedR= Reserved
00
SCIBD-
SRC
Figure 2-2. Control, Status, and Data Registers (Sheet 3 of 12)
Data SheetMC68HC908AP Family — Rev. 2.5
40MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Addr.Register NameBit 7654321Bit 0
Memory Map
Input/Output (I/O) Section
IRQ1 Status and Control
$001E
(INTSCR1)
$001F
† One-time writable register after each reset.
$0020
nc...
I
$0021
$0022
$0023
$0024
Configuration Register 1
(CONFIG1)
Timer 1 Status and
Control Register
Timer 1 Counter
Register High
(T1CNTH)
Timer 1 Counter
Register Low
(T1CNTL)
Timer 1 Counter Modulo
Register High
(T1MODH)
Timer 1 Counter Modulo
Register Low
(T1MODL)
cale Semiconductor,
Timer 1 Channel 0 Status
$0025
Frees
$0026
and Control Register
Timer 1 Channel 0
Register High
(T1CH0H)
Register
(T1SC)
(T1SC0)
Read:0000IRQ1F0
Write:
Reset:00000000
Read:
Write:
†
Reset:00000000
Read:TOF
Write:0TRST
Reset:00100000
Read:Bit 1514131211109Bit 8
Write:
Reset:00000000
Read:Bit 7654321Bit 0
Write:
Reset:00000000
Read:
Write:
Reset:11111111
Read:
Write:
Reset:11111111
Read:CH0F
Write:0
Reset:00000000
Read:
Write:
Reset:Indeterminate after reset
COPRSLVISTOP LVIRSTD LVIPWRD LVIREGDSSRECSTOPCOPD
00
TOIETSTOP
Bit 1514131211109Bit 8
Bit 7654321Bit 0
CH0IEMS0BMS0AELS0BELS0ATOV0CH0MAX
Bit 1514131211109Bit 8
ACK1
PS2PS1PS0
IMASK1MODE1
Read:
Bit 7654321Bit 0
Write:
Reset:Indeterminate after reset
= UnimplementedR= Reserved
$0027
Timer 1 Channel 0
Register Low
(T1CH0L)
U = UnaffectedX = Indeterminate
Figure 2-2. Control, Status, and Data Registers (Sheet 4 of 12)
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA41
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Memory Map
Addr.Register NameBit 7654321Bit 0
nc...
I
cale Semiconductor,
Frees
Timer 1 Channel 1 Status
$0028
$0029
$002A
$002B
$002C
$002D
$002E
$002F
$0030
and Control Register
(T1SC1)
Timer 1 Channel 1
Register High
(T1CH1H)
Timer 1 Channel 1
Register Low
(T1CH1L)
Timer 2 Status and
Control Register
(T2SC)
Timer 2 Counter
Register High
(T2CNTH)
Timer 2 Counter
Register Low
(T2CNTL)
Timer 2 Counter Modulo
Register High
(T2MODH)
Timer 2 Counter Modulo
Register Low
(T2MODL)
Timer 2 Channel 0 Status
and Control Register
(T2SC0)
Read:CH1F
CH1IE
Write:0
Reset:00000000
Read:
Bit 1514131211109Bit 8
Write:
Reset:Indeterminate after reset
Read:
Bit 7654321Bit 0
Write:
Reset:Indeterminate after reset
Read:TOF
TOIETSTOP
Write:0TRST
Reset:00100000
Read:Bit 1514131211109Bit 8
Write:
Reset:00000000
Read:Bit 7654321Bit 0
Write:
Reset:00000000
Read:
Bit 1514131211109Bit 8
Write:
Reset:11111111
Read:
Bit 7654321Bit 0
Write:
Reset:11111111
Read:CH0F
CH0IEMS0BMS0AELS0BELS0ATOV0CH0MAX
Write:0
Reset:00000000
0
MS1AELS1BELS1ATOV1CH1MAX
00
PS2PS1PS0
Read:
Bit 1514131211109Bit 8
Write:
Reset:Indeterminate after reset
= UnimplementedR= Reserved
$0031
Timer 2 Channel 0
Register High
(T2CH0H)
U = UnaffectedX = Indeterminate
Figure 2-2. Control, Status, and Data Registers (Sheet 5 of 12)
Data SheetMC68HC908AP Family — Rev. 2.5
42MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Addr.Register NameBit 7654321Bit 0
Memory Map
Input/Output (I/O) Section
nc...
I
cale Semiconductor,
Frees
$0032
$0033
$0034
$0035
$0036
$0037
$0038
$0039
$003A
Timer 2 Channel 0
Register Low
(T2CH0L)
Timer 2 Channel 1 Status
and Control Register
(T2SC1)
Timer 2 Channel 1
Register High
(T2CH1H)
Timer 2 Channel 1
Register Low
(T2CH1L)
PLL Control Register
(PCTL)
PLL Bandwidth Control
Register
(PBWC)
PLL Multiplier Select
Register High
(PMSH)
PLL Multiplier Select
Register Low
(PMSL)
PLL VCO Range Select
Register
(PMRS)
Read:
Write:
Reset:Indeterminate after reset
Read:CH1F
Write:0
Reset:00000000
Read:
Write:
Reset:Indeterminate after reset
Read:
Write:
Reset:Indeterminate after reset
Read:
Write:
Reset:00100000
Read:
Write:
Reset:00000000
Read:0000
Write:
Reset:00000000
Read:
Write:
Reset:01000000
Read:
Write:
Reset:01000000
Bit 7654321Bit 0
CH1IE
Bit 1514131211109Bit 8
Bit 7654321Bit 0
PLLF
PLLIE
LOCK
AUTO
MUL7MUL6MUL5MUL4MUL3MUL2MUL1MUL0
VRS7VRS6VRS5VRS4VRS3VRS2VRS1VRS0
0
PLLONBCSPRE1PRE0VPR1VPR0
ACQ
MS1AELS1BELS1ATOV1CH1MAX
0000
R
MUL11MUL10MUL9MUL8
Read:0000
RDS3RDS2RDS1RDS0
Write:
Reset:00000001
= UnimplementedR= Reserved
$003B
PLL Reference Divider
Select Register
(PMDS)
U = UnaffectedX = Indeterminate
Figure 2-2. Control, Status, and Data Registers (Sheet 6 of 12)
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA43
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Memory Map
Addr.Register NameBit 7654321Bit 0
Read:
nc...
I
cale Semiconductor,
Frees
$003CUnimplemented
$003DUnimplemented
$003EUnimplemented
$003FUnimplemented
$0040
$0041
$0042
$0043
$0044
IRSCI Control Register 1
IRSCI Control Register 2
IRSCI Control Register 3
IRSCI Status Register 1
IRSCI Status Register 2
(IRSCC1)
(IRSCC2)
(IRSCC3)
(IRSCS1)
(IRSCS2)
Write:
Reset:
Read:
Write:
Reset:
Read:
Write:
Reset:
Read:
Write:
Reset:
Read:
LOOPSENSCI
Write:
Reset:00000000
Read:
SCTIETCIESCRIEILIETERERWUSBK
Write:
Reset:00000000
Read:R8
T8DMAREDMATEORIENEIEFEIEPEIE
Write:
Reset:UU000000
Read:SCTETCSCRFIDLEORNFFEPE
Write:
Reset:11000000
Read:
Write:
Reset:00000000
0
MWAKEILTYPENPTY
BKFRPF
Read:R7R6R5R4R3R2R1R0
$0045
IRSCI Data Register
(IRSCDR)
U = UnaffectedX = Indeterminate
Write:T7T6T5T4T3T2T1T0
Reset:Unaffected by reset
= UnimplementedR= Reserved
Figure 2-2. Control, Status, and Data Registers (Sheet 7 of 12)
Figure 2-2. Control, Status, and Data Registers (Sheet 8 of 12)
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA45
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Memory Map
Addr.Register NameBit 7654321Bit 0
nc...
I
cale Semiconductor,
Frees
$0050Reserved
Timebase Control
$0051
$0052Unimplemented
$0053Unimplemented
$0054Unimplemented
$0055Unimplemented
$0056Unimplemented
ADC Status and Control
$0057
ADC Clock Control
$0058
Register
(TBCR)
Register
(ADSCR)
Register
(ADICLK)
Read:
Write:
Reset:
Read:TBIF
Write:
Reset:00000000
Read:
Write:
Reset:
Read:
Write:
Reset:
Read:
Write:
Reset:
Read:
Write:
Reset:
Read:
Write:
Reset:
Read:COCO
Write:
Reset:00011111
Read:
Write:
Reset:00000000
RRRRRRRR
TBR2TBR1TBR0
AIENADCOADCH4ADCH3ADCH2ADCH1ADCH0
ADIV2ADIV1ADIV0ADICLKMODE1MODE0
0
TBIETBONR
TACK
0 0
R
Read:ADxADxADxADxADxADxADxADx
$0059
ADC Data Register High 0
(ADRH0)
U = UnaffectedX = Indeterminate
Write:RRRRRRRR
Reset:00000000
= UnimplementedR= Reserved
Figure 2-2. Control, Status, and Data Registers (Sheet 9 of 12)
Data SheetMC68HC908AP Family — Rev. 2.5
46MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Addr.Register NameBit 7654321Bit 0
Memory Map
Input/Output (I/O) Section
$005A
$005B
$005C ADC Data Register Low 2
nc...
I
cale Semiconductor,
$005D
$005E
$005FUnimplemented
$FE00
Note: Writing a logic 0 clears SBSW.
$FE01
ADC Data Register Low 0
ADC Data Register Low 1
ADC Data Register Low 3
ADC Auto-scan Control
SIM Break Status Register
SIM Reset Status Register
Frees
(ADRL0)
(ADRL1)
(ADRL2)
(ADRL3)
Register
(ADASCR)
(SBSR)
(SRSR)
Read:ADxADxADxADxADxADxADxADx
Write:RRRRRRRR
Reset:00000000
Read:AD9AD8AD7AD6AD5AD4AD3AD2
Write:RRRRRRRR
Reset:00000000
Read:AD9AD8AD7AD6AD5AD4AD3AD2
Write:RRRRRRRR
Reset:00000000
Read:AD9AD8AD7AD6AD5AD4AD3AD2
Write:RRRRRRRR
Reset:00000000
Read:
Write:
Reset:00000000
Read:
Write:
Reset:
Read:
RRRRRR
Write:Note
Reset:0
Read:PORPINCOPILOPILADMODRSTLVI0
Write:
Reset:10000000
AUTO1AUTO0ASCAN
SBSW
R
$FE02Reserved
U = UnaffectedX = Indeterminate
Read:
Write:
Reset:
RRRRRRRR
= UnimplementedR= Reserved
Figure 2-2. Control, Status, and Data Registers (Sheet 10 of 12)
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA47
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Memory Map
Addr.Register NameBit 7654321Bit 0
nc...
I
cale Semiconductor,
Frees
SIM Break Flag Control
$FE03
$FE04
$FE05
$FE06
$FE07Reserved
$FE08
$FE09
$FE0AReserved
$FE0BReserved
Interrupt Status Register 1
Interrupt Status Register 2
Interrupt Status Register 3
FLASH Control Register
FLASH Block Protect
Register
(SBFCR)
(INT1)
(INT2)
(INT3)
(FLCR)
Register
(FLBPR)
Read:
BCFERRRRRRR
Write:
Reset:0
Read:IF6IF5IF4IF3IF2IF100
Write:RRRRRRRR
Reset:00000000
Read:IF14IF13IF12IF11IF10IF9IF8IF7
Write:RRRRRRRR
Reset:00000000
Read:0IF21IF20IF19IF18IF17IF16IF15
Write:RRRRRRRR
Reset:00000000
Read:
RRRRRRRR
Write:
Reset:
Read:0000
HVENMASSERASEPGM
Write:
Reset:00000000
Read:
BPR7BPR6BPR5BPR4BPR3BPR2BPR1BPR0
Write:
Reset:00000000
Read:
RRRRRRRR
Write:
Reset:
Read:
RRRRRRRR
Write:
Reset:
Read:
Bit 1514131211109Bit 8
Write:
Reset:00000000
= UnimplementedR= Reserved
$FE0C
Break Address
Register High
(BRKH)
U = UnaffectedX = Indeterminate
Figure 2-2. Control, Status, and Data Registers (Sheet 11 of 12)
Data SheetMC68HC908AP Family — Rev. 2.5
48MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Addr.Register NameBit 7654321Bit 0
Memory Map
Input/Output (I/O) Section
Break Address
$FE0D
Break Status and Control
$FE0E
$FE0F
nc...
I
$FFCF
$FFFF
#
MOR is a non-volatile FLASH register; write by programming.
Mask Option Register
COP Control Register
Register Low
(BRKL)
Register
(BRKSCR)
LVI Status Register
(LVISR)
(MOR)
(COPCTL)
U = UnaffectedX = Indeterminate
Figure 2-2. Control, Status, and Data Registers (Sheet 12 of 12)
cale Semiconductor,
Read:
Write:
Reset:00000000
Reset:
Read:
Write:00000000
Reset:LVIOUT 0000000
Read:
Write:00000000
Read:
Write:
#
Erased:
Reset:UUUUUUUU
Read:Low byte of reset vector
Write:Writing clears COP counter (any value)
Reset:Unaffected by reset
Bit 7654321Bit 0
000000
BRKEBRKA
OSCSEL1OSCSEL0RRRRRR
11111111
= UnimplementedR= Reserved
Frees
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA49
For More Information On This Product,
Go to: www.freescale.com
Memory Map
Freescale Semiconductor, Inc.
Table 2-1. Vector Addresses
PriorityINT FlagAddressVector
nc...
I
cale Semiconductor,
Frees
Lowest
—
IF21
IF20
IF19
IF18
IF17
IF16
IF15
IF14
IF13
IF12
$FFD0Reserved
$FFD1Reserved
$FFD2TBM Vector (High)
$FFD3TBM Vector (Low)
$FFD4SCI2 (IRSCI) Transmit Vector (High)
$FFD5SCI2 (IRSCI) Transmit Vector (Low)
$FFD6SCI2 (IRSCI) Receive Vector (High)
$FFD7SCI2 (IRSCI) Receive Vector (Low)
$FFD8SCI2 (IRSCI) Error Vector (High)
$FFD9SCI2 (IRSCI) Error Vector (Low)
$FFDASPI Transmit Vector (High)
$FFDBSPI Transmit Vector (Low)
$FFDCSPI Receive Vector (High)
$FFDDSPI Receive Vector (Low)
$FFDEADC Conversion Complete Vector (High)
$FFDFADC Conversion Complete Vector (Low)
$FFE0Keyboard Vector (High)
$FFE1Keyboard Vector (Low)
$FFE2SCI Transmit Vector (High)
$FFE3SCI Transmit Vector (Low)
$FFE4SCI Receive Vector (High)
$FFE5SCI Receive Vector (Low)
$FFE6SCI Error Vector (High)
IF11
IF10
IF9
Data SheetMC68HC908AP Family — Rev. 2.5
50MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
$FFE7SCI Error Vector (Low)
$FFE8MMIIC Interrupt Vector (High)
$FFE9MMIIC Interrupt Vector (Low)
$FFEATIM2 Overflow Vector (High)
$FFEBTIM2 Overflow Vector (Low)
Freescale Semiconductor, Inc.
Input/Output (I/O) Section
Table 2-1. Vector Addresses (Continued)
PriorityINT FlagAddressVector
$FFECTIM2 Channel 1 Vector (High)
IF8
$FFEDTIM2 Channel 1 Vector (Low)
$FFEETIM2 Channel 0 Vector (High)
IF7
$FFEFTIM2 Channel 0 Vector (Low)
Memory Map
IF6
IF5
nc...
I
IF4
IF3
IF2
IF1
—
cale Semiconductor,
—
Highest$FFFFReset Vector (Low)
$FFF0TIM1 Overflow Vector (High)
$FFF1TIM1 Overflow Vector (Low)
$FFF2TIM1 Channel 1 Vector (High)
$FFF3TIM1 Channel 1 Vector (Low)
$FFF4TIM1 Channel 0 Vector (High)
$FFF5TIM1 Channel 0 Vector (Low)
$FFF6PLL Vector (High)
$FFF7PLL Vector (Low)
$FFF8IRQ2
$FFF9IRQ2
$FFFAIRQ1
$FFFBIRQ1
$FFFCSWI Vector (High)
$FFFDSWI Vector (Low)
$FFFEReset Vector (High)
Vector (High)
Vector (Low)
Vector (High)
Vector (Low)
Frees
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA51
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Memory Map
nc...
I
cale Semiconductor,
Frees
Data SheetMC68HC908AP Family — Rev. 2.5
52MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Data Sheet – MC68HC908AP Family
Section 3. Random-Access Memory (RAM)
3.1 Introduction
This section describes the 2,048 (or 1,024) bytes of RAM.
nc...
I
cale Semiconductor,
Frees
3.2 Functional Description
Addresses $0060 through $085F (or $045F) are RAM locations. The
location of the stack RAM is programmable. The 16-bit stack pointer
allows the stack to be anywhere in the 64k-byte memory space.
NOTE:For correct operation, the stack pointer must point only to RAM
locations.
Within page zero are 160 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.
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA53
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Random-Access Memory (RAM)
nc...
I
cale Semiconductor,
Frees
Data SheetMC68HC908AP Family — Rev. 2.5
54MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Data Sheet – MC68HC908AP Family
Section 4. FLASH Memory
4.1 Introduction
This section describes the operation of the embedded FLASH memory.
This memory can be read, programmed, and erased from a single
external supply. The program and erase operations are enabled through
nc...
I
the use of an internal charge pump.
cale Semiconductor,
Frees
Device
MC68HC908AP6462,368$0860—$FBFF
MC68HC908AP3232,768$0860—$885F
MC68HC908AP1616,384$0860—$485F
MC68HC908AP88,192$0860—$285F
Addr.Register NameBit 7654321Bit 0
Read:0000
$FE08
$FE09
FLASH Control Register
(FLCR)
FLASH Block Protect
Register
(FLBPR)
Write:
Reset:00000000
Read:
BPR7BPR6BPR5BPR4BPR3BPR2BPR1BPR0
Write:
Reset:00000000
= Unimplemented
FLASH Memory Size
(Bytes)
HVENMASSERASEPGM
Memory Address Range
Figure 4-1. FLASH I/O Register Summary
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA55
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
FLASH Memory
4.2 Functional Description
The FLASH memory consists of an array of 62,368 bytes for user
memory plus a block of 48 bytes for user interrupt vectors and one byte
for the mask option register. An erased bit reads as logic 1 and a programmed bit reads as a logic 0. The FLASH memory page size is
defined as 512 bytes, and is the minimum size that can be erased in a
page erase operation. Program and erase operations are facilitated
through control bits in FLASH control register (FLCR). The address
ranges for the FLASH memory are:
•$0860–$FBFF; user memory, 62,368 bytes
nc...
I
cale Semiconductor,
Frees
•$FFD0–$FFFF; user interrupt vectors, 48 bytes
•$FFCF; mask option register
Programming tools are available from Motorola. Contact your local
Motorola representative for more information.
NOTE:A security feature prevents viewing of the FLASH contents.
1
1. No security feature is absolutely secure. However, Motorola’s strategy is to make reading or
copying the FLASH difficult for unauthorized users.
Data SheetMC68HC908AP Family — Rev. 2.5
56MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
FLASH Memory
FLASH Control Register
4.3 FLASH Control Register
The FLASH control register (FLCR) controls FLASH program and erase
operation.
Address:$FE08
Bit 7654321Bit 0
Read:0000
Write:
Reset:00000000
Figure 4-2. FLASH Control Register (FLCR)
nc...
I
HVEN — High Voltage Enable Bit
HVENMASSERASEPGM
cale Semiconductor,
Frees
This read/write bit enables the charge pump to drive high voltages for
program and erase operations in the array. HVEN 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.
This read/write bit configures the memory for erase operation.
ERASE is interlocked with the PGM bit such that both bits cannot be
equal to 1 or set to 1 at the same time.
This read/write bit configures the memory for program operation.
PGM is interlocked with the ERASE bit such that both bits cannot be
equal to 1 or set to 1 at the same time.
1 = Program operation selected
0 = Program operation not selected
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA57
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
FLASH Memory
4.4 FLASH Page Erase Operation
Use the following procedure to erase a page of FLASH memory. A page
consists of 512 consecutive bytes starting from addresses $X000,
$X200, $X400, $X600, $X800, $XA00, $XC00, or $XE00. 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 location within the page address
range desired.
nc...
I
3.Wait for a time, t
(5 µs).
nvs
cale Semiconductor,
Frees
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
again.
(1 µs), the memory can be accessed in read mode
rcv
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 as shown, but other unrelated operations
may occur between the steps.
erase
nvh
(20 ms).
(5 µs).
Data SheetMC68HC908AP Family — Rev. 2.5
58MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
4.5 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.
FLASH Memory
FLASH Mass Erase Operation
3.Wait for a time, t
4.Set the HVEN bit.
5.Wait for a time t
nc...
I
6.Clear the ERASE bit.
7.Wait for a time, t
8.Clear the HVEN bit.
9.After time, t
again.
rcv
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 as shown, but other unrelated operations
may occur between the steps.
cale Semiconductor,
(5 µs).
nvs
(200 ms).
me
(100 µs).
nvh1
(1 µs), the memory can be accessed in read mode
Frees
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA59
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
FLASH Memory
4.6 FLASH Program Operation
Programming of the FLASH memory is done on a row basis. A row
consists of 64 consecutive bytes starting from addresses $XX00,
$XX40, $XX80 or $XXC0. Use the following procedure to program a row
of FLASH memory. (Figure 4-3 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
nc...
I
the row to be programmed.
3.Wait for a time, t
4.Set the HVEN bit.
nvs
(5 µs).
cale Semiconductor,
Frees
5.Wait for a time, t
6.Write data to the FLASH location to be programmed.
7.Wait for time, t
8.Repeat steps 6 and 7 until all bytes within the row are
programmed.
9.Clear the PGM bit.
10.Wait for time, t
11.Clear the HVEN bit.
12.After time, t
again.
This program sequence is repeated throughout the memory until all data
is programmed.
rcv
(10 µs).
pgs
(20 µs to 40 µs).
prog
(5 µs).
nvh
(1 µs), the memory can be accessed in read mode
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 9), must not exceed the maximum programming
time, t
prog
max.
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.
Data SheetMC68HC908AP Family — Rev. 2.5
60MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
FLASH Memory
FLASH Program Operation
nc...
I
cale Semiconductor,
Frees
1
Algorithm for programming
a row (64 bytes) of FLASH memory
2
3
4
5
6
7
NOTE:
The time between each FLASH address change (step 6 to step 6), or
the time between the last FLASH address programmed
to clearing PGM bit (step 6 to step 9)
must not exceed the maximum programming
PROG
max.
time, t
This row program algorithm assumes the row/s
to be programmed are initially erased.
Set PGM bit
Write any data to any FLASH address
within the row address range desired
Wait for a time, t
Set HVEN bit
Wait for a time, t
Write data to the FLASH address
to be programmed
Wait for a time, t
Completed
programming
this row?
nvs
pgs
prog
Y
N
9
10
11
12
Clear PGM bit
Wait for a time, t
Clear HVEN bit
Wait for a time, t
nvh
rcv
End of Programming
Figure 4-3. FLASH Programming Flowchart
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA61
For More Information On This Product,
Go to: www.freescale.com
FLASH Memory
4.7 FLASH Protection
Due to the ability of the on-board charge pump to erase and program the
FLASH memory in the target application, provision is made to protect
pages of memory from unintentional erase or program operations due to
system malfunction. This protection is done by use of a FLASH block
protect register (FLBPR). The FLBPR determines the range of the
FLASH memory which is to be protected. The range of the protected
area starts from a location defined by FLBPR and ends to the bottom of
the FLASH memory ($FFFF). When the memory is protected, the HVEN
bit cannot be set in either erase or program operations.
Freescale Semiconductor, Inc.
nc...
I
cale Semiconductor,
Frees
NOTE:The mask option register ($FFCF) and the 48 bytes of user interrupt
vectors ($FFD0–$FFFF) are always protected, regardless of the value in
the FLASH block protect register. A mass erase is required to erase
these locations.
4.7.1 FLASH Block Protect Register
The FLASH block protect register is implemented as an 8-bit I/O register.
The value in this register determines the starting address of the
protected range within the FLASH memory.
Address:$FE09
Read:
Write:
Reset:00000000
Bit 7654321Bit 0
BPR7BPR6BPR5BPR4BPR3BPR2BPR1BPR0
Figure 4-4. FLASH Block Protect Register (FLBPR)
BPR[7:0] — FLASH Block Protect Bits
BPR[7:1] represent bits [15:9] of a 16-bit memory address. Bits [8:0]
are logic 0’s.
16-bit memory address
Start address of FLASH block protect000000000
BPR[7:1]
Data SheetMC68HC908AP Family — Rev. 2.5
62MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
FLASH Memory
FLASH Protection
BPR0 is used only for BPR[7:0] = $FF, for no block protection.
The resultant 16-bit address is used for specifying the start address
of the FLASH memory for block protection. The FLASH is protected
from this start address to the end of FLASH memory, at $FFFF. With
this mechanism, the protect start address can be X000, X200, X400,
X0600, X800, XA00, XC00, or XE00 (at page boundaries — 512
bytes) within the FLASH memory.
Examples of protect start address:
Table 4-1 FLASH Block Protect Range
BPR[7:0]Protected Range
nc...
I
$00 to $09The entire FLASH memory is protected.
cale Semiconductor,
Frees
$0A or $0B
(0000 101x)
$0C or $0D
(0000 110x)
and so on...
$FA or $FB
(1111 1101x)
$FC or $FD or $FE$FFCF to $FFFF
$FFThe entire FLASH memory is NOT protected.
Notes:
1. Except for the mask option register ($FFCF) and
the 48-byte user vectors ($FFD0–$FFFF). These FLASH locations are always protected.
$0A00 to $FFFF
$0C00 to $FFFF
$FA00 to $FFFF
(1)
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA63
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
FLASH Memory
nc...
I
cale Semiconductor,
Frees
Data SheetMC68HC908AP Family — Rev. 2.5
64MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Data Sheet – MC68HC908AP Family
Section 5. Configuration & Mask Option Registers
5.1 Introduction
This section describes the configuration registers, CONFIG1 and
CONFIG2; and the mask option register, MOR.
(CONFIG & MOR)
nc...
I
cale Semiconductor,
Frees
The configuration registers enable or disable these options:
•Computer operating properly module (COP)
•COP timeout period (218 – 24 or 213 – 24 ICLK cycles)
•Low-voltage inhibit (LVI) on V
•LVI on V
•LVI module reset
•LVI module in stop mode
•STOP instruction
•Stop mode recovery time (32 ICLK or 4096 ICLK cycles)
•Oscillator (internal, RC, and crystal) during stop mode
•Serial communications interface clock source (CGMXCLK or f
The mask option register selects one of the following oscillator options:
REG
DD
BUS
)
•Internal oscillator
•RC oscillator
•Crystal oscillator
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA65
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Configuration & Mask Option Registers
Addr.Register NameBit 7654321Bit 0
nc...
I
cale Semiconductor,
Frees
Configuration Register 2
$001D
$001F
$FFCF
† One-time writable register after each reset.
#
MOR is a non-volatile FLASH register; write by programming.
Configuration Register 1
Mask-Option-Register
(CONFIG2)
(CONFIG1)
(MOR)
Read:
†
Write:
Reset:00000000
Read:
Write:
†
Reset:00000000
Read:
#
Write:
Erased:
STOP_
ICLKDIS
COPRSLVISTOP LVIRSTD LVIPWRD
OSCSEL1OSCSEL0RRRRRR
Figure 5-1. CONFIG and MOR Registers Summary
5.2 Functional Description
The configuration registers and the mask option register are used in the
initialization of various options. These two types of registers are
configured differently:
•Configuration registers — Write-once registers after reset
•Mask option register — FLASH register (write by programming)
The configuration registers can be written once after each reset. All of
the configuration register bits are cleared during reset. Since the various
options affect the operation of the MCU, it is recommended that these
registers be written immediately after reset. The configuration registers
are located at $001D and $001F. The configuration registers may be
read at anytime.
STOP_
RCLKEN
11111111
= UnimplementedR= Reserved
STOP_
XCLKEN
OSCCLK1 OSCCLK0
LVIREGDSSRECSTOPCOPD
00
SCIBD-
SRC
NOTE:The CONFIG registers are not in the FLASH memory but are special
registers containing one-time writable latches after each reset. Upon a
reset, the CONFIG registers default to predetermined settings as shown
in Figure 5-2 and Figure 5-3.
Data SheetMC68HC908AP Family — Rev. 2.5
66MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
The mask option register (MOR) is used for selecting one of the three
clock options for the MCU. The MOR is a byte located in FLASH
memory, and is written to by a FLASH programming routine.
NOTE:If LVISTOP=0, set LVIRSTD= 1 before entering stop mode.
COPRSLVISTOP LVIRSTD LVIPWRD LVIREGDSSRECSTOPCOPD
Figure 5-2. Configuration Register 1 (CONFIG1)
COPRS selects the COP time out period. Reset clears COPRS. (See
Section 21. Computer Operating Properly (COP).)
13
1 = COP time out period = 2
0 = COP time out period = 2
When the LVIPWRD or LVIREGD bit is clear, setting the LVISTOP bit
enables the LVI to operate during stop mode. Reset clears LVISTOP.
(See Section 22. Low-Voltage Inhibit (LVI).)
1 = LVI enabled during stop mode
0 = LVI disabled during stop mode
– 24 ICLK cycles
18
– 24 ICLK cycles
Frees
LVIRSTD — LVI Reset Disable Bit
LVIRSTD disables the reset signal from the LVI module. (See
NOTE:If LVIPWRD=1 and LVIREGD= 1, set LVIRSTD=1 before entering stop
mode.
SSREC — Short Stop Recovery Bit
SSREC enables the CPU to exit stop mode with a delay of 32 ICLK
cycles instead of a 4096 ICLK cycle delay.
1 = Stop mode recovery after 32 ICLK cycles
0 = Stop mode recovery after 4096 ICLK cycles
NOTE:Exiting stop mode by pulling reset will result in the long stop recovery.
If using an external crystal oscillator, do not set the SSREC bit.
When the LVI is disabled in stop mode (LVISTOP=0), the system
stabilization time for long stop recovery (4096 ICLK cycles) gives a delay
longer than the LVI’s turn-on time. There is no period where the MCU is
not protected from a low power condition. However, when using the
short stop recovery configuration option, the 32 ICLK delay is less than
the LVI’s turn-on time and there exists a period in start-up where the LVI
is not protecting the MCU.
STOP_ICLKDIS disables the internal oscillator during stop mode.
Setting the STOP_ICLKDIS bit disables the oscillator during stop
mode. (See Section 7. Oscillator (OSC).)
Reset clears this bit.
1 = Internal oscillator disabled during stop mode
0 = Internal oscillator enabled to operate during stop mode
STOP_RCLKEN — RC Oscillator Stop Mode Enable Bit
STOP_RCLKEN enables the RC oscillator to continue operating
during stop mode. Setting the STOP_RCLKEN bit allows the
oscillator to operate continuously even during stop mode. This is
useful for driving the timebase module to allow it to generate periodic
wake up while in stop mode. (See Section 7. Oscillator (OSC).)
Reset clears this bit.
1 = RC oscillator enabled to operate during stop mode
0 = RC oscillator disabled during stop mode
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA69
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Configuration & Mask Option Registers
STOP_XCLKEN — X-tal Oscillator Stop Mode Enable Bit
STOP_XCLKEN enables the crystal (x-tal) oscillator to continue
operating during stop mode. Setting the STOP_XCLKEN bit allows
the x-tal oscillator to operate continuously even during stop mode.
This is useful for driving the timebase module to allow it to generate
periodic wake up while in stop mode. (See Section 7. Oscillator
(OSC).) Reset clears this bit.
1 = X-tal oscillator enabled to operate during stop mode
0 = X-tal oscillator disabled during stop mode
OSCCLK1, OSCCLK0 — Oscillator Output Control Bits
nc...
I
cale Semiconductor,
Frees
OSCCLK1 and OSCCLK0 select which oscillator output to be driven
out as OSCCLK to the timebase module (TBM). Reset clears these
two bits.
OSCCLK1OSCCLK0Timebase Clock Source
00Internal oscillator (ICLK)
SCIBDSRC — SCI Baud Rate Clock Source
SCIBDSRC selects the clock source used for the standard SCI
module (non-infrared SCI). The setting of this bit affects the frequency
at which the SCI operates.
01RC oscillator (RCCLK)
10X-tal oscillator (XTAL)
11Not used
1 = Internal data bus clock, f
0 = Oscillator clock, CGMXCLK, is used as clock source for SCI
, is used as clock source for SCI
BUS
Data SheetMC68HC908AP Family — Rev. 2.5
70MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
5.5 Mask Option Register (MOR)
The mask option register (MOR) is used for selecting one of the three
clock options for the MCU. The MOR is a byte located in FLASH
memory, and is written to by a FLASH programming routine.
OSCSEL1 and OSCSEL0 select which oscillator is used for the MCU
CGMXCLK clock. The erase state of these two bits is logic 1. These
bits are unaffected by reset. (See Table 5-1).
Bits 5–0 — Should be left as 1’s.
Table 5-1. CGMXCLK Clock Selection
OSCSEL1OSCSEL0CGMXCLKOSC2 pinComments
00——Not used
01ICLKf
10RCCLKf
BUS
BUS
Internal oscillator generates the CGMXCLK.
RC oscillator generates the CGMXCLK.
Internal oscillator is available after each POR
or reset.
Inverting
11X-TAL
output of
XTAL
X-tal oscillator generates the CGMXCLK.
Internal oscillator is available after each POR
or reset.
NOTE:The internal oscillator is a free running oscillator and is available after
each POR or reset. It is turned-off in stop mode by setting the
STOP_ICLKDIS bit in CONFIG2.
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA71
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Configuration & Mask Option Registers
nc...
I
cale Semiconductor,
Frees
Data SheetMC68HC908AP Family — Rev. 2.5
72MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Data Sheet – MC68HC908AP Family
Section 6. Central Processor Unit (CPU)
6.1 Introduction
The M68HC08 CPU (central processor unit) is an enhanced and fully
object-code-compatible version of the M68HC05 CPU. The CPU08 Reference Manual (Motorola document order number CPU08RM/AD)
nc...
I
contains a description of the CPU instruction set, addressing modes,
and architecture.
cale Semiconductor,
Frees
6.2 Features
Feature of the CPU include:
•Object code fully upward-compatible with M68HC05 Family
•16-bit stack pointer with stack manipulation instructions
•16-Bit index register with X-register manipulation instructions
•8-MHz CPU internal bus frequency
•64-Kbyte program/data memory space
•16 addressing modes
•Memory-to-memory data moves without using accumulator
•Fast 8-bit by 8-bit multiply and 16-bit by 8-bit divide instructions
•Enhanced binary-coded decimal (BCD) data handling
•Modular architecture with expandable internal bus definition for
extension of addressing range beyond 64-Kbytes
•Low-power stop and wait modes
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA73
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Central Processor Unit (CPU)
6.3 CPU Registers
Figure 6-1 shows the five CPU registers. CPU registers are not part of
the memory map.
nc...
I
cale Semiconductor,
Frees
6.3.1 Accumulator
7
15
HX
15
15
70
V11H I NZC
0
ACCUMULATOR (A)
0
INDEX REGISTER (H:X)
0
STACK POINTER (SP)
0
PROGRAM COUNTER (PC)
CONDITION CODE REGISTER (CCR)
CARRY/BORROW FLAG
ZERO FLAG
NEGATIVE FLAG
INTERRUPT MASK
HALF-CARRY FLAG
TWO’S COMPLEMENT OVERFLOW FLAG
Figure 6-1. CPU Registers
The accumulator is a general-purpose 8-bit register. The CPU uses the
accumulator to hold operands and the results of arithmetic/logic
operations.
Bit 7654321Bit 0
Read:
Write:
Reset:Unaffected by reset
Figure 6-2. Accumulator (A)
Data SheetMC68HC908AP Family — Rev. 2.5
74MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
6.3.2 Index Register
Freescale Semiconductor, Inc.
Central Processor Unit (CPU)
CPU Registers
The 16-bit index register allows indexed addressing of a 64K-byte
memory space. H is the upper byte of the index register, and X is the
lower byte. H:X is the concatenated 16-bit index register.
In the indexed addressing modes, the CPU uses the contents of the
index register to determine the conditional address of the operand.
The index register can serve also as a temporary data storage location.
nc...
I
cale Semiconductor,
Frees
6.3.3 Stack Pointer
Bit
1413121110987654321
15
Read:
Write:
Reset:00000000XXXXXXXX
X = Indeterminate
Bit
0
Figure 6-3. Index Register (H:X)
The stack pointer is a 16-bit register that contains the address of the next
location on the stack. During a reset, the stack pointer is preset to
$00FF. The reset stack pointer (RSP) instruction sets the least
significant byte to $FF and does not affect the most significant byte. The
stack pointer decrements as data is pushed onto the stack and
increments as data is pulled from the stack.
In the stack pointer 8-bit offset and 16-bit offset addressing modes, the
stack pointer can function as an index register to access data on the
stack. The CPU uses the contents of the stack pointer to determine the
conditional address of the operand.
Bit
1413121110987654321
15
Read:
Write:
Reset:0000000011111111
Bit
0
Figure 6-4. Stack Pointer (SP)
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA75
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Central Processor Unit (CPU)
NOTE:The location of the stack is arbitrary and may be relocated anywhere in
RAM. Moving the SP out of page 0 ($0000 to $00FF) frees direct
address (page 0) space. For correct operation, the stack pointer must
point only to RAM locations.
6.3.4 Program Counter
The program counter is a 16-bit register that contains the address of the
next instruction or operand to be fetched.
Normally, the program counter automatically increments to the next
nc...
I
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.
cale Semiconductor,
Frees
During reset, the program counter is loaded with the reset vector
address located at $FFFE and $FFFF. The vector address is the
address of the first instruction to be executed after exiting the reset state.
Bit
1413121110987654321
15
Read:
Write:
Reset:Loaded with Vector from $FFFE and $FFFF
Figure 6-5. Program Counter (PC)
Bit
0
Data SheetMC68HC908AP Family — Rev. 2.5
76MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
6.3.5 Condition Code Register
The 8-bit condition code register contains the interrupt mask and five
flags that indicate the results of the instruction just executed. Bits 6 and
5 are set permanently to logic 1. The following paragraphs describe the
functions of the condition code register.
Central Processor Unit (CPU)
CPU Registers
Bit 7654321Bit 0
nc...
I
cale Semiconductor,
Frees
Read:
Write:
Reset:
V11H I NZC
X1 1 X1XXX
X = Indeterminate
Figure 6-6. Condition Code Register (CCR)
V — Overflow Flag
The CPU sets the overflow flag when a two's complement overflow
occurs. The signed branch instructions BGT, BGE, BLE, and BLT use
the overflow flag.
1 = Overflow
0 = No overflow
H — Half-Carry Flag
The CPU sets the half-carry flag when a carry occurs between
accumulator bits 3 and 4 during an add-without-carry (ADD) or addwith-carry (ADC) operation. The half-carry flag is required for binarycoded decimal (BCD) arithmetic operations. The DAA instruction
uses the states of the H and C flags to determine the appropriate
correction factor.
1 = Carry between bits 3 and 4
0 = No carry between bits 3 and 4
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA77
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Central Processor Unit (CPU)
I — Interrupt Mask
When the interrupt mask is set, all maskable CPU interrupts are
disabled. CPU interrupts are enabled when the interrupt mask is
cleared. When a CPU interrupt occurs, the interrupt mask is set
automatically after the CPU registers are saved on the stack, but
before the interrupt vector is fetched.
1 = Interrupts disabled
0 = Interrupts enabled
NOTE:To maintain M6805 Family compatibility, the upper byte of the index
register (H) is not stacked automatically. If the interrupt service routine
modifies H, then the user must stack and unstack H using the PSHH and
nc...
I
PULH instructions.
cale Semiconductor,
Frees
After the I bit is cleared, the highest-priority interrupt request is
serviced first.
A return-from-interrupt (RTI) instruction pulls the CPU registers from
the stack and restores the interrupt mask from the stack. After any
reset, the interrupt mask is set and can be cleared only by the clear
interrupt mask software instruction (CLI).
N — Negative Flag
The CPU sets the negative flag when an arithmetic operation, logic
operation, or data manipulation produces a negative result, setting
bit 7 of the result.
1 = Negative result
0 = Non-negative result
Z — Zero Flag
The CPU sets the zero flag when an arithmetic operation, logic
operation, or data manipulation produces a result of $00.
1 = Zero result
0 = Non-zero result
Data SheetMC68HC908AP Family — Rev. 2.5
78MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
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 instructions — such as bit test and
branch, shift, and rotate — also clear or set the carry/borrow flag.
1 = Carry out of bit 7
0 = No carry out of bit 7
Central Processor Unit (CPU)
Arithmetic/Logic Unit (ALU)
6.4 Arithmetic/Logic Unit (ALU)
The ALU performs the arithmetic and logic operations defined by the
nc...
I
instruction set.
cale Semiconductor,
Frees
Refer to the CPU08 Reference Manual (Motorola document order
number CPU08RM/AD) for a description of the instructions and
addressing modes and more detail about the architecture of the CPU.
6.5 Low-Power Modes
The WAIT and STOP instructions put the MCU in low power-consumption
standby modes.
6.5.1 Wait Mode
The WAIT instruction:
•Clears the interrupt mask (I bit) in the condition code register,
•Disables the CPU clock.
enabling interrupts. After exit from wait mode by interrupt, the I bit
remains clear. After exit by reset, the I bit is set.
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA79
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Central Processor Unit (CPU)
6.5.2 Stop Mode
The STOP instruction:
•Clears the interrupt mask (I bit) in the condition code register,
enabling external interrupts. After exit from stop mode by external
interrupt, the I bit remains clear. After exit by reset, the I bit is set.
•Disables the CPU clock.
After exiting stop mode, the CPU clock begins running after the oscillator
stabilization delay.
nc...
I
6.6 CPU During Break Interrupts
cale Semiconductor,
Frees
If the break module is enabled, a break interrupt causes the CPU to
execute the software interrupt instruction (SWI) at the completion of the
current CPU instruction. (See Section 23. Break Module (BRK).) The
program counter vectors to $FFFC–$FFFD ($FEFC–$FEFD in monitor
mode).
A return-from-interrupt instruction (RTI) in the break routine ends the
break interrupt and returns the MCU to normal operation if the break
interrupt has been deasserted.
6.7 Instruction Set Summary
Table 6-1 provides a summary of the M68HC08 instruction set.
AAccumulatornAny bit
CCarry/borrow bitopr Operand (one or two bytes)
CCR Condition code registerPCProgram counter
ddDirect address of operandPCH Program counter high byte
dd rr Direct address of operand and relative offset of branch instructionPCL Program counter low byte
DDDirect to direct addressing modeREL Relative addressing mode
DIRDirect addressing moderelRelative program counter offset byte
DIX+ Direct to indexed with post increment addressing moderrRelative program counter offset byte
ee ffHigh and low bytes of offset in indexed, 16-bit offset addressingSP1 Stack pointer, 8-bit offset addressing mode
EXTExtended addressing modeSP2 Stack pointer 16-bit offset addressing mode
ffOffset byte in indexed, 8-bit offset addressingSPStack pointer
HHalf-carry bitUUndefined
HIndex register high byteVOverflow bit
hh llHigh and low bytes of operand address in extended addressingXIndex register low byte
IInterrupt maskZZero bit
iiImmediate operand byte&Logical AND
IMDImmediate source to direct destination addressing mode|Logical OR
IMMImmediate addressing mode
INHInherent addressing mode( )Contents of
IXIndexed, no offset addressing mode–( ) Negation (two’s complement)
IX+Indexed, no offset, post increment addressing mode#Immediate value
IX+D Indexed with post increment to direct addressing mode
IX1Indexed, 8-bit offset addressing mode←Loaded with
IX1+ Indexed, 8-bit offset, post increment addressing mode?If
IX2Indexed, 16-bit offset addressing mode:Concatenated with
MMemory locationRSet or cleared
NNegative bit—Not affected
Test for Negative or Zero(A) – $00 or (X) – $00 or (M) – $000 – – RR–
The oscillator module consist of three types of oscillator circuits:
•Internal oscillator
Section 7. Oscillator (OSC)
nc...
I
cale Semiconductor,
Frees
•RC oscillator
•32.768kHz crystal (x-tal) oscillator
The reference clock for the CGM and other MCU sub-systems is
selected by programming the mask option register located at $FFCF.
The reference clock for the timebase module (TBM) is selected by the
two bits, OSCCLK1 and OSCCLK0, in the CONFIG2 register.
The internal oscillator runs continuously after a POR or reset, and is
always available. The RC and crystal oscillator cannot run concurrently;
one is disabled while the other is selected; because the RC and x-tal
circuits share the same OSC1 pin.
NOTE:The oscillator circuits are powered by the on-chip V
therefore, the output swing on OSC1 and OSC2 is from V
Figure 7-1. shows the block diagram of the oscillator module.
regulator,
REG
SS
to V
REG
.
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA91
For More Information On This Product,
Go to: www.freescale.com
Oscillator (OSC)
Freescale Semiconductor, Inc.
nc...
I
cale Semiconductor,
Frees
7.2 Clock Selection
To CGM and others
CGMXCLKCGMRCLK
MORCONFIG2
OSCSEL1
MUX
OSCSEL0
XCLK
X-TAL OSCILLATORRC OSCILLATORINTERNAL OSCILLATOR
OSC1OSC2
To CGM PLL
RCCLK
To TBM
MUX
XRCIXRCI
BUS CLOCK
OSCCLK
ICLK
From SIM
Figure 7-1. Oscillator Module Block Diagram
Reference clocks are selectable for the following sub-systems:
OSCCLK1
OSCCLK0
To SIM
(and COP)
•CGMXCLK and CGMRCLK — Reference clock for clock
generator module (CGM) and other MCU sub-systems other than
TBM and COP. This is the main reference clock for the MCU.
•OSCCLK — Reference clock for timebase module (TBM).
Data SheetMC68HC908AP Family — Rev. 2.5
92MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
7.2.1 CGM Reference Clock Selection
The clock generator module (CGM) reference clock (CGMXCLK) is the
reference clock input to the MCU. It is selected by programming two bits
in a FLASH memory location; the mask option register (MOR), at
$FFCF. See 5.5 Mask Option Register (MOR).
Address:$FFCF
Bit 7654321Bit 0
Read:
OSCSEL1OSCSEL0RRRRRR
Write:
Oscillator (OSC)
Clock Selection
nc...
I
cale Semiconductor,
Frees
Reset:Unaffected by reset
Erased:11111111
R=Reserved
Figure 7-2. Mask Option Register (MOR)
Table 7-1. CGMXCLK Clock Selection
OSCSEL1OSCSEL0CGMXCLKOSC2 PinComments
00——Not used
01ICLKf
10RCCLKf
11XCLK
BUS
BUS
Inverting
output of
X-TAL
Internal oscillator generates the CGMXCLK.
RC oscillator generates the CGMXCLK.
Internal oscillator is available after each POR
or reset.
X-tal oscillator generates the CGMXCLK.
Internal oscillator is available after each POR
or reset.
The internal oscillator is a free running oscillator and is available after
each POR or reset. It is turned-off in stop mode by setting the
STOP_ICLKDIS bit in CONFIG2.
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA93
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Oscillator (OSC)
7.2.2 TBM Reference Clock Selection
The timebase module reference clock (OSCCLK) is selected by
configuring two bits in the CONFIG2 register, at $001D. See 5.4
Configuration Register 2 (CONFIG2).
Address:$001D
Bit 7654321Bit 0
nc...
I
cale Semiconductor,
Frees
NOTE:The RCCLK or XCLK is only available if that clock is selected as the
CGM reference clock, whereas the ICLK is always available.
The internal oscillator clock (ICLK), with a frequency of f
, is a free
ICLK
running clock that requires no external components. It can be selected
as the CGMXCLK for the CGM and MCU sub-systems; and the
OSCCLK clock for the TBM. The ICLK is also the reference clock input
to the computer operating properly (COP) module.
Due to the simplicity of the internal oscillator, it does not have the
accuracy and stability of the RC oscillator or the x-tal oscillator.
Therefore, the ICLK is not suitable where an accurate bus clock is
required and it should not be used as the CGMRCLK to the CGM PLL.
Data SheetMC68HC908AP Family — Rev. 2.5
94MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Oscillator (OSC)
RC Oscillator
The internal oscillator by default is always available and is free running
after POR or reset. It can be turned-off in stop mode by setting the
STOP_ICLKDIS bit before executing the STOP instruction.
Figure 7-4 shows the logical representation of components of the
internal oscillator circuitry.
From SIM
SIMOSCEN
nc...
I
CONFIG2
STOP_ICLKDIS
MCU
To Clock Selection MUX
and COP
ICLK
EN
INTERNAL OSCILLATOR
BUS CLOCK
Figure 7-4. Internal Oscillator
7.4 RC Oscillator
cale Semiconductor,
The RC oscillator circuit is designed for use with an external resistor and
a capacitor.
From SIM
OSC2
Frees
In its typical configuration, the RC oscillator requires two external
components, one R and one C. Component values should have a
tolerance of 1% or less, to obtain a clock source with less than 10%
tolerance. The oscillator configuration uses two components:
•C
EXT
•R
EXT
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA95
For More Information On This Product,
Go to: www.freescale.com
Oscillator (OSC)
Freescale Semiconductor, Inc.
nc...
I
cale Semiconductor,
Frees
7.5 X-tal Oscillator
From SIM
SIMOSCEN
CONFIG2
STOP_RCLKEN
MCU
See Section 24. for component value requirements.
To Clock Selection MUX
RCCLK
EN
RC OSCILLATOR
OSC1
V
REG
R
EXT
From SIM
BUS CLOCK
OSC2
C
EXT
Figure 7-5. RC Oscillator
The crystal (x-tal) oscillator circuit is designed for use with an external
32.768kHz crystal to provide an accurate clock source.
In its typical configuration, the x-tal oscillator is connected in a Pierce
oscillator configuration, as shown in Figure 7-6. This figure shows only
the logical representation of the internal components and may not
represent actual circuitry. The oscillator configuration uses five
components:
•Crystal, X
•Fixed capacitor, C
(32.768kHz)
1
1
•Tuning capacitor, C2 (can also be a fixed capacitor)
•Feedback resistor, R
B
•Series resistor, RS (optional)
Data SheetMC68HC908AP Family — Rev. 2.5
96MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Oscillator (OSC)
I/O Signals
nc...
I
cale Semiconductor,
Frees
7.6 I/O Signals
From SIM
SIMOSCEN
CONFIG2
STOP_XCLKEN
MCU
See Section 24. for component value requirements.
C
To Clock Selection MUX
R
B
X
1
32.768kHz
1
XCLK
OSC2OSC1
R
S
C
2
Figure 7-6. Crystal Oscillator
The series resistor (R
) is included in the diagram to follow strict Pierce
S
oscillator guidelines and may not be required for all ranges of operation,
especially with high frequency crystals. Refer to the crystal
manufacturer’s data for more information.
The following paragraphs describe the oscillator I/O signals.
7.6.1 Crystal Amplifier Input Pin (OSC1)
OSC1 pin is an input to the crystal oscillator amplifier or the input to the
RC oscillator circuit.
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA97
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Oscillator (OSC)
7.6.2 Crystal Amplifier Output Pin (OSC2)
When the x-tal oscillator is selected, OSC2 pin is the output of the crystal
oscillator inverting amplifier.
When the RC oscillator or internal oscillator is selected, OSC2 pin is the
output of the internal bus clock.
7.6.3 Oscillator Enable Signal (SIMOSCEN)
The SIMOSCEN signal from the system integration module (SIM)
enables/disables the x-tal oscillator, the RC-oscillator, or the internal
nc...
I
oscillator circuit.
cale Semiconductor,
Frees
7.6.4 CGM Oscillator Clock (CGMXCLK)
The CGMXCLK clock is output from the x-tal oscillator, RC oscillator or
the internal oscillator. This clock drives to CGM and other MCU sub-
7.6.5 CGM Reference Clock (CGMRCLK)
7.6.6 Oscillator Clock to Time Base Module (OSCCLK)
systems.
This is buffered signal of CGMXCLK, it is used by the CGM as the
phase-locked-loop (PLL) reference clock.
The OSCCLK is the reference clock that drives the timebase module.
See Section 12. Timebase Module (TBM).
7.7 Low Power Modes
The WAIT and STOP instructions put the MCU in low-power
consumption standby modes.
Data SheetMC68HC908AP Family — Rev. 2.5
98MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
7.7.1 Wait Mode
The WAIT instruction has no effect on the oscillator module. CGMXCLK
continues to drive to the clock generator module, and OSCCLK
continues to drive the timebase module.
7.7.2 Stop Mode
The STOP instruction disables the x-tal or the RC oscillator circuit, and
hence the CGMXCLK clock stops running. For continuous x-tal or RC
oscillator operation in stop mode, set the STOP_XCLKEN (for x-tal) or
nc...
I
STOP_RCLKEN (for RC) bit to logic 1 before entering stop mode.
The internal oscillator clock continues operation in stop mode. It can be
disabled by setting the STOP_ICLKDIS bit to logic 1 before entering stop
mode.
Oscillator (OSC)
Oscillator During Break Mode
cale Semiconductor,
Frees
7.8 Oscillator During Break Mode
The oscillator continues to drive CGMXCLK when the device enters the
break state.
MC68HC908AP Family — Rev. 2.5Data Sheet
MOTOROLA99
For More Information On This Product,
Go to: www.freescale.com
Freescale Semiconductor, Inc.
Oscillator (OSC)
nc...
I
cale Semiconductor,
Frees
Data SheetMC68HC908AP Family — Rev. 2.5
100MOTOROLA
For More Information On This Product,
Go to: www.freescale.com
Loading...
+ 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.