mc68hc05bs8 Freescale Semiconductor, Inc, mc68hc05bs8 Datasheet - Page 51

no-image

mc68hc05bs8

Manufacturer Part Number
mc68hc05bs8
Description
Mc68hc05 Family Of Low-cost Single-chip Microcontrollers.
Manufacturer
Freescale Semiconductor, Inc
Datasheet
OCF - Output Compare Flag
OCF will be set when the Output Compare register contents match that of the free-running
counter; an output compare interrupt will be generated, if OCIE is set. OCF is cleared by reading
the TSR and then the Output Compare Low register ($17).
TOF - Timer Overflow Flag
This bit is set when the free-running counter overflows from $FFFF to $0000; a timer overflow
interrupt will occur, if TOIE (bit 5 in Timer Control register $12) is set. TOF is cleared by reading
the TSR and the counter low register ($19).
When using the timer overflow function and reading the free-running counter at random times to
measure an elapsed time, a problem may occur whereby the timer overflow flag is unintentionally
cleared if:
Reading the alternate counter register instead of the counter register will avoid this potential
problem.
6.1.6
The relationships between the internal clock signals, the counter contents and the status of the
flag bits are shown in the following diagrams. It should be noted that the signals labelled ‘internal’
(processor clock, timer clocks and Reset) are not available to the user.
MC68HC05BS8
1 (set)
0 (clear) –
1 (set)
0 (clear) –
1) the timer status register is read or written when the TOF is set, and
2) the LSB of the free-running counter is read, but not for the purpose of
servicing the flag.
Programmable Timer Timing Diagrams
A valid output compare has occurred on Output Compare register.
No output compare has occurred on Output Compare register.
Timer Overflow has occurred.
No timer overflow has occurred.
TIMERS
TPG
6

Related parts for mc68hc05bs8