mc68hc908qb4 Freescale Semiconductor, Inc, mc68hc908qb4 Datasheet - Page 185

no-image

mc68hc908qb4

Manufacturer Part Number
mc68hc908qb4
Description
M68hc08 Microcontrollers
Manufacturer
Freescale Semiconductor, Inc
Datasheet
16.8.2 TIM Counter Registers
The two read-only TIM counter registers contain the high and low bytes of the value in the counter.
Reading the high byte (TCNTH) latches the contents of the low byte (TCNTL) into a buffer. Subsequent
reads of TCNTH do not affect the latched TCNTL value until TCNTL is read. Reset clears the TIM counter
registers. Setting the TIM reset bit (TRST) also clears the TIM counter registers.
16.8.3 TIM Counter Modulo Registers
The read/write TIM modulo registers contain the modulo value for the counter. When the counter reaches
the modulo value, the overflow flag (TOF) becomes set, and the counter resumes counting from $0000
at the next timer clock. Writing to the high byte (TMODH) inhibits the TOF bit and overflow interrupts until
the low byte (TMODL) is written. Reset sets the TIM counter modulo registers.
Freescale Semiconductor
Reset:
Reset:
Reset:
Reset:
Read:
Write:
Read:
Write:
Read:
Write:
Read:
Write:
If you read TCNTH during a break interrupt, be sure to unlatch TCNTL by
reading TCNTL before exiting the break interrupt. Otherwise, TCNTL
retains the value latched during the break.
Reset the counter before writing to the TIM counter modulo registers.
Figure 16-7. TIM Counter Modulo High Register (TMODH)
Bit 15
Figure 16-8. TIM Counter Modulo Low Register (TMODL)
Bit15
Bit 7
Bit 7
Bit 7
Bit 7
Bit 7
Bit7
0
0
1
1
Figure 16-5. TIM Counter High Register (TCNTH)
Figure 16-6. TIM Counter Low Register (TCNTL)
= Unimplemented
= Unimplemented
Bit 14
Bit14
Bit 6
Bit6
6
0
6
0
6
1
6
1
MC68HC908QB8 Data Sheet, Rev. 2
Bit 13
Bit13
Bit 5
Bit5
5
0
5
0
5
1
5
1
Bit 12
Bit12
NOTE
NOTE
Bit 4
Bit4
0
0
1
4
4
4
1
4
Bit 11
Bit11
Bit 3
Bit3
3
0
3
0
3
1
3
1
Bit 10
Bit10
Bit 2
Bit2
2
0
2
0
2
1
2
1
Bit 9
Bit 1
Bit9
Bit1
1
0
1
0
1
1
1
1
Bit 0
Bit 8
Bit 0
Bit 0
Bit 0
Bit 0
Bit8
Bit0
0
0
1
1
Registers
185

Related parts for mc68hc908qb4