![Freescale Semiconductor HCS08 Series Reference Manual Download Page 156](http://html1.mh-extra.com/html/freescale-semiconductor/hcs08-series/hcs08-series_reference-manual_2330628156.webp)
Modulo Timer (S08MTIMV1)
MC9S08JS16 MCU Series Reference Manual, Rev. 4
156
Freescale Semiconductor
10.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 10-8. MTIM counter overflow example
In the example of
, the selected clock source could be any of the five possible choices. The
prescaler is set to PS = %0010 or divide-by-4. The modulo value in the MTIMMOD register is set to
0xAA. When the counter, MTIMCNT, reaches the modulo value of 0xAA, the counter overflows to 0x00
and continues counting. The timer overflow flag, TOF, sets when the counter value changes from 0xAA
to 0x00. An MTIM overflow interrupt is generated when TOF is set, if TOIE = 1.
selected
clock source
MTIMCNT
MTIM clock
(PS=%0010)
MTIMMOD:
0xA
0xA7
0xA8
0xA9
0xAA
0x00
0x01
TOF
Summary of Contents for HCS08 Series
Page 2: ......
Page 4: ......
Page 8: ......
Page 62: ...Chapter 4 Memory MC9S08JS16 MCU Series Reference Manual Rev 4 62 Freescale Semiconductor...
Page 305: ......