English
Language : 

MC9S08QG8 Datasheet, PDF (229/300 Pages) Freescale Semiconductor, Inc – 8-BIT HCS08 Central Processor Unit
Timer/PWM (S08TPMV2)
16.1.3 Block Diagram
Figure 16-2 shows the structure of a TPM. Some MCUs include more than one TPM, with various
numbers of channels.
BUSCLK
XCLK
TPMxCLK
SYNC
CPWMS
MAIN 16-BIT COUNTER
16-BIT COMPARATOR
TPMMODH:TPMMODL
CHANNEL 0
16-BIT COMPARATOR
TPMC0VH:TPMC0VL
16-BIT LATCH
CLOCK SOURCE
SELECT
OFF, BUS, XCLK, EXT
CLKSB CLKSA
COUNTER RESET
PRESCALE AND SELECT
DIVIDE BY
1, 2, 4, 8, 16, 32, 64, or 128
PS2
PS1
PS0
TOF
INTERRUPT
TOIE
LOGIC
ELS0B ELS0A
CH0F
MS0B MS0A
CH0IE
PORT
LOGIC
TPMCH0
INTERRUPT
LOGIC
CHANNEL 1
16-BIT COMPARATOR
TPMC1VH:TPMC1VL
16-BIT LATCH
ELS1B ELS1A
CH1F
MS1B MS1A
CH1IE
PORT
LOGIC
TPMCH1
INTERRUPT
LOGIC
CHANNEL n
16-BIT COMPARATOR
TPMCnVH:TPMCnVL
16-BIT LATCH
ELSnB ELSnA
CHnF
MSnB MSnA
CHnIE
PORT
LOGIC
TPMCHn
INTERRUPT
LOGIC
Figure 16-2. TPM Block Diagram
The central component of the TPM is the 16-bit counter that can operate as a free-running counter, a
modulo counter, or an up-/down-counter when the TPM is configured for center-aligned PWM. The TPM
counter (when operating in normal up-counting mode) provides the timing reference for the input capture,
output compare, and edge-aligned PWM functions. The timer counter modulo registers,
TPMMODH:TPMMODL, control the modulo value of the counter. (The values 0x0000 or 0xFFFF
MC9S08QG8 and MC9S08QG4 Data Sheet, Rev. 1.01
Freescale Semiconductor
229