mc68hc908qf4 Freescale Semiconductor, Inc, mc68hc908qf4 Datasheet - Page 149

no-image

mc68hc908qf4

Manufacturer Part Number
mc68hc908qf4
Description
M68hc08 Microcontrollers Microcontroller
Manufacturer
Freescale Semiconductor, Inc
Datasheet
15.9.2 TIM Counter Registers
15.9.3 TIM Counter Modulo Registers
MC68HC908QF4 — Rev. 1.0
MOTOROLA
NOTE:
NOTE:
The two read-only TIM counter registers contain the high and low bytes of the value
in the TIM 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.
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.
The read/write TIM modulo registers contain the modulo value for the TIM counter.
When the TIM counter reaches the modulo value, the overflow flag (TOF) becomes
set, and the TIM 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.
Reset the TIM counter before writing to the TIM counter modulo registers.
Address: $0021
Address: $0022
Address: $0023
Address: $0024
Reset:
Reset:
Reset:
Reset:
Read:
Read:
Read:
Read:
Write:
Write:
Write:
Write:
Freescale Semiconductor, Inc.
Figure 15-7. TIM Counter Modulo Registers (TMODH:TMODL)
For More Information On This Product,
Bit 15
Bit 15
Bit 7
Bit 7
Bit 7
Bit 7
Bit 7
Bit 7
Figure 15-6. TIM Counter Registers (TCNTH:TCNTL)
0
0
1
1
Go to: www.freescale.com
Timer Interface Module (TIM)
TCNTH
TCNTL
= Unimplemented
TMODH
TMODL
Bit 14
Bit 14
Bit 6
Bit 6
6
0
6
0
6
1
6
1
Bit 13
Bit 13
Bit 5
Bit 5
5
0
5
0
5
1
5
1
Bit 12
Bit 12
Bit 4
Bit 4
4
0
4
0
4
1
4
1
Bit 11
Bit 11
Bit 3
Bit 3
3
0
3
0
3
1
3
1
Timer Interface Module (TIM)
Bit 10
Bit 10
Bit 2
Bit 2
2
0
2
0
2
1
2
1
Input/Output Registers
Bit 9
Bit 1
Bit 9
Bit 1
1
0
1
0
1
1
1
1
Data Sheet
Bit 0
Bit 8
Bit 0
Bit 0
Bit 0
Bit 8
Bit 0
Bit 0
0
0
1
1
149

Related parts for mc68hc908qf4