|
MC68HC05J3 Datasheet, PDF (46/92 Pages) Motorola, Inc – High-density Complementary Metal Oxide Semiconductor (HCMOS) Microcomputer Unit | |||
|
◁ |
OCF â Output compare ï¬ag
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 overï¬ow ï¬ag
1 (set) â Timer overï¬ow has occurred.
0 (clear) â No timer overï¬ow has occurred.
This bit is set when the free-running counter overï¬ows from $FFFF to $0000; a timer overï¬ow 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 overï¬ow function and reading the free-running counter at random times to
measure an elapsed time, a problem may occur whereby the timer overï¬ow ï¬ag 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 ï¬ag.
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) Undeï¬ned
$0015
Undeï¬ned
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
|
▷ |