4 functional description, Functional description, Tim block diagram – Freescale Semiconductor MC68HC08KH12 User Manual

Page 163

Advertising
background image

MC68HC(7)08KH12

Rev. 1.1

Advance Information

Freescale Semiconductor

163

11.4 Functional Description

Figure 11-1

shows the structure of the TIM. The central component of

the TIM is the 16-bit TIM counter that can operate as a free-running
counter or a modulo up-counter. The TIM counter provides the timing
reference for the input capture and output compare functions. The TIM
counter modulo registers, TMODH:TMODL, control the modulo value of
the TIM counter. Software can read the TIM counter value at any time
without affecting the counting sequence.

The two TIM channels are programmable independently as input
capture or output compare channels.

Figure 11-1. TIM Block Diagram

PRESCALER

PRESCALER SELECT

16-BIT COMPARATOR

PS2

PS1

PS0

16-BIT COMPARATOR

16-BIT LATCH

TCH0H:TCH0L

MS0A

ELS0B

ELS0A

TOF

TOIE

16-BIT COMPARATOR

16-BIT LATCH

TCH1H:TCH1L

CHANNEL 0

CHANNEL 1

TMODH:TMODL

TRST

TSTOP

TOV0

CH0IE

CH0F

ELS1B

ELS1A

TOV1

CH1IE

CH1MAX

CH1F

CH0MAX

MS0B

16-BIT COUNTER

INTE

RNAL BUS

MS1A

TCLK

PTE0/TCLK

INTERNAL

BUS CLOCK

PTE2/TCH1

PTE1/TCH0

INTERRUPT

LOGIC

PTE2

LOGIC

INTERRUPT

LOGIC

INTERRUPT

LOGIC

PTE1

LOGIC

Advertising