English
Language : 

MC68HC908QC16_07 Datasheet, PDF (198/274 Pages) Freescale Semiconductor, Inc – Microcontrollers
Timer Interface Module (TIM1)
Bit 7
6
5
4
3
Read: TOF
0
0
TOIE TSTOP
Write: 0
TRST
Reset: 0
0
1
0
0
= Unimplemented
2
1
Bit 0
PS2
PS1
PS0
0
0
0
Figure 16-4. TIM1 Status and Control Register (T1SC)
TOF — TIM1 Overflow Flag Bit
This read/write flag is set when the counter reaches the modulo value programmed in the TIM1 counter
modulo registers. Clear TOF by reading the T1SC register when TOF is set and then writing a 0 to
TOF. If another TIM1 overflow occurs before the clearing sequence is complete, then writing 0 to TOF
has no effect. Therefore, a TOF interrupt request cannot be lost due to inadvertent clearing of TOF.
Writing a 1 to TOF has no effect.
1 = Counter has reached modulo value
0 = Counter has not reached modulo value
TOIE — TIM1 Overflow Interrupt Enable Bit
This read/write bit enables TIM1 overflow interrupts when the TOF bit becomes set.
1 = TIM1 overflow interrupts enabled
0 = TIM1 overflow interrupts disabled
TSTOP — TIM1 Stop Bit
This read/write bit stops the counter. Counting resumes when TSTOP is cleared. Reset sets the
TSTOP bit, stopping the counter until software clears the TSTOP bit.
1 = Counter stopped
0 = Counter active
NOTE
Do not set the TSTOP bit before entering wait mode if the TIM1 is required
to exit wait mode. Also, when the TSTOP bit is set and the timer is
configured for input capture operation, input captures are inhibited until the
TSTOP bit is cleared.
When using TSTOP to stop the timer counter, see if any timer flags are set.
If a timer flag is set, it must be cleared by clearing TSTOP, then clearing the
flag, then setting TSTOP again.
TRST — TIM1 Reset Bit
Setting this write-only bit resets the counter and the TIM1 prescaler. Setting TRST has no effect on
any other timer registers. Counting resumes from $0000. TRST is cleared automatically after the
counter is reset and always reads as 0.
1 = Prescaler and counter cleared
0 = No effect
NOTE
Setting the TSTOP and TRST bits simultaneously stops the counter at a
value of $0000.
MC68HC908QC16 • MC68HC908QC8 • MC68HC908QC4 Data Sheet, Rev. 3
198
Freescale Semiconductor