English
Language : 

MC9S08SG8 Datasheet, PDF (233/310 Pages) Freescale Semiconductor, Inc – Microcontrollers
Chapter 16
Timer Pulse-Width Modulator (S08TPMV2)
16.1 Introduction
The TPM uses one input/output (I/O) pin per channel, TPMxCHn where x is the TPM number (for
example, 1 or 2) and n is the channel number (for example, 0–1). The TPM shares its I/O pins with
general-purpose I/O port pins (refer to the Pins and Connections chapter for more information).
All MC9S08SG8 MCUs have two TPM modules. The number of channels available depends on the pin
quantity of the package, as shown in Table 16-1:
Table 16-1. MC9S08SG8 Features by MCU and Package
Feature
MC9S08SG8/4
Pin quantity
20
16
8
TPM1 channels
2
2
11
TPM2 channels
2
2
11
1 The 8-pin device does not have TPM1CH1 or TPM2CH1
bonded out, but those timer channels are available to the
user to use as software compares.
Figure 16-1 shows the MC9S08SG8 block diagram with the TPM modules highlighted.
16.1.1 ACMP/TPM Configuration Information
The ACMP module can be configured to connect the output of the analog comparator to TPM1 input
capture channel 0 by setting ACIC in SOPT2. With ACIC set, the TPM1CH0 pin is not available externally
regardless of the configuration of the TPM1 module for channel 0.
16.1.2 TPM Configuration Information
The external clock for the TPM modules, TPMCLK, is selected by setting CLKS[B:A] = 1:1 in TPMxSC,
which selects the TCLK pin input. The TCLK input on PTA0 can be enabled as external clock inputs to
both TPM modules and MTIM simultaneously.
MC9S08SG8 MCU Series Data Sheet, Rev. 0
Freescale Semiconductor
PRELIMINARY
233