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.
Revision
Number
1.0007/14/2005Initial public release.
Revision
Date
Description of Changes
This product incorporates SuperFlash® technology licensed from SST.
Freescale‚ and the Freescale logo are trademarks of Freescale Semiconductor, Inc.
The MC9S08GBxxA/GTxxA 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.
1.2Features
Features have been organized to reflect:
•Standard features of the HCS08 Family
•Features of the MC9S08GBxxA/GTxxA MCU
1.2.1Standard Features of the HCS08 Family
•40-MHz HCS08 CPU (central processor unit)
•HC08 instruction set with added BGND instruction
•Background debugging system (see also Chapter 15, “Development Support”)
•Breakpoint capability to allow single breakpoint setting during in-circuit debugging (plus two more
breakpoints in on-chip debug module)
•Debug module containing two comparators and nine trigger modes. Eight deep FIFO for storing
change-of-flow addresses and event-only data. Debug module supports both tag and force
breakpoints.
•Support for up to 32 interrupt/reset sources
•Power-saving modes: wait plus three stops
•System protection features:
— 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)
MC9S08GB60A Data Sheet, Rev. 1.00
Freescale Semiconductor17
Chapter 1 Device Overview
1.2.2Features of MC9S08GBxxA/GTxxA Series of MCUs
•On-chip in-circuit programmable FLASH memory:
— Fully read/write functional across voltage and temperature ranges
— Block protection and security options
— (see Table 1-1 for device-specific information)
•On-chip random-access memory (RAM) (see Table 1-1 for device specific information)
•Two serial communications interface modules (SCI)
•Serial peripheral interface module (SPI)
•Multiple clock source options:
— Internally generated clock with ±0.2% trimming resolution and ±0.5% deviation across voltage
— Crystal
— Resonator
— External clock
•Inter-integrated circuit bus module to operate up to 100 kbps (IIC)
•One 3-channel and one 5-channel 16-bit timer/pulse width modulator (TPM) modules with
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 (TPMx).
•8-pin keyboard interrupt module (KBI)
•16 high-current pins (limited by package dissipation)
•Software selectable pullups on ports when used as input. Selection is on an individual port bit basis.
During output mode, pullups are disengaged.
•Internal pullup on
RESET and IRQ pin to reduce customer system cost
•Up to 56 general-purpose input/output (I/O) pins, depending on package selection
Note: Not all pins are bonded out in all packages. See Table 2-2 for complete details.
Block Diagaram Symbol Key:
= Not connected in 48- and 44-pin packages
= Not connected in 44-pin packages
Figure 1-1. MC9S08GBxxA/GTxxA Block Diagram
MC9S08GB60A Data Sheet, Rev. 1.00
20Freescale Semiconductor
Table 1-2 lists the functional versions of the on-chip modules.
Table 1-2. Block Versions
ModuleVersion
Analog-to-Digital Converter (ATD)3
Internal Clock Generator (ICG)2
Inter-Integrated Circuit (IIC)1
Keyboard Interrupt (KBI)1
Serial Communications Interface (SCI)1
Serial Peripheral Interface (SPI)3
Timer Pulse-Width Modulator (TPM)1
Central Processing Unit (CPU)2
1.4System Clock Distribution
Chapter 1 Device Overview
ICGERCLK
FFE
SYSTEM
CONTROL
LOGIC
RTI
TPM1TPM2IIC1SCI1SCI2SPI1
÷2
ICG
ICGOUT
ICGLCLK*
CPU
* ICGLCLK is the alternate BDC clock source for the MC9S08GBxxA/GTxxA.
FIXED FREQ CLOCK (XCLK)
÷2
BUSCLK
BDC
ATD1
ATD has min and max
frequency requirements. See
Chapter 1, “Device Overview” and
Appendix A, “Electrical Characteristics.
RAMFLASH
FLASH has frequency
requirements for program
and erase operation.
See Appendix A, “Electrical
Characteristics.
Figure 1-2. System Clock Distribution Diagram
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.
MC9S08GB60A Data Sheet, Rev. 1.00
Freescale Semiconductor21
Chapter 1 Device Overview
•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 the ICGERCLK.
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.
MC9S08GB60A Data Sheet, Rev. 1.00
22Freescale Semiconductor
Chapter 2
Pins and Connections
2.1Introduction
This section describes signals that connect to package pins. It includes a pinout diagram, a table of signal
properties, and detailed discussion of signals.
MC9S08GB60A Data Sheet, Rev. 1.00
Freescale Semiconductor23
Chapter 2 Pins and Connections
2.2Device Pin Assignment
RESET
PTG7
PTC0/TxD2
PTC1/RxD2
PTC2/SDA1
PTC3/SCL1
PTC4
PTC5
PTC6
PTG6
PTG5
PTG4
64
63 62 61
1
2
3
4
5
6
7
8
9
PTG2/EXTAL
PTG3
60
PTG0/BKGD/MS
PTG1/XTAL
58
59
57
SSAD
V
56
DDAD
V
PTF1
PTF0
PTA7/KBI1P7
PTA5/KBI1P5
PTA6/KBI1P6
PTA4/KBI1P4
505152535455
PTA3/KBI1P3
49
48
47
46
45
44
43
42
41
40
PTA2/KBI1P2
PTA1/KBI1P1
PTA0/KBI1P0
PTF7
PTF6
PTF5
V
REFL
V
REFH
PTB7/AD1P7
PTC7
PTF2
PTF3
PTF4
PTE0/TxD1
PTE1/RxD1
IRQ
10
11
12
13
14
15
16
27
26
PTD0/TPM1CH0
PTD1/TPM1CH1
17
PTE2/SS1
19
18
PTE3/MISO1
PTE4/MOSI1
20 21 22
PTE6
PTE5/SPSCK1
23
PTE7
24
25
SS
DD
V
V
Figure 2-1. MC9S08GBxxA in 64-Pin LQFP Package
28 29 30 31
PTD2/TPM1CH2
PTD4/TPM2CH1
PTD3/TPM2CH0
39
38
37
36
35
34
32
PTD6/TPM2CH3
PTD5/TPM2CH2
PTD7/TPM2CH4
PTB6/AD1P6
PTB5/AD1P5
PTB4/AD1P4
PTB3/AD1P3
PTB2/AD1P2
PTB1/AD1P1
PTB0/AD1P0
33
MC9S08GB60A Data Sheet, Rev. 1.00
24Freescale Semiconductor
RESET
PTC0/TxD2
PTC1/RxD2
PTC2/SDA1
PTC3/SCL1
PTC4
PTC5
PTC6
PTC7
PTE0/TxD1
PTE1/RxD1
IRQ
Chapter 2 Pins and Connections
DDAD
SSAD
PTG2/EXTAL
PTG1/XTAL
PTG3
47
48
1
PTG0/BKGD/MS
46
45
V
V
44
43
PTA6/KBI1P6
PTA7/KBI1P7
42
41
2
3
4
5
6
7
8
9
10
11
12
14
15
16
17
18
19
13
20
PTA4/KBI1P4
PTA5/KBI1P5
40
21
PTA3/KBI1P3
39
38
22
23
PTA2/KBI1P2
37
PTA1/KBI1P1
36
PTA0/KBI1P0
35
V
34
REFL
V
33
REFH
PTB7/AD1P7
32
PTB6/AD1P6
31
PTB5/AD1P5
30
PTB4/AD1P4
29
PTB3/AD1P3
28
PTB2/AD1P2
27
PTB1/AD1P1
26
PTB0/AD1P0
25
24
SS1
SS1
V
SS2
V
DD
V
PTE2/
PTE3/MISO1
PTE5/SPSCK1
PTE4/MOSI1
PTD1/TPM1CH1
PTD0/TPM1CH0
PTD2/TPM1CH2
PTD3/TPM2CH0
PTD4/TPM2CH1
Figure 2-2. MC9S08GTxxA in 48-Pin QFN Package
MC9S08GB60A Data Sheet, Rev. 1.00
Freescale Semiconductor25
Chapter 2 Pins and Connections
RESET
PTC0/TxD2
PTC1/RxD2
PTC2/SDA1
PTC3/SCL1
PTC4
PTC5
PTC6
PTE0/TxD1
PTE1/RxD1
IRQ
1
11
PTG2/EXTAL
44
2
3
4
5
6
7
8
9
10
12
SS1
PTG1/XTAL
PTG0/BKGD/MS
43
42
13
14
SSAD
V
41
15
DDAD
V
PTA7/KBI1P7
40
16
17
SS
DD
V
V
PTA6/KBI1P6
39
38
18
PTA4/KBI1P4
PTA5/KBI1P5
37
19
PTA3/KBI1P3
36
35
20
21
PTA2/KBI1P2
34
PTA1/KBI1P1
33
PTA0/KBI1P0
32
V
31
30
29
28
27
26
25
24
22
REFL
V
REFH
PTB7/AD1P7
PTB6/AD1P6
PTB5/AD1P5
PTB4/AD1P4
PTB3/AD1P3
PTB2/AD1P2
PTB1/AD1P1
23
PTE2/
PTE3/MISO1
PTE4/MOSI1
PTE5/SPSCK1
PTD1/TPM1CH1
PTD0/TPM1CH0
PTD3/TPM2CH0
PTB0/AD1P0
PTD4/TPM2CH1
Figure 2-3. MC9S08GTxxA in 44-Pin QFP Package
2.3Recommended System Connections
Figure 2-4 shows pin connections that are common to almost all MC9S08GBxxA application systems.
MC9S08GTxxA connections will be similar except for the number of I/O pins available. A more detailed
discussion of system connections follows.
MC9S08GB60A Data Sheet, Rev. 1.00
26Freescale Semiconductor
SYSTEM
POWER
NOTE 1
C1
BACKGROUND HEADER
V
DD
OPTIONAL
MANUAL
RESET
+
C
3 V
BLK
10 µF
X1
ASYNCHRONOUS
INTERRUPT
INPUT
V
DD
+
R
F
V
C
BY
0.1 µF
C2
DD
4.7 kΩ–10 kΩ
0.1 µF
C
BYAD
0.1 µF
R
S
V
DD
4.7 kΩ–10 kΩ
0.1 µF
V
REFH
V
DDAD
MC9S08GBxxA/GTxxA
V
SSAD
V
REFL
V
DD
V
SS
NOTE 4
XTAL
NOTE 2
EXTAL
NOTE 2
BKGD/MS
NOTE 3
RESET
NOTE 5
IRQ
NOTE 5
PORT
A
PORT
B
PORT
C
Chapter 2 Pins and Connections
PTA0/KBI1P0
PTA1/KBI1P1
PTA2/KBI1P2
PTA3/KBI1P3
PTA4/KBI1P4
PTA5/KBI1P5
PTA6/KBI1P6
PTA7/KBI1P7
PTB0/AD1P0
PTB1/AD1P1
PTB2/AD1P2
PTB3/AD1P3
PTB4/AD1P4
PTB5/AD1P5
PTB6/AD1P6
PTB7/AD1P7
PTC0/TxD2
PTC1/RxD2
PTC2/SDA1
PTC3/SCL1
I/O AND
PERIPHERAL
INTERFACE TO
APPLICATION
SYSTEM
PTC4
PTC5
PTC6
PTC7
PTD0/TPM1CH0
PTD1/TPM1CH1
PTD2/TPM1CH2
PTD3/TPM2CH0
PTD4/TPM2CH1
PTD5/TPM2CH2
PTD6/TPM2CH3
PTD7/TPM2CH4
PTE0/TxD1
PTE1/RxD1
PTE2/
SS1
PTE3/MISO1
PTE4/MOSI1
PTE5/SPSCK1
PTE6
PTE7
NOTES:
1. Not required if using the
internal oscillator option.
2. These are the same pins as
PTG1 and PTG2.
3. BKGD/MS is the same pin
as PTG0.
4. The 48-pin QFN has 2 V
pins (V
of which must beconnected
SS1
and V
SS2
to GND.
5. RC filters on
RESET and
IRQ are recommended for
EMC-sensitive applications
SS
), both
PTG0/BKDG/MS
PTG1/XTAL
PTG2/EXTAL
PTG3
PTG4
PTG5
PTG6
PTG7
PTF0
PTF1
PTF2
PTF3
PTF4
PTF5
PTF6
PTF7
PORT
G
PORT
F
PORT
D
PORT
E
Figure 2-4. Basic System Connections
MC9S08GB60A Data Sheet, Rev. 1.00
Freescale Semiconductor27
Chapter 2 Pins and Connections
2.3.1Power
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 close to the MCU power pins as
practical to suppress high-frequency noise.
V
DDAD
and V
are the analog power supply pins for the MCU. This voltage source supplies power to
SSAD
the ATD. A 0.1-µF ceramic bypass capacitor should be located as close to the MCU power pins as practical
to suppress high-frequency noise.
2.3.2Oscillator
Out of reset, the MCU uses an internally generated clock (self-clocked mode — f
Self_reset
approximately equivalent to an 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 Chapter 7, “Internal Clock Generator (S08ICGV2).”
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, and the XTAL output
pin can be used as general I/O.
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.
), that is
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
external reset circuitry unnecessary. This pin is normally connected to the standard 6-pin background
MC9S08GB60A Data Sheet, Rev. 1.00
28Freescale Semiconductor
Chapter 2 Pins and Connections
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 cycles of f
cycles of f
Self_reset
later. If reset was caused by an internal source such as low-voltage reset or watchdog
Self_reset
, released, and sampled again approximately 38
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 (PTG0/BKGD/MS)
The background/mode select (BKGD/MS) shares its function with an I/O port pin. While in reset, the 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. When used as an I/O port (PTG0) the pin is limited to output only.
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.5General-Purpose I/O and Peripheral Ports
The remaining 55 pins are shared among general-purpose I/O and on-chip peripheral functions such as
timers and serial I/O systems. (17 of these pins are not bonded out on the 48-pin package, 20 of these pins
are not bonded out on the 44-pin package.) Immediately after reset, all 55 of these pins are configured as
high-impedance general-purpose inputs with internal pullup devices disabled.
NOTE
To prevent 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.
MC9S08GB60A Data Sheet, Rev. 1.00
Freescale Semiconductor29
Chapter 2 Pins and Connections
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
appropriate section from Table 2-1.
Table 2-1. Pin Sharing References
Port Pins
PTA7–PTA0KBI1P7–KBI1P0Chapter 2, “Pins and Connections”
See this section for information about modules that share these pins.
When an on-chip peripheral system is controlling a pin, data direction control bits still determine what is
read from port data registers even though the peripheral module controls the pin direction by controlling
the enable for the pin’s output buffer. See Chapter 6, “Parallel Input/Output” for details.
Pullup enable bits for each input pin control whether on-chip pullup devices are enabled whenever the pin
is acting as an input even if it is being controlled by an on-chip peripheral module. When the PTA7–PTA4
pins are controlled by the KBI module and are configured for rising-edge/high-level sensitivity, the pullup
enable control bits enable pulldown devices rather than pullup devices. Similarly, when IRQ is configured
as the IRQ input and is set to detect rising edges, the pullup enable control bit enables a pulldown device
rather than a pullup device.
MC9S08GB60A Data Sheet, Rev. 1.00
30Freescale Semiconductor
Loading...
+ 264 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.