•Breakpoint capability to allow single breakpoint
setting during in-circuit debugging (plus two
more breakpoints in on-chip debug module)
•On-chip real-time in-circuit emulation (ICE) with
two comparators (plus one in BDM), nine
trigger modes, and on-chip bus capture buffer.
Typically shows approximately 50 instructions
before or after the trigger point.
•Support for up to 32 interrupt/reset sources
Memory Options
•Up to 60 KB of on-chip in-circuit programmable
FLASH memory with block protection and
security options
•Up to 2 KB of on-chip RAM
Clock Source Options
•Clock source options include crystal, resonator,
external clock, or internally generated clock
with precision NVM trimming
System Protection
•Optional computer operating properly (COP)
reset
•Low-voltage detection with reset or interrupt
•Illegal opcode detection with reset
•Illegal address detection with reset (some
devices don’t have illegal addresses)
Power-Saving Modes
•Wait plus two stops
•IIC — Inter-integrated circuit bus module to
operate at up to 100 kbps with maximum bus
loading; capable of higher baudrates with
reduced loading
•Timers — One 2-channel and one 6-channel
16-bit timer/pulse-width modulator (TPM)
module: Selectable input capture, output
compare, and edge-aligned PWM capability on
each channel. Each timer module may be
configured for buffered, centered PWM
(CPWM) on all channels
•KBI — 8-pin keyboard interrupt module
Input/Output
•Up to 54 general-purpose input/output (I/O)
pins
•Software selectable pullups on ports when
used as inputs
•Software selectable slew rate control on ports
when used as outputs
•Software selectable drive strength on ports
when used as outputs
•Master reset pin and power-on reset (POR)
•Internal pullup on RESET, IRQ, and BKGD/MS
pins to reduce customer system cost
Package Options:
MC9S08AW60/48/32
•64-pin quad flat package (QFP)
•64-pin low-profile quad flat package (LQFP)
•48-pin low-profile quad flat package (QFN)
•44-pin low-profile quad flat package (LQFP)
MC9S08AW16
•48-pin low-profile quad flat package (QFN)
•44-pin low-profile quad flat package (LQFP)
Peripherals
•ADC — 16-channel, 10-bit analog-to-digital
converter with automatic compare function
•SCI — Two serial communications interface
modules with optional 13-bit break
•SPI — Serial peripheral interface module
MC9S08AW60 Data Sheet, Rev.1.0
4Freescale Semiconductor
MC9S08AW60
Advance Information Data Sheet
Covers MC9S08AW60
MC9S08AW48
MC9S08AW32
MC9S08AW16
MC9S08AW60
Rev.1.0
1/2006
This document contains information on a new product. Specifications and information herein are
subject to change without notice.
Revision History
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
Number
1.01/30/2006Initial external release.
Revision
Date
Description of Changes
This product incorporates SuperFlash® technology licensed from SST.
6.3.1Port A ..............................................................................................................................80
6.3.2Port B ..............................................................................................................................80
6.3.3Port C ..............................................................................................................................81
6.3.4Port D ..............................................................................................................................81
6.3.5Port E ..............................................................................................................................82
6.3.6Port F ..............................................................................................................................83
6.3.7Port G ..............................................................................................................................83
6.4Parallel I/O Control .........................................................................................................................84
6.5Pin Control ......................................................................................................................................85
10.2 Features .........................................................................................................................................163
The MC9S08AW60, MC9S08AW48, MC9S08AW32, and MC9S08AW16 are members of the low-cost,
high-performance HCS08 Family of 8-bit microcontroller units (MCUs). All MCUs in the family use the
enhanced HCS08 core and are available with a variety of modules, memory sizes, memory types, and
package types. Refer to Table 1-1 for memory sizes and package types.
Table 1-2 summarizes the peripheral availability per package type for the devices available in the
MC9S08AW60/48/32/16 series.
Table 1-1. Devices in the MC9S08AW60/48/32/16 Series
DeviceFLASHRAMPackage
MC9S08AW6063,280
MC9S08AW4849,152
MC9S08AW3232,768
MC9S08AW1616,3841024
Table 1-2. Peripherals Available per Package Type
2048
Package Options
64 QFP
64 LQFP
48 QFN
44 LQFP
Feature64-pin48-pin44-pin
ADC16-ch8-ch8-ch
IICyesyesyes
IRQyesyesyes
KBI1876
SCI1yesyesyes
SCI2yesyesyes
SPI1yesyesyes
TPM16-ch4-ch4-ch
TPM1CLKyesnono
TPM22-ch2-ch2-ch
TPM2CLKyesnono
I/O pins543834
1.2MCU Block Diagrams
The block diagram shows the structure of the MC9S08AW60/48/32/16 MCU.
1. Port pins are software configurable with pullup device if input port.
2. Pin contains software configurable pullup/pulldown device if IRQ is enabled
(IRQPE = 1). Pulldown is enabled if rising edge detect is selected (IRQEDG = 1)
3. IRQ does not have a clamp diode to V
4. Pin contains integrated pullup device.
. IRQ should not be driven above VDD.
DD
5. Pins PTD7, PTD3, PTD2, and PTG4 contain both pullup and pulldown devices.
Pulldown enabled when KBI is enabled (KBIPEn = 1) and rising edge is selected
(KBEDGn = 1).
Table 1-3 lists the functional versions of the on-chip modules.
Table 1-3. Versions of On-Chip Modules
ModuleVersion
Analog-to-Digital Converter(ADC)1
Internal Clock Generator(ICG)4
Inter-Integrated Circuit(IIC)1
Keyboard Interrupt(KBI)1
Serial Communications Interface(SCI)2
Serial Peripheral Interface(SPI)3
Timer Pulse-Width Modulator(TPM)2
Central Processing Unit(CPU)2
Debug Module(DBG)2
1.3System Clock Distribution
Chapter 1 Introduction
ICG
ICGERCLK
FFE
SYSTEM
CONTROL
LOGIC
RTI
TPM1TPM2IIC1SCI1SCI2SPI1
÷2
FIXED FREQ CLOCK (XCLK)
ICGOUT
ICGLCLK*
* ICGLCLK is the alternate BDC clock source for the MC9S08AW60/48/32/16.
÷2
CPU
BUSCLK
BDC
Figure 1-2. System Clock Distribution Diagram
ADC1
ADC has min and max
frequency requirements.
See Chapter 14,
“Analog-to-Digital Converter
(S08ADC10V1) and
Appendix A, “Electrical
Characteristics and Timing
Specifications
RAMFLASH
FLASH has frequency
requirements for program
and erase operation.
See Appendix A, “Electrical
Characteristics and Timing
Specifications.
MC9S08AW60 Data Sheet, Rev.1.0
Freescale Semiconductor21
Chapter 1 Introduction
Some of the modules inside the MCU have clock source choices. Figure 1-2 shows a simplified clock
connection diagram. The ICG supplies the clock sources:
•ICGOUT is an output of the ICG module. It is one of the following:
— The external crystal oscillator
— An external clock source
— The output of the digitally-controlled oscillator (DCO) in the frequency-locked loop
sub-module
— Control bits inside the ICG determine which source is connected.
•FFE is a control signal generated inside the ICG. If the frequency of ICGOUT > 4 × the frequency
of ICGERCLK, this signal is a logic 1 and the fixed-frequency clock will be ICGERCLK/2.
Otherwise the fixed-frequency clock will be BUSCLK.
•ICGLCLK — Development tools can select this internal self-clocked source (~ 8 MHz) to speed
up BDC communications in systems where the bus clock is slow.
•ICGERCLK — External reference clock can be selected as the real-time interrupt clock source.
Can also be used as the ALTCLK input to the ADC module.
MC9S08AW60 Data Sheet, Rev.1.0
22Freescale Semiconductor
Chapter 2
Pins and Connections
2.1Introduction
This chapter describes signals that connect to package pins. It includes a pinout diagram, a table of signal
properties, and detailed discussion of signals.
MC9S08AW60 Data Sheet, Rev.1.0
Freescale Semiconductor23
Chapter 2 Pins and Connections
2.2Device Pin Assignment
PTC4
IRQ
RESET
PTF0/TPM1CH2
PTF1/TPM1CH3
PTF2/TPM1CH4
PTF3/TPM1CH5
PTF4/TPM2CH0
PTC6
PTF7
PTF5/TPM2CH1
PTF6
PTE0/TxD1
PTE1/RxD1
PTE2/TPM1CH0
1
PTC5/RxD2
64
2
3
4
5
6
7
8
9
10
11
12
13
14
15
PTC3/TxD2
PTC2/MCLK
636261
PTC1/SDA1
PTC0/SCL1
59
60
SS
PTG6/EXTAL
V
57
58
64-Pin QFP
64-Pin LQFP
PTG5/XTAL
BKGD/MS
56
REFL
V
REFH
V
PTD6/TPM1CLK/AD1P14
PTD7/KBI1P7/AD1P15
PTD5/AD1P13
PTD4/TPM2CLK/AD1P12
PTG4/KBI1P4
49
505152535455
47
46
45
44
43
42
41
40
39
38
37
36
35
34
PTG3/KBI1P3
48
PTD3/KBI1P6/AD1P11
PTD2/KBI1P5/AD1P10
V
SSAD
V
DDAD
PTD1/AD1P9
PTD0/AD1P8
PTB7/AD1P7
PTB6/AD1P6
PTB5/AD1P5
PTB4/AD1P4
PTB3/AD1P3
PTB2/AD1P2
PTB1/AD1P1
PTB0/AD1P0
PTE3/TPM1CH1
16
17
18
PTE4/SS1
19
202122
PTE6/MOSI1
PTE5/MISO1
PTE7/SPSCK1
23
DD
SS
V
V
PTG1/KBI1P1
PTG0/KBI1P0
27
26
PTA024PTA125PTA2
PTG2/KBI1P2
28293031
PTA4
PTA3
32
PTA5
PTA6
PTA7
33
Figure 2-1. MC9S08AW60/48/32/16 in 64-Pin QFP/LQFP Package
MC9S08AW60 Data Sheet, Rev.1.0
24Freescale Semiconductor
PTC4
IRQ
RESET
PTF0/TPM1CH2
PTF1/TPM1CH3
PTF4/TPM2CH0
PTF5/TPM2CH1
PTF6
PTE0/TxD1
PTE1/RxD1
PTE2/TPM1CH0
PTE3/TPM1CH1
1
2
3
4
5
6
7
8
9
10
11
12
PTC5/RxD2
PTC3/TxD2
47
48
14
13
PTE4/SS1
PTE5/MISO1
PTC1/SDA1
PTC2/MCLK
46
45
15
16
PTE6/MOSI1
PTE7/SPSCK1
SS
PTG6/EXTAL
V
PTC0/SCL1
44
43
42
48-Pin QFN
17
18
19
SS
DD
V
V
PTG0/KBI1P0
PTG5/XTAL
BKGD/MS
41
40
20
21
PTG2/KBI1P2
PTG1/KBI1P1
22
PTA0
REFL
V
39
V
38
23
PTA1
REFH
Chapter 2 Pins and Connections
PTG4/KB1IP4
37
PTG3/KBI1P3
36
PTD3/KBI1P6/AD1P11
35
PTD2/KBI1P5/AD1P10
34
V
33
SSAD
V
32
DDAD
PTD1/AD1P9
31
PTD0/AD1P8
30
PTB3/AD1P3
29
PTB2/AD1P2
28
27
PTB1/AD1P1
PTB0/AD1P0
26
PTA7
25
24
PTA2
Figure 2-2. MC9S08AW60/48/32/16 in 48-Pin QFN Package
MC9S08AW60 Data Sheet, Rev.1.0
Freescale Semiconductor25
Chapter 2 Pins and Connections
PTC4
IRQ
RESET
PTF0/TPM1CH2
PTF1/TPM1CH3
PTF4/TPM2CH0
PTF5/TPM2CH1
PTE0/TxD1
PTE1/RxD1
PTE2/TPM1CH0
PTE3/TPM1CH1
11
1
PTC5/RxD2
44
2
3
4
5
6
7
8
9
10
12
PTE4/SS1
PTC3/TxD2
PTC2/MCLK
434241
14
13
PTE6/MOSI1
PTE5/MISO1
PTC0/SCL1
PTC1/SDA1
40
44-Pin LQFP
151617
SS
V
PTE7/SPSCK1
SS
V
39
DD
V
PTG6/EXTAL
PTG5/XTAL
37
38
18
PTG1/KBI1P1
PTG0/KBI1P0
REFL
BKGD/MS
V
35
36
2021
PTA019PTA1
PTG2/KBI1P2
REFH
V
34
PTG3/KBI1P3
33
32
PTD3/KBI1P6/AD1P11
PTD2/KBI1P5/AD1P10
31
V
30
29
28
27
26
25
24
22
SSAD
V
DDAD
PTD1/AD1P9
PTD0/AD1P8
PTB3/AD1P3
PTB2/AD1P2
PTB1/AD1P1
PTB0/AD1P0
23
Figure 2-3. MC9S08AW60/48/32/16 in 44-Pin LQFP Package
2.3Recommended System Connections
Figure 2-4 shows pin connections that are common to almost all MC9S08AW60/48/32/16 application
systems.
MC9S08AW60 Data Sheet, Rev.1.0
26Freescale Semiconductor
SYSTEM
POWER
5 V
Chapter 2 Pins and Connections
V
REFH
DDAD
SSAD
REFL
DD
MC9S08AW60
PORT
A
PTA0
PTA1
PTA2
PTA3
PTA4
PTA5
PTA6
C
BYAD
0.1 µF
V
V
DD
+
C
BLK
10 µF
+
C
BY
0.1 µF
V
V
V
VSS(x2)
PTA7
V
DD
NOTES:
1. Not required if
using the internal
clock option.
2. These are the
same pins as
PTG5 and PTG6
3. RC filters on
RESET and IRQ
are recommended
for EMC-sensitive
applications.
NOTE 1
C1
X1
BACKGROUND HEADER
OPTIONAL
MANUAL
RESET
ASYNCHRONOUS
INTERRUPT
INPUT
R
F
C2
1
V
DD
4.7 kΩ–10 kΩ
0.1 µF
PTG0/KBI1P0
PTG1/KBI1P1
PTG2/KBI1P2
PTG3/KBI1P3
PTG4/KBI1P4
PTG5/XTAL
PTG6/EXTAL
PTF0/TPM1CH2
PTF1/TPM1CH3
PTF2/TPM1CH4
PTF3/TPM1CH5
PTF4/TPM2CH0
PTF5/TPM2CH1
PTF6
PTF7
R
S
XTAL
NOTE 2
EXTAL
NOTE 2
PORT
B
PTB0/AD1P0
PTB1/AD1P1
PTB2/AD1P2
PTB3/AD1P3
PTB4/AD1P4
PTB5/AD1P5
I/O AND
PERIPHERAL
INTERFACE TO
APPLICATION
SYSTEM
V
DD
4.7 kΩ–
10 kΩ
BKGD/MS
RESET
NOTE 3
PORT
C
PTB6/AD1P6
PTB7/AD1P7
PTC0/SCL1
PTC1/SDA1
PTC2/MCLK
PTC3/TxD2
PTC4
PTC5/RxD2
PTC6
IRQ
0.1 µF
NOTE 3
PTD0/AD1P8
PTD1/AD1P9
PTD2/AD1P10/KBI1P5
PORT
G
PORT
D
PTD3/AD1P11/KBI1P6
PTD4/AD1P12/TPM2CLK
PTD5/AD1P13
PTD6/AD1P14/TPM1CLK
PTD7/AD1P15/KBI1P7
PTE0/TxD1
PTE1/RxD1
PTE2/TPM1CH0
PORT
F
PORT
E
PTE3/TPM1CH1
PTE4/
SS1
PTE5/MISO1
PTE6/MOSI1
PTE7/SPSCK1
Figure 2-4. Basic System Connections
MC9S08AW60 Data Sheet, Rev.1.0
Freescale Semiconductor27
Chapter 2 Pins and Connections
2.3.1Power (VDD, 2 x VSS, V
DDAD
, V
SSAD
)
VDD and VSS are the primary power supply pins for the MCU. This voltage source supplies power to all
I/O buffer circuitry and to an internal voltage regulator. The internal voltage regulator provides regulated
lower-voltage source to the CPU and other internal circuitry of the MCU.
Typically, application systems have two separate capacitors across the power pins. In this case, there
should be a bulk electrolytic capacitor, such as a 10-µF tantalum capacitor, to provide bulk charge storage
for the overall system and a 0.1-µF ceramic bypass capacitor located as near to the paired V
DD
and V
SS
power pins as practical to suppress high-frequency noise. The MC9S08AW60 has a second VSSpin. This
pin should be connected to the system ground plane or to the primary V
pin through a low-impedance
SS
connection.
V
DDAD
and V
are the analog power supply pins for the MCU. This voltage source supplies power to
SSAD
the ADC module. A 0.1-µF ceramic bypass capacitor should be located as near to the analog power pins
as practical to suppress high-frequency noise.
2.3.2Oscillator (XTAL, EXTAL)
Out of reset the MCU uses an internally generated clock (self-clocked mode — f
Self_reset
about 8-MHz crystal rate. This frequency source is used during reset startup and can be enabled as the
clock source for stop recovery to avoid the need for a long crystal startup delay. This MCU also contains
a trimmable internal clock generator (ICG) module that can be used to run the MCU. For more information
on the ICG, see the Chapter 8, “Internal Clock Generator (S08ICGV4).”
) equivalent to
The oscillator in this MCU is a Pierce oscillator that can accommodate a crystal or ceramic resonator in
either of two frequency ranges selected by the RANGE bit in the ICGC1 register. Rather than a crystal or
ceramic resonator, an external oscillator can be connected to the EXTAL input pin.
Refer to Figure 2-4 for the following discussion. R
(when used) and RF should be low-inductance
S
resistors such as carbon composition resistors. Wire-wound resistors, and some metal film resistors, have
too much inductance. C1 and C2 normally should be high-quality ceramic capacitors that are specifically
designed for high-frequency applications.
is used to provide a bias path to keep the EXTAL input in its linear range during crystal startup and its
R
F
value is not generally critical. Typical systems use 1 MΩ to 10 MΩ. Higher values are sensitive to humidity
and lower values reduce gain and (in extreme cases) could prevent startup.
C1 and C2 are typically in the 5-pF to 25-pF range and are chosen to match the requirements of a specific
crystal or resonator. Be sure to take into account printed circuit board (PCB) capacitance and MCU pin
capacitance when sizing C1 and C2. The crystal manufacturer typically specifies a load capacitance which
is the series combination of C1 and C2 which are usually the same size. As a first-order approximation,
use 10 pF as an estimate of combined pin and PCB capacitance for each oscillator pin (EXTAL and
XTAL).
2.3.3RESET
RESET is a dedicated pin with a pullup device built in. It has input hysteresis, a high current output driver,
and no output slew rate control. Internal power-on reset and low-voltage reset circuitry typically make
MC9S08AW60 Data Sheet, Rev.1.0
28Freescale Semiconductor
Chapter 2 Pins and Connections
external reset circuitry unnecessary. This pin is normally connected to the standard 6-pin background
debug connector so a development system can directly reset the MCU system. If desired, a manual external
reset can be added by supplying a simple switch to ground (pull reset pin low to force a reset).
Whenever any reset is initiated (whether from an external signal or from an internal system), the reset pin
is driven low for approximately 34 bus cycles, released, and sampled again approximately 38 bus cycles
later. If reset was caused by an internal source such as low-voltage reset or watchdog timeout, the circuitry
expects the reset pin sample to return a logic 1. The reset circuitry decodes the cause of reset and records
it by setting a corresponding bit in the system control reset status register (SRS).
In EMC-sensitive applications, an external RC filter is recommended on the reset pin. See Figure 2-4 for
an example.
2.3.4Background/Mode Select (BKGD/MS)
While in reset, the BKGD/MS pin functions as a mode select pin. Immediately after reset rises the pin
functions as the background pin and can be used for background debug communication. While functioning
as a background/mode select pin, the pin includes an internal pullup device, input hysteresis, a standard
output driver, and no output slew rate control.
If nothing is connected to this pin, the MCU will enter normal operating mode at the rising edge of reset.
If a debug system is connected to the 6-pin standard background debug header, it can hold BKGD/MS low
during the rising edge of reset which forces the MCU to active background mode.
The BKGD pin is used primarily for background debug controller (BDC) communications using a custom
protocol that uses 16 clock cycles of the target MCU’s BDC clock per bit time. The target MCU’s BDC
clock could be as fast as the bus clock rate, so there should never be any significant capacitance connected
to the BKGD/MS pin that could interfere with background serial communications.
Although the BKGD pin is a pseudo open-drain pin, the background debug communication protocol
provides brief, actively driven, high speedup pulses to ensure fast rise times. Small capacitances from
cables and the absolute value of the internal pullup device play almost no role in determining rise and fall
times on the BKGD pin.
2.3.5ADC Reference Pins (V
The V
REFH
and V
pins are the voltage reference high and voltage reference low inputs respectively
REFL
REFH
, V
REFL
)
for the ADC module.
2.3.6External Interrupt Pin (IRQ)
The IRQ pin is the input source for the IRQ interrupt and is also the input for the BIH and BIL instructions.
If the IRQ function is not enabled, this pin does not perform any function.
When IRQ is configured as the IRQ input and is set to detect rising edges, a pulldown device rather than
a pullup device is enabled.
In EMC-sensitive applications, an external RC filter is recommended on the IRQ pin. See Figure 2-4 for
an example.
MC9S08AW60 Data Sheet, Rev.1.0
Freescale Semiconductor29
Chapter 2 Pins and Connections
2.3.7General-Purpose I/O and Peripheral Ports
The remaining pins are shared among general-purpose I/O and on-chip peripheral functions such as timers
and serial I/O systems. Immediately after reset, all of these pins are configured as high-impedance
general-purpose inputs with internal pullup devices disabled.
NOTE
To avoid extra current drain from floating input pins, the reset initialization
routine in the application program should either enable on-chip pullup
devices or change the direction of unused pins to outputs so the pins do not
float.
For information about controlling these pins as general-purpose I/O pins, see Chapter 6, “Parallel
Input/Output.” For information about how and when on-chip peripheral systems use these pins, refer to the