MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

MC9S08GB60A
MC9S08GB32A
MC9S08GT60A
MC9S08GT32A
Data Sheet
HCS08
Microcontrollers
MC9S08GB60A
Rev. 2
07/2008
freescale.com
www.DataSheet4U.com


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

www.DataSheet4U.com


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

www.DataSheet4U.com
MC9S08GB60A Data Sheet
Covers: MC9S08GB60A
MC9S08GB32A
MC9S08GT60A
MC9S08GT32A
MC9S08GB60A
Rev. 2
07/2008


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

Revision History
www.DataSheet4U.com
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.00
1.01
1.02
2
Revision
Date
07/14/2005
09/04/2007
02/25/2008
7/30/2008
Description of Changes
Initial public release.
Added a footnote to RTI of Table 3.2; Added RTI description to Section 3.5.6;
Added a sentence "If active BDM mode is enabled in stop3, the internal RTI
clock is not available." to the Section 5.7 Real Time Interrupt.
Changed the Maximun Low Power of FBE and FEE in Table A-9 to 10 MHz.
Changed the Title of Table 13-2 from “IIC1A Register Field Descriptions” to
“IIC1F Register Field Descriptions”
Added 42-pin SDIP information.
Changed “However, when HGO=0, the maximum frequency is 8 MHz in FEE
and FBE modes.” to “However, when HGO=0, the maximum frequency is
10 MHz in FEE and FBE modes.” in Appendix B5.
Updated the “How to reach us” at backpage.
This product incorporates SuperFlash® technology licensed from SST.
Freescale‚ and the Freescale logo are trademarks of Freescale Semiconductor, Inc.
© Freescale Semiconductor, Inc., 2005-2008. All rights reserved.
MC9S08GB60A Data Sheet, Rev. 2
6
Freescale Semiconductor


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

List of Chapters
www.DataSheet4U.com
Chapter Number
Title
Page
Chapter 1 Device Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Chapter 2 Pins and Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Chapter 3 Modes of Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Chapter 4 Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
Chapter 5 Resets, Interrupts, and System Configuration . . . . . . . . . . . . . . . 65
Chapter 6 Parallel Input/Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
Chapter 7 Internal Clock Generator (S08ICGV2) . . . . . . . . . . . . . . . . . . . . . 103
Chapter 8 Central Processor Unit (S08CPUV2) . . . . . . . . . . . . . . . . . . . . . . 129
Chapter 9 Keyboard Interrupt (S08KBIV1) . . . . . . . . . . . . . . . . . . . . . . . . . . 149
Chapter 10 Timer/PWM (S08TPMV1) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
Chapter 11 Serial Communications Interface (S08SCIV1) . . . . . . . . . . . . . . 171
Chapter 12 Serial Peripheral Interface (S08SPIV3). . . . . . . . . . . . . . . . . . . . 189
Chapter 13 Inter-Integrated Circuit (S08IICV1) . . . . . . . . . . . . . . . . . . . . . . . 205
Chapter 14 Analog-to-Digital Converter (S08ATDV3) . . . . . . . . . . . . . . . . . 223
Chapter 15 Development Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
Appendix A Electrical Characteristics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
Appendix B EB652: Migrating from the GB60 Series to the
GB60A Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283
Appendix C Ordering Information and Mechanical Drawings . . . . . . . . . . 287
Freescale Semiconductor
MC9S08GB60A Data Sheet, Rev. 2
3


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

www.DataSheet4U.com


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

Section Number
Contents
Title
www.DataSheet4U.com
Page
Chapter 1
Device Overview
1.1 Overview .........................................................................................................................................17
1.2 Features ...........................................................................................................................................17
1.2.1 Standard Features of the HCS08 Family .........................................................................17
1.2.2 Features of MC9S08GBxxA/GTxxA Series of MCUs ....................................................18
1.2.3 Devices in the MC9S08GBxxA/GTxxA Series ...............................................................19
1.3 MCU Block Diagrams .....................................................................................................................19
1.4 System Clock Distribution ..............................................................................................................21
Chapter 2
Pins and Connections
2.1 Introduction .....................................................................................................................................23
2.2 Device Pin Assignment ...................................................................................................................24
2.3 Recommended System Connections ...............................................................................................27
2.3.1 Power ...............................................................................................................................29
2.3.2 Oscillator ..........................................................................................................................29
2.3.3 Reset ................................................................................................................................29
2.3.4 Background / Mode Select (PTG0/BKGD/MS) ..............................................................30
2.3.5 General-Purpose I/O and Peripheral Ports .......................................................................30
2.3.6 Signal Properties Summary .............................................................................................32
Chapter 3
Modes of Operation
3.1 Introduction .....................................................................................................................................35
3.2 Features ...........................................................................................................................................35
3.3 Run Mode ........................................................................................................................................35
3.4 Active Background Mode ...............................................................................................................35
3.5 Wait Mode .......................................................................................................................................36
3.6 Stop Modes ......................................................................................................................................36
3.6.1 Stop1 Mode ......................................................................................................................37
3.6.2 Stop2 Mode ......................................................................................................................37
3.6.3 Stop3 Mode ......................................................................................................................38
3.6.4 Active BDM Enabled in Stop Mode ................................................................................38
3.6.5 LVD Enabled in Stop Mode .............................................................................................39
3.6.6 On-Chip Peripheral Modules in Stop Modes ...................................................................39
Freescale Semiconductor
MC9S08GB60A Data Sheet, Rev. 2
7


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

Section Number
Title
www.DataSheet4U.com
Page
Chapter 4
Memory
4.1 MC9S08GBxxA/GTxxA Memory Map ..........................................................................................43
4.1.1 Reset and Interrupt Vector Assignments ..........................................................................43
4.2 Register Addresses and Bit Assignments ........................................................................................45
4.3 RAM ................................................................................................................................................50
4.4 Flash ................................................................................................................................................50
4.4.1 Features ............................................................................................................................51
4.4.2 Program and Erase Times ................................................................................................51
4.4.3 Program and Erase Command Execution ........................................................................52
4.4.4 Burst Program Execution .................................................................................................53
4.4.5 Access Errors ...................................................................................................................55
4.4.6 Flash Block Protection .....................................................................................................55
4.4.7 Vector Redirection ...........................................................................................................56
4.5 Security ............................................................................................................................................56
4.6 Flash Registers and Control Bits .....................................................................................................57
4.6.1 Flash Clock Divider Register (FCDIV) ...........................................................................57
4.6.2 Flash Options Register (FOPT and NVOPT) ...................................................................59
4.6.3 Flash Configuration Register (FCNFG) ..........................................................................60
4.6.4 Flash Protection Register (FPROT and NVPROT) .........................................................60
4.6.5 Flash Status Register (FSTAT) ........................................................................................62
4.6.6 Flash Command Register (FCMD) ..................................................................................63
Chapter 5
Resets, Interrupts, and System Configuration
5.1 Introduction .....................................................................................................................................65
5.2 Features ...........................................................................................................................................65
5.3 MCU Reset ......................................................................................................................................65
5.4 Computer Operating Properly (COP) Watchdog .............................................................................66
5.5 Interrupts .........................................................................................................................................66
5.5.1 Interrupt Stack Frame ......................................................................................................67
5.5.2 External Interrupt Request (IRQ) Pin ..............................................................................68
5.5.2.1 Pin Configuration Options ..............................................................................68
5.5.2.2 Edge and Level Sensitivity .............................................................................69
5.5.3 Interrupt Vectors, Sources, and Local Masks ..................................................................69
5.6 Low-Voltage Detect (LVD) System ................................................................................................71
5.6.1 Power-On Reset Operation ..............................................................................................71
5.6.2 LVD Reset Operation .......................................................................................................71
5.6.3 LVD Interrupt Operation .................................................................................................71
5.6.4 Low-Voltage Warning (LVW) .........................................................................................71
5.7 Real-Time Interrupt (RTI) ...............................................................................................................71
5.8 Reset, Interrupt, and System Control Registers and Control Bits ...................................................72
5.8.1 Interrupt Pin Request Status and Control Register (IRQSC) ...........................................73
MC9S08GB60A Data Sheet, Rev. 2
8 Freescale Semiconductor


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

Section Number
Title
www.DataSheet4U.com
Page
5.8.2
5.8.3
5.8.4
5.8.5
5.8.6
5.8.7
5.8.8
System Reset Status Register (SRS) ................................................................................74
System Background Debug Force Reset Register (SBDFR) ...........................................75
System Options Register (SOPT) ....................................................................................76
System Device Identification Register (SDIDH, SDIDL) ...............................................77
System Real-Time Interrupt Status and Control Register (SRTISC) ...............................78
System Power Management Status and Control 1 Register (SPMSC1) ..........................79
System Power Management Status and Control 2 Register (SPMSC2) ..........................80
Chapter 6
Parallel Input/Output
6.1 Introduction .....................................................................................................................................81
6.2 Features ...........................................................................................................................................83
6.3 Pin Descriptions ..............................................................................................................................83
6.3.1 Port A and Keyboard Interrupts .......................................................................................83
6.3.2 Port B and Analog to Digital Converter Inputs ...............................................................84
6.3.3 Port C and SCI2, IIC, and High-Current Drivers ............................................................84
6.3.4 Port D, TPM1 and TPM2 ................................................................................................85
6.3.5 Port E, SCI1, and SPI ......................................................................................................85
6.3.6 Port F and High-Current Drivers .....................................................................................86
6.3.7 Port G, BKGD/MS, and Oscillator ..................................................................................86
6.4 Parallel I/O Controls ........................................................................................................................87
6.4.1 Data Direction Control ....................................................................................................87
6.4.2 Internal Pullup Control ....................................................................................................87
6.4.3 Slew Rate Control ............................................................................................................87
6.5 Stop Modes ......................................................................................................................................88
6.6 Parallel I/O Registers and Control Bits ...........................................................................................88
6.6.1 Port A Registers (PTAD, PTAPE, PTASE, and PTADD) ................................................88
6.6.2 Port B Registers (PTBD, PTBPE, PTBSE, and PTBDD) ................................................91
6.6.3 Port C Registers (PTCD, PTCPE, PTCSE, and PTCDD) ................................................93
6.6.4 Port D Registers (PTDD, PTDPE, PTDSE, and PTDDD) ...............................................95
6.6.5 Port E Registers (PTED, PTEPE, PTESE, and PTEDD) .................................................97
6.6.6 Port F Registers (PTFD, PTFPE, PTFSE, and PTFDD) ..................................................99
6.6.7 Port G Registers (PTGD, PTGPE, PTGSE, and PTGDD) .............................................100
Chapter 7
Internal Clock Generator (S08ICGV2)
7.1 Introduction ...................................................................................................................................105
7.1.1 Features ..........................................................................................................................106
7.1.2 Modes of Operation .......................................................................................................107
7.2 Oscillator Pins ...............................................................................................................................107
7.2.1 EXTAL— External Reference Clock / Oscillator Input ................................................107
7.2.2 XTAL— Oscillator Output ............................................................................................107
Freescale Semiconductor
MC9S08GB60A Data Sheet, Rev. 2
9


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

Section Number
Title
www.DataSheet4U.com
Page
7.2.3 External Clock Connections ..........................................................................................108
7.2.4 External Crystal/Resonator Connections .......................................................................108
7.3 Functional Description ..................................................................................................................109
7.3.1 Off Mode (Off) ..............................................................................................................109
7.3.1.1 BDM Active .................................................................................................109
7.3.1.2 OSCSTEN Bit Set .........................................................................................109
7.3.1.3 Stop/Off Mode Recovery ..............................................................................109
7.3.2 Self-Clocked Mode (SCM) ............................................................................................109
7.3.3 FLL Engaged, Internal Clock (FEI) Mode ....................................................................111
7.3.3.1 FLL Engaged Internal Unlocked ..................................................................111
7.3.3.2 FLL Engaged Internal Locked ......................................................................111
7.3.4 FLL Bypassed, External Clock (FBE) Mode ................................................................111
7.3.5 FLL Engaged, External Clock (FEE) Mode ..................................................................111
7.3.5.1 FLL Engaged External Unlocked .................................................................112
7.3.5.2 FLL Engaged External Locked .....................................................................112
7.3.6 FLL Lock and Loss-of-Lock Detection .........................................................................112
7.3.7 FLL Loss-of-Clock Detection ........................................................................................113
7.3.8 Clock Mode Requirements ............................................................................................114
7.3.9 Fixed Frequency Clock ..................................................................................................115
7.3.10 High Gain Oscillator ......................................................................................................115
7.4 Initialization/Application Information ..........................................................................................115
7.4.1 Introduction ....................................................................................................................115
7.4.2 Example #1: External Crystal = 32 kHz, Bus Frequency = 4.19 MHz .........................118
7.4.3 Example #2: External Crystal = 4 MHz, Bus Frequency = 20 MHz .............................119
7.4.4 Example #3: No External Crystal Connection, 5.4 MHz Bus Frequency .....................121
7.4.5 Example #4: Internal Clock Generator Trim .................................................................122
7.5 ICG Registers and Control Bits .....................................................................................................123
7.5.1 ICG Control Register 1 (ICGC1) ...................................................................................124
7.5.2 ICG Control Register 2 (ICGC2) ...................................................................................125
7.5.3 ICG Status Register 1 (ICGS1) ........................................................................ 126
7.5.4 ICG Status Register 2 (ICGS2) ......................................................................................127
7.5.5 ICG Filter Registers (ICGFLTU, ICGFLTL) .................................................................127
7.5.6 ICG Trim Register (ICGTRM) ......................................................................................128
Chapter 8
Central Processor Unit (S08CPUV2)
8.1 Introduction ...................................................................................................................................129
8.1.1 Features ..........................................................................................................................129
8.2 Programmer’s Model and CPU Registers .....................................................................................130
8.2.1 Accumulator (A) ............................................................................................................130
8.2.2 Index Register (H:X) .....................................................................................................130
8.2.3 Stack Pointer (SP) ..........................................................................................................131
8.2.4 Program Counter (PC) ...................................................................................................131
8.2.5 Condition Code Register (CCR) ....................................................................................131
MC9S08GB60A Data Sheet, Rev. 2
10 Freescale Semiconductor


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

Section Number
Title
www.DataSheet4U.com
Page
8.3 Addressing Modes .........................................................................................................................133
8.3.1 Inherent Addressing Mode (INH) ..................................................................................133
8.3.2 Relative Addressing Mode (REL) .................................................................................133
8.3.3 Immediate Addressing Mode (IMM) .............................................................................133
8.3.4 Direct Addressing Mode (DIR) .....................................................................................133
8.3.5 Extended Addressing Mode (EXT) ...............................................................................134
8.3.6 Indexed Addressing Mode .............................................................................................134
8.3.6.1 Indexed, No Offset (IX) ................................................................................134
8.3.6.2 Indexed, No Offset with Post Increment (IX+) ............................................134
8.3.6.3 Indexed, 8-Bit Offset (IX1) ...........................................................................134
8.3.6.4 Indexed, 8-Bit Offset with Post Increment (IX1+) .......................................134
8.3.6.5 Indexed, 16-Bit Offset (IX2) .........................................................................134
8.3.6.6 SP-Relative, 8-Bit Offset (SP1) ....................................................................134
8.3.6.7 SP-Relative, 16-Bit Offset (SP2) ..................................................................135
8.4 Special Operations .........................................................................................................................135
8.4.1 Reset Sequence ..............................................................................................................135
8.4.2 Interrupt Sequence .........................................................................................................135
8.4.3 Wait Mode Operation ....................................................................................................136
8.4.4 Stop Mode Operation .....................................................................................................136
8.4.5 BGND Instruction ..........................................................................................................137
8.5 HCS08 Instruction Set Summary ..................................................................................................138
Chapter 9
Keyboard Interrupt (S08KBIV1)
9.1 Introduction ...................................................................................................................................149
9.1.1 Port A and Keyboard Interrupt Pins ..............................................................................149
9.2 Features .........................................................................................................................................149
9.2.1 KBI Block Diagram .......................................................................................................151
9.3 Register Definition ........................................................................................................................151
9.3.1 KBI Status and Control Register (KBI1SC) ..................................................................152
9.3.2 KBI Pin Enable Register (KBI1PE) ..............................................................................153
9.4 Functional Description ..................................................................................................................153
9.4.1 Pin Enables ....................................................................................................................153
9.4.2 Edge and Level Sensitivity ............................................................................................153
9.4.3 KBI Interrupt Controls ...................................................................................................154
Chapter 10
Timer/PWM (S08TPMV1)
10.1 Introduction ...................................................................................................................................155
10.2 Features .........................................................................................................................................155
10.3 TPM Block Diagram .....................................................................................................................157
10.4 Pin Descriptions ............................................................................................................................158
10.4.1 External TPM Clock Sources ........................................................................................158
10.4.2 TPMxCHn — TPMx Channel n I/O Pins ......................................................................158
10.5 Functional Description ..................................................................................................................158
MC9S08GB60A Data Sheet, Rev. 2
Freescale Semiconductor
11


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

Section Number
Title
www.DataSheet4U.com
Page
10.5.1 Counter ..........................................................................................................................159
10.5.2 Channel Mode Selection ................................................................................................160
10.5.2.1 Input Capture Mode ......................................................................................160
10.5.2.2 Output Compare Mode .................................................................................160
10.5.2.3 Edge-Aligned PWM Mode ...........................................................................160
10.5.3 Center-Aligned PWM Mode ..........................................................................................161
10.6 TPM Interrupts ..............................................................................................................................163
10.6.1 Clearing Timer Interrupt Flags ......................................................................................163
10.6.2 Timer Overflow Interrupt Description ...........................................................................163
10.6.3 Channel Event Interrupt Description .............................................................................163
10.6.4 PWM End-of-Duty-Cycle Events ..................................................................................164
10.7 TPM Registers and Control Bits ...................................................................................................164
10.7.1 Timer x Status and Control Register (TPMxSC) ...........................................................165
10.7.2 Timer x Counter Registers (TPMxCNTH:TPMxCNTL) ..............................................166
10.7.3 Timer x Counter Modulo Registers (TPMxMODH:TPMxMODL) ..............................167
10.7.4 Timer x Channel n Status and Control Register (TPMxCnSC) .....................................168
10.7.5 Timer x Channel Value Registers (TPMxCnVH:TPMxCnVL) .....................................169
Chapter 11
Serial Communications Interface (S08SCIV1)
11.1 Introduction ...................................................................................................................................171
11.1.1 Features ..........................................................................................................................173
11.1.2 Modes of Operation .......................................................................................................173
11.1.3 Block Diagram ...............................................................................................................174
11.2 Register Definition ........................................................................................................................176
11.2.1 SCI Baud Rate Registers (SCIxBDH, SCIxBHL) .........................................................176
11.2.2 SCI Control Register 1 (SCIxC1) ..................................................................................177
11.2.3 SCI Control Register 2 (SCIxC2) ..................................................................................178
11.2.4 SCI Status Register 1 (SCIxS1) .....................................................................................179
11.2.5 SCI Status Register 2 (SCIxS2) .....................................................................................181
11.2.6 SCI Control Register 3 (SCIxC3) ..................................................................................181
11.2.7 SCI Data Register (SCIxD) ...........................................................................................182
11.3 Functional Description ..................................................................................................................183
11.3.1 Baud Rate Generation ....................................................................................................183
11.3.2 Transmitter Functional Description ...............................................................................183
11.3.2.1 Send Break and Queued Idle ........................................................................184
11.3.3 Receiver Functional Description ...................................................................................184
11.3.3.1 Data Sampling Technique .............................................................................185
11.3.3.2 Receiver Wakeup Operation .........................................................................185
11.3.4 Interrupts and Status Flags .............................................................................................186
11.3.5 Additional SCI Functions ..............................................................................................187
11.3.5.1 8- and 9-Bit Data Modes ...............................................................................187
11.3.5.2 Stop Mode Operation ....................................................................................187
11.3.5.3 Loop Mode ....................................................................................................188
MC9S08GB60A Data Sheet, Rev. 2
12 Freescale Semiconductor


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

Section Number
Title
www.DataSheet4U.com
Page
11.3.5.4 Single-Wire Operation ..................................................................................188
Chapter 12
Serial Peripheral Interface (S08SPIV3)
12.1 Introduction ...................................................................................................................................189
12.1.1 Features ..........................................................................................................................191
12.1.2 Block Diagrams .............................................................................................................191
12.1.2.1 SPI System Block Diagram ..........................................................................191
12.1.2.2 SPI Module Block Diagram ..........................................................................192
12.1.3 SPI Baud Rate Generation .............................................................................................193
12.2 External Signal Description ..........................................................................................................194
12.2.1 SPSCK — SPI Serial Clock ..........................................................................................194
12.2.2 MOSI — Master Data Out, Slave Data In .....................................................................194
12.2.3 MISO — Master Data In, Slave Data Out .....................................................................194
12.2.4 SS — Slave Select .........................................................................................................194
12.3 Modes of Operation .......................................................................................................................195
12.3.1 SPI in Stop Modes .........................................................................................................195
12.4 Register Definition ........................................................................................................................195
12.4.1 SPI Control Register 1 (SPI1C1) ...................................................................................195
12.4.2 SPI Control Register 2 (SPI1C2) ...................................................................................196
12.4.3 SPI Baud Rate Register (SPI1BR) .................................................................................197
12.4.4 SPI Status Register (SPI1S) ...........................................................................................198
12.4.5 SPI Data Register (SPI1D) ............................................................................................199
12.5 Functional Description ..................................................................................................................200
12.5.1 SPI Clock Formats .........................................................................................................200
12.5.2 SPI Interrupts .................................................................................................................203
12.5.3 Mode Fault Detection ....................................................................................................203
Chapter 13
Inter-Integrated Circuit (S08IICV1)
13.1 Introduction ...................................................................................................................................205
13.1.1 Features ..........................................................................................................................207
13.1.2 Modes of Operation .......................................................................................................207
13.1.3 Block Diagram ...............................................................................................................208
13.2 External Signal Description ..........................................................................................................208
13.2.1 SCL — Serial Clock Line ..............................................................................................208
13.2.2 SDA — Serial Data Line ...............................................................................................208
13.3 Register Definition ........................................................................................................................208
13.3.1 IIC Address Register (IIC1A) ........................................................................................209
13.3.2 IIC Frequency Divider Register (IIC1F) .......................................................................209
13.3.3 IIC Control Register (IIC1C) .........................................................................................212
Freescale Semiconductor
MC9S08GB60A Data Sheet, Rev. 2
13


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

Section Number
Title
www.DataSheet4U.com
Page
13.3.4 IIC Status Register (IIC1S) ............................................................................................213
13.3.5 IIC Data I/O Register (IIC1D) .......................................................................................214
13.4 Functional Description ..................................................................................................................215
13.4.1 IIC Protocol ...................................................................................................................215
13.4.1.1 START Signal ...............................................................................................216
13.4.1.2 Slave Address Transmission .........................................................................216
13.4.1.3 Data Transfer .................................................................................................216
13.4.1.4 STOP Signal ..................................................................................................217
13.4.1.5 Repeated START Signal ...............................................................................217
13.4.1.6 Arbitration Procedure ...................................................................................217
13.4.1.7 Clock Synchronization ..................................................................................217
13.4.1.8 Handshaking .................................................................................................218
13.4.1.9 Clock Stretching ............................................................................................218
13.5 Resets ............................................................................................................................................218
13.6 Interrupts .......................................................................................................................................218
13.6.1 Byte Transfer Interrupt ..................................................................................................219
13.6.2 Address Detect Interrupt ................................................................................................219
13.6.3 Arbitration Lost Interrupt ..............................................................................................219
13.7 Initialization/Application Information ..........................................................................................220
Chapter 14
Analog-to-Digital Converter (S08ATDV3)
14.1 Introduction ...................................................................................................................................225
14.1.1 Features ..........................................................................................................................225
14.1.2 Modes of Operation .......................................................................................................225
14.1.2.1 Stop Mode .....................................................................................................225
14.1.2.2 Power Down Mode .......................................................................................225
14.1.3 Block Diagram ...............................................................................................................225
14.2 Signal Description .........................................................................................................................226
14.2.1 Overview ........................................................................................................................226
14.2.1.1 Channel Input Pins — AD1P7–AD1P0 ........................................................227
14.2.1.2 ATD Reference Pins — VREFH, VREFL ....................................................................... 227
14.2.1.3 ATD Supply Pins — VDDAD, VSSAD ........................................................................... 227
14.3 Functional Description ..................................................................................................................227
14.3.1 Mode Control .................................................................................................................227
14.3.2 Sample and Hold ............................................................................................................228
14.3.3 Analog Input Multiplexer ..............................................................................................230
14.3.4 ATD Module Accuracy Definitions ...............................................................................230
14.4 Resets ............................................................................................................................................233
14.5 Interrupts .......................................................................................................................................233
14.6 ATD Registers and Control Bits ....................................................................................................233
14.6.1 ATD Control (ATDC) ....................................................................................................234
14.6.2 ATD Status and Control (ATD1SC) ..............................................................................236
14.6.3 ATD Result Data (ATD1RH, ATD1RL) ........................................................................237
MC9S08GB60A Data Sheet, Rev. 2
14 Freescale Semiconductor


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

Section Number
Title
www.DataSheet4U.com
Page
14.6.4 ATD Pin Enable (ATD1PE) ...........................................................................................238
Chapter 15
Development Support
15.1 Introduction ...................................................................................................................................239
15.1.1 Features ..........................................................................................................................240
15.2 Background Debug Controller (BDC) ..........................................................................................240
15.2.1 BKGD Pin Description ..................................................................................................241
15.2.2 Communication Details .................................................................................................242
15.2.3 BDC Commands ............................................................................................................246
15.2.4 BDC Hardware Breakpoint ............................................................................................248
15.3 On-Chip Debug System (DBG) ....................................................................................................249
15.3.1 Comparators A and B ....................................................................................................249
15.3.2 Bus Capture Information and FIFO Operation ..............................................................249
15.3.3 Change-of-Flow Information .........................................................................................250
15.3.4 Tag vs. Force Breakpoints and Triggers ........................................................................250
15.3.5 Trigger Modes ................................................................................................................251
15.3.6 Hardware Breakpoints ...................................................................................................253
15.4 Register Definition ........................................................................................................................253
15.4.1 BDC Registers and Control Bits ....................................................................................253
15.4.1.1 BDC Status and Control Register (BDCSCR) ..............................................254
15.4.1.2 BDC Breakpoint Match Register (BDCBKPT) ............................................255
15.4.2 System Background Debug Force Reset Register (SBDFR) .........................................255
15.4.3 DBG Registers and Control Bits ...................................................................................256
15.4.3.1 Debug Comparator A High Register (DBGCAH) ........................................256
15.4.3.2 Debug Comparator A Low Register (DBGCAL) .........................................256
15.4.3.3 Debug Comparator B High Register (DBGCBH) ........................................256
15.4.3.4 Debug Comparator B Low Register (DBGCBL) .........................................256
15.4.3.5 Debug FIFO High Register (DBGFH) ..........................................................257
15.4.3.6 Debug FIFO Low Register (DBGFL) ...........................................................257
15.4.3.7 Debug Control Register (DBGC) .................................................................258
15.4.3.8 Debug Trigger Register (DBGT) ..................................................................259
15.4.3.9 Debug Status Register (DBGS) ....................................................................260
Appendix A
Electrical Characteristics
A.1 Introduction ...................................................................................................................................261
A.2 Absolute Maximum Ratings ..........................................................................................................261
A.3 Thermal Characteristics .................................................................................................................262
A.4 Electrostatic Discharge (ESD) Protection Characteristics ............................................................263
A.5 DC Characteristics .........................................................................................................................263
Freescale Semiconductor
MC9S08GB60A Data Sheet, Rev. 2
15


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

Section Number
Title
www.DataSheet4U.com
Page
A.6 Supply Current Characteristics ......................................................................................................267
A.7 ATD Characteristics ......................................................................................................................271
A.8 Internal Clock Generation Module Characteristics .......................................................................273
A.8.1 ICG Frequency Specifications ........................................................................................274
A.9 AC Characteristics .........................................................................................................................275
A.9.1 Control Timing ...............................................................................................................276
A.9.2 Timer/PWM (TPM) Module Timing ..............................................................................277
A.9.3 SPI Timing ......................................................................................................................278
A.10 Flash Specifications .......................................................................................................................281
Appendix B
EB652: Migrating from the GB60 Series to the GB60A Series
B.1 Overview .......................................................................................................................................283
B.2 Flash Programming Voltage ..........................................................................................................283
B.3 Flash Block Protection: 60K Devices Only ..................................................................................283
B.4 Internal Clock Generator: High Gain Oscillator Option ...............................................................283
B.5 Internal Clock Generator: Low-Power Oscillator Maximum Frequency ......................................284
B.6 Internal Clock Generator: Loss-of-Clock Disable Option ............................................................284
B.7 System Device Identification Register ..........................................................................................285
Appendix C
Ordering Information and Mechanical Drawings
C.1 Ordering Information ....................................................................................................................287
C.2 Mechanical Drawings ....................................................................................................................288
MC9S08GB60A Data Sheet, Rev. 2
16 Freescale Semiconductor


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

www.DataSheet4U.com
Chapter 1
Device Overview
1.1 Overview
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.2 Features
Features have been organized to reflect:
• Standard features of the HCS08 Family
• Features of the MC9S08GBxxA/GTxxA MCU
1.2.1 Standard 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)
Freescale Semiconductor
MC9S08GB60A Data Sheet, Rev. 2
17


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

Chapter 1 Device Overview
www.DataSheet4U.com
1.2.2 Features 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)
• 8-channel, 10-bit analog-to-digital converter (ATD)
• 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
• 64-pin low-profile quad flat package (LQFP) — MC9S08GBxxA
• 48-pin quad flat package, no lead (QFN) — MC9S08GTxxA
• 44-pin quad flat package (QFP) — MC9S08GTxxA
• 42-pin skinny dual in-line package (SDIP) — MC9S08GTxxA
MC9S08GB60A Data Sheet, Rev. 2
18 Freescale Semiconductor


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

Chaptewr w1wD.DevaticaSehOeevt4eUrv.cioemw
1.2.3 Devices in the MC9S08GBxxA/GTxxA Series
Table 1-1 lists the devices available in the MC9S08GBxxA/GTxxA series and summarizes the differences
among them.
Table 1-1. Devices in the MC9S08GBxxA/GTxxA Series
Device
MC9S08GB60A
MC9S08GB32A
MC9S08GT60A
Flash
60K
32K
60K
RAM
4K
2K
4K
TPM
One 3-channel and one
5-channel, 16-bit timer
One 3-channel and one
5-channel, 16-bit timer
Two 2-channel,
16-bit timers
MC9S08GT32A
32K
2K Two 2-channel,
16-bit timers
1 The 48-pin QFN package has one 3-channel and one 2-channel 16-bit TPM.
I/O
56
56
39
36
33
39
36
33
Packages
64 LQFP
64 LQFP
48 QFN1
44 QFP
42 SDIP
48 QFN(1)
44 QFP
42 SDIP
1.3 MCU Block Diagrams
These block diagrams show the structure of the MC9S08GBxxA/GTxxA MCUs.
Freescale Semiconductor
MC9S08GB60A Data Sheet, Rev. 2
19


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

Chapter 1 Device Overview
www.DataSheet4U.com
RESET
IRQ
HCS08 CORE
CPU BDC
HCS08 SYSTEM CONTROL
RESETS AND INTERRUPTS
MODES OF OPERATION
POWER MANAGEMENT
RTI COP
IRQ LVD
VDDAD
VSSAD
VREFH
VREFL
VDD
VSS
USER FLASH
(Gx60A = 61,268 BYTES)
(Gx32A = 32,768 BYTES)
USER RAM
(Gx60A = 4096 BYTES)
(Gx32A = 2048 BYTES)
VOLTAGE
REGULATOR
INTERNAL CLOCK
GENERATOR
(ICG)
LOW-POWER OSCILLATOR
DEBUG
MODULE
(DBG)
8-BIT KEYBOARD
INTERRUPT MODULE
(KBI1)
ANALOG-TO-DIGITAL
CONVERTER (10-BIT)
(ATD1)
8
8
IIC MODULE
(IIC1)
SERIAL COMMUNICATIONS
INTERFACE MODULE
(SCI2)
5-CHANNEL TIMER/PWM
MODULE
(TPM2)
3-CHANNEL TIMER/PWM
MODULE
(TPM1)
SERIAL PERIPHERAL
INTERFACE MODULE
(SPI1)
SERIAL COMMUNICATIONS
INTERFACE MODULE
(SCI1)
SCL1
SDA1
SCL1
SCL1
5
3
SPSCK1
MOSI1
MISO1
SS1
RxD1
TxD1
EXTAL
XTAL
BKGD
8
PTA7/KBI1P7–
PTA0/KBI1P0
8
PTB7/AD1P7–
PTB0/AD1P0
PTC7
PTC6
PTC5
PTC4
PTC3/SCL1
PTC2/SDA1
PTC1/RxD2
PTC0/TxD2
PTD7/TPM2CH4
PTD6/TPM2CH3
PTD5/TPM2CH2
PTD4/TPM2CH1
PTD3/TPM2CH0
PTD2/TPM1CH2
PTD1/TPM1CH1
PTD0/TPM1CH0
PTE7
PTE6
PTE5/SPSCK1
PTE4/MOSI1
PTE3/MISO1
PTE2/SS1
PTE1/RxD1
PTE0/TxD1
8
PTF7–PTF0
4
PTG7–PTG4
PTG3
PTG2/EXTAL
PTG1/XTAL
PTG0/BKGD/MS
Note: Not all pins are bonded out in all packages. See Table 2-2 for complete details.
Block Diagram Symbol Key:
= Not connected in 48-, 44-, and 42-pin packages
= Not connected in 44- and 42-pin packages
= Not connected in 42-pin packages
Figure 1-1. MC9S08GBxxA/GTxxA Block Diagram
MC9S08GB60A Data Sheet, Rev. 2
20 Freescale Semiconductor


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

Table 1-2 lists the functional versions of the on-chip modules.
Table 1-2. Block Versions
Module
Analog-to-Digital Converter (ATD)
Internal Clock Generator (ICG)
Inter-Integrated Circuit (IIC)
Keyboard Interrupt (KBI)
Serial Communications Interface (SCI)
Serial Peripheral Interface (SPI)
Timer Pulse-Width Modulator (TPM)
Central Processing Unit (CPU)
Version
3
2
1
1
1
3
1
2
Chaptewr w1wD.DevaticaSehOeevt4eUrv.cioemw
1.4 System Clock Distribution
ICGERCLK
FFE
SYSTEM
CONTROL
LOGIC
RTI
TPM1
÷2
ICG FIXED FREQ CLOCK (XCLK)
TPM2
IIC1 SCI1 SCI2 SPI1
ICGOUT
ICGLCLK*
÷2
BUSCLK
CPU BDC
ATD1
RAM FLASH
* ICGLCLK is the alternate BDC clock source for the MC9S08GBxxA/GTxxA.
ATD has min and max
Flash has frequency
frequency requirements. See
requirements for program
Chapter 1, “Device Overview” and and erase operation.
Appendix A, “Electrical Characteristics. 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.
Freescale Semiconductor
MC9S08GB60A Data Sheet, Rev. 2
21


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

Chapter 1 Device Overview
www.DataSheet4U.com
• 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. 2
22 Freescale Semiconductor


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

www.DataSheet4U.com
Chapter 2
Pins and Connections
2.1 Introduction
This section describes signals that connect to package pins. It includes a pinout diagram, a table of signal
properties, and detailed discussion of signals.
Freescale Semiconductor
MC9S08GB60A Data Sheet, Rev. 2
23


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

Chapter 2 Pins and Connections
2.2 Device Pin Assignment
www.DataSheet4U.com
RESET 1
64 49
63 62 61 60 59 58 57 56 55 54 53 52 51 50
48 PTA2/KBI1P2
PTG7 2
47 PTA1/KBI1P1
PTC0/TxD2 3
46 PTA0/KBI1P0
PTC1/RxD2 4
45 PTF7
PTC2/SDA1 5
44 PTF6
PTC3/SCL1 6
43 PTF5
PTC4
PTC5
PTC6
7
8
9
42 VREFL
41 VREFH
40 PTB7/AD1P7
PTC7 10
39 PTB6/AD1P6
PTF2 11
38 PTB5/AD1P5
PTF3 12
37 PTB4/AD1P4
PTF4 13
36 PTB3/AD1P3
PTE0/TxD1 14
35 PTB2/AD1P2
PTE1/RxD1 15
34 PTB1/AD1P1
IRQ 16
18 19 20 21 22 23 24 25 26 27 28 29 30 31
17 32
33 PTB0/AD1P0
Figure 2-1. MC9S08GBxxA in 64-Pin LQFP Package
MC9S08GB60A Data Sheet, Rev. 2
24 Freescale Semiconductor


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

Chapter 2 Piwnswwan.DdatCaSohnenete4cUt.icoonms
RESET 1
PTC0/TxD2 2
PTC1/RxD2 3
PTC2/SDA1 4
PTC3/SCL1 5
PTC4 6
PTC5 7
PTC6 8
PTC7 9
PTE0/TxD1 10
PTE1/RxD1 11
IRQ 12
36 PTA1/KBI1P1
35 PTA0/KBI1P0
34 VREFL
33 VREFH
32 PTB7/AD1P7
31 PTB6/AD1P6
30 PTB5/AD1P5
29 PTB4/AD1P4
28 PTB3/AD1P3
27 PTB2/AD1P2
26 PTB1/AD1P1
25 PTB0/AD1P0
Figure 2-2. MC9S08GTxxA in 48-Pin QFN Package
Freescale Semiconductor
MC9S08GB60A Data Sheet, Rev. 2
25


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

Chapter 2 Pins and Connections
RESET 1
PTC0/TxD2 2
PTC1/RxD2 3
PTC2/SDA1 4
PTC3/SCL1 5
PTC4 6
PTC5 7
PTC6 8
PTE0/TxD1 9
PTE1/RxD1 10
IRQ 11
www.DataSheet4U.com
33 PTA1/KBI1P1
32 PTA0/KBI1P0
31 VREFL
30 VREFH
29 PTB7/AD1P7
28 PTB6/AD1P6
27 PTB5/AD1P5
26 PTB4/AD1P4
25 PTB3/AD1P3
24 PTB2/AD1P2
23 PTB1/AD1P1
Figure 2-3. MC9S08GTxxA in 44-Pin QFP Package
MC9S08GB60A Data Sheet, Rev. 2
26 Freescale Semiconductor


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

Chapter 2 Piwnswwan.DdatCaSohnenete4cUt.icoonms
VDDAD
VSSAD
PTG0/BKGD/MS
PTG1/XTAL
PTG2/EXTAL
RESET
PTC0/TxD2
PTC1/RXD2
PTC2/SDA1
PTC3/SCL1
PTC4
PTE0/TxD1
PTE1/RxD1
IRQ
PTE2/SS1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
42 PTA7/KBI1P7
41 PTA6/KBI1P6
40 PTA5/KBI1P5
39 PTA4/KBI1P4
38 PTA3/KBI1P3
37 PTA2/KBI1P2
36 PTA1/KBI1P1
35 PTA0/KBI1P0
34 VREFL
33 VREFH
32 PTB7/AD1P7
31 PTB6/AD1P6
30 PTB5/AD1P5
29 PTB4/AD1P4
28 PTB3/AD1P3
PTE3/MISO1
PTE4/MOSI1
16
17
27 PTB2/AD1P2
26 PTB1/AD1P1
PTE5/SPSCK1
VSS
VDD
PTD0/TPM1CH0
18
19
20
21
25 PTB0/AD1P0
24 PTD4/TPM2CH1
23 PTD3/TPM2CH0
22 PTD1/TPM1CH1
Figure 2-4. . MC9S08GTxxA in 42-Pin SDIP Package
2.3 Recommended 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.
Freescale Semiconductor
MC9S08GB60A Data Sheet, Rev. 2
27


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

Chapter 2 Pins and Connections
SYSTEM
POWER
+
3V
VDD
CBLK +
10 μF
CBYAD
0.1 μF
CBY
0.1 μF
VREFH
VDDAD
MC9S08GBxxA/GTxxA
VSSAD
VREFL
VDD
VSS
NOTE 4
PORT
A
NOTE 1
C1
RF
X1 C2
RS
BACKGROUND HEADER
XTAL
NOTE 2
EXTAL
NOTE 2
PORT
B
VDD
OPTIONAL
MANUAL
RESET
VDD
4.7 kΩ–10 kΩ
0.1 μF
ASYNCHRONOUS
INTERRUPT
INPUT
VDD
4.7 kΩ–10 kΩ
0.1 μF
BKGD/MS
NOTE 3
RESET
NOTE 5
IRQ
NOTE 5
PORT
C
PTG0/BKDG/MS
PTG1/XTAL
PTG2/EXTAL
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 VSS
pins (VSS1 and VSS2), both
of which must be connected
to GND.
5. RC filters on RESET and
IRQ are recommended for
EMC-sensitive applications
PTG3
PTG4
PTG5
PTG6
PTG7
PTF0
PTF1
PTF2
PTF3
PTF4
PTF5
PTF6
PTF7
PORT
G
PORT
F
PORT
D
PORT
E
Figure 2-5. Basic System Connections
MC9S08GB60A Data Sheet, Rev. 2
28
www.DataSheet4U.com
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
PTC4
PTC5
PTC6
PTC7
I/O AND
PERIPHERAL
INTERFACE TO
APPLICATION
SYSTEM
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
Freescale Semiconductor


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

Chapter 2 Piwnswwan.DdatCaSohnenete4cUt.icoonms
2.3.1 Power
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.
VDDAD and VSSAD are the analog power supply pins for the MCU. This voltage source supplies power to
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.2 Oscillator
Out of reset, the MCU uses an internally generated clock (self-clocked mode — fSelf_reset), that is
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. RS (when used) and RF should be low-inductance
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.
RF is used to provide a bias path to keep the EXTAL input in its linear range during crystal startup and its
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.3 Reset
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
Freescale Semiconductor
MC9S08GB60A Data Sheet, Rev. 2
29


MC9S08GB60A (Freescale Semiconductor)
HCS08 Microcontrollers

No Preview Available !

Click to Download PDF File for PC

Chapter 2 Pins and Connections
www.DataSheet4U.com
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 fSelf_reset, released, and sampled again approximately 38
cycles of fSelf_reset 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.4 Background / 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.5 General-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 and 22 of hese pins are not bonded out on the 42-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. 2
30 Freescale Semiconductor




Click to Download PDF File