English
Language : 

MC68HC05J3 Datasheet, PDF (46/92 Pages) Motorola, Inc – High-density Complementary Metal Oxide Semiconductor (HCMOS) Microcomputer Unit
OCF — Output compare flag
1 (set) – A valid output compare has occurred.
0 (clear) – No output compare has occurred.
This bit is set when the output compare register contents match those 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 at $17.
TOF — Timer overflow flag
1 (set) – Timer overflow has occurred.
0 (clear) – No timer overflow has occurred.
This bit is set when the free-running counter overflows from $FFFF to $0000; a timer overflow interrupt
will occur, if TOIE is set. TOF is cleared by reading the TSR and the counter low register, $19.
6
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:
1) the timer status register is read or written when TOF is set and
2) the LSB of the free-running counter is read, but not for the purpose of
servicing the flag.
Reading the alternate counter register instead of the counter register will avoid this potential
problem.
6.2.3 Input capture function
‘Input capture’ is a technique whereby an external signal (connected to the TCAP pin) is used to
trigger a read of the free-running counter. In this way it is possible to relate the timing of an external
signal to the internal counter value, and hence to elapsed time.
6.2.4
Input capture high register
Input capture low register
Input capture high (ICH)
Input capture low (ICL)
Address bit 7
bit 6
bit 5
bit 4
bit 3
bit 2
bit 1
bit 0
State
on reset
$0014 (bit 15)
(bit 8) Undefined
$0015
Undefined
The two 8-bit registers that make up the 16-bit input capture register are read-only, and are used
to latch the value of the free-running counter after the input capture edge detector senses a valid
MOTOROLA
6-6
16-BIT PROGRAMMABLE TIMER
TPG
MC68HC05J3