![NXP Semiconductors MC9S08LG16 Reference Manual Download Page 333](http://html1.mh-extra.com/html/nxp-semiconductors/mc9s08lg16/mc9s08lg16_reference-manual_1721837333.webp)
Chapter 15 Modulo Timer (S08MTIMV1)
MC9S08LG32 MCU Series, Rev. 5
Freescale Semiconductor
333
17.3.2.3
MTIM Counter Register (MTIMCNT)
MTIMCNT is the read-only value of the current MTIM count of the 8-bit counter.
Table 17-3. MTIMCLK Field Descriptions
Field
Description
7:6
Unused register bits, always read 0.
5:4
CLKS
Clock Source Select
— These two read/write bits select one of four different clock sources as the input to the
MTIM prescaler. Changing the clock source while the counter is active does not clear the counter. The count
continues with the new clock source. Reset clears CLKS to 000.
00
Encoding 0. Bus clock (BUSCLK)
01
Encoding 1. Fixed-frequency clock (XCLK)
10
Encoding 3. External source (TPMCLK pin), falling edge
11
Encoding 4. External source (TPMCLK pin), rising edge
All other encodings default to the bus clock (BUSCLK).
3:0
PS
Clock Source Prescaler
— These four read/write bits select one of nine outputs from the 8-bit prescaler. Changing
the prescaler value while the counter is active does not clear the counter. The count continues with the new
prescaler value. Reset clears PS to 0000.
0000 Encoding 0. MTIM clock source
÷
1
0001 Encoding 1. MTIM clock source
÷
2
0010 Encoding 2. MTIM clock source
÷
4
0011 Encoding 3. MTIM clock source
÷
8
0100 Encoding 4. MTIM clock source
÷
16
0101 Encoding 5. MTIM clock source
÷
32
0110 Encoding 6. MTIM clock source
÷
64
0111 Encoding 7. MTIM clock source
÷
128
1000 Encoding 8. MTIM clock source
÷
256
All other encodings default to MTIM clock source
÷
256.
7
6
5
4
3
2
1
0
R
COUNT
W
Reset:
0
0
0
0
0
0
0
0
Figure 17-6. MTIM Counter Register (MTIMCNT)
Table 17-4. MTIMCNT Field Descriptions
Field
Description
7:0
COUNT
MTIM Count
— These eight read-only bits contain the current value of the 8-bit counter. Writes have no effect to
this register. Reset clears the count to $00.
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: ......