![NXP Semiconductors MC9S08LG16 Reference Manual Download Page 336](http://html1.mh-extra.com/html/nxp-semiconductors/mc9s08lg16/mc9s08lg16_reference-manual_1721837336.webp)
Chapter 15 Modulo Timer (S08MTIMV1)
MC9S08LG32 MCU Series, Rev. 5
336
Freescale Semiconductor
17.4.1
MTIM Operation Example
This section shows an example of the MTIM operation as the counter reaches a matching value from the
modulo register.
Figure 17-8. MTIM counter overflow example
In the example of
, the selected clock source could be any of the four possible choices. The
prescaler is set to PS = %0010 or divide-by-4. The modulo value in the
MTIM
MOD register is set to $AA.
When the counter,
MTIM
CNT, reaches the modulo value of $AA, the counter overflows to $00 and
continues counting. The timer overflow flag, TOF, sets when the counter value changes from $AA to $00.
An MTIM overflow interrupt is generated when TOF is set, if TOIE = 1.
selected
clock source
MTIMCNT
MTIM clock
(PS=%0010)
MTIMMOD:
$AA
$A7
$A8
$A9
$AA
$00
$01
TOF
Summary of Contents for MC9S08LG16
Page 2: ......
Page 4: ......
Page 8: ......
Page 20: ......
Page 26: ...Chapter 1 Device Overview MC9S08LG32 MCU Series Rev 5 26 Freescale Semiconductor...
Page 40: ...Chapter 2 Pins and Connections MC9S08LG32 MCU Series Rev 5 40 Freescale Semiconductor...
Page 372: ......