MC68HC05F8
MOTOROLA
6-7
TIMERS
6
ICF - Input Capture Flag
1 (set)
–
A valid input capture has occurred.
0 (clear) –
No input capture has occurred.
This bit is set when the selected polarity of edge is detected by the input capture edge detector;
an input capture interrupt will be generated, if ICIE is set, ICF is cleared by reading the TSR and
then the Input Capture Low register ($1B)
OCF - Output Compare Flag
1 (set)
–
A valid output compare has occurred on output compare register.
0 (clear) –
No output compare has occurred on output compare register.
OCF will be set when its 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 ($1D).
TOF - Timer Overow Flag
1 (set)
–
Timer Overow has occurred.
0 (clear) –
No timer overow has occurred.
This bit is set when the free-running counter overows from $FFFF to $0000; a timer overow
interrupt will occur, if TOIE (bit 5 in Timer Control register $18) is set. TOF is cleared by reading
the TSR and the Counter Low register ($1F).
When using the timer overow function and reading the free-running counter at random times to
measure an elapsed time, a problem may occur whereby the timer overow ag is unintentionally
cleared if:
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 ag.
Reading the alternate counter register instead of the counter register will avoid this potential
problem.
6.1.6
Programmable Timer Timing Diagrams
The relationships between the internal clock signals, the counter contents and the status of the
ag 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.
The
timing
diagrams
are
for
a
timer
clock
frequency
of
internal
bus
clock
÷4;
TCSA0=TCSA1=0.
TPG
53
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
I
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com
n
c
..
.
F
re
e
sc
a
le
S
e
m
ic
o
n
d
u
c
to
r,
In
c
..
.
Freescale Semiconductor, Inc.
For More Information On This Product,
Go to: www.freescale.com