English
Language : 

MC68HC05J3 Datasheet, PDF (48/92 Pages) Motorola, Inc – High-density Complementary Metal Oxide Semiconductor (HCMOS) Microcomputer Unit
(locations) if the MSB is written first. A write made only to the LSB will not inhibit the compare
function. The processor can write to either byte of the output compare register without affecting
the other byte. The output level (OLV) bit is clocked to the output level register whether the output
compare flag (OCF) is set or clear. The minimum time required to update the output compare
register is a function of the program rather than the internal hardware. Because the output
compare flag and the output compare register are not defined at power on, and not affected by
reset, care must be taken when initialising output compare functions with software. The following
procedure is recommended:
1) write to output compare high to inhibit further compares;
2) read the timer status register to clear OCF (if set);
3) write to output compare low to enable the output compare function.
All bits of the output compare register are readable and writable and are not altered by the timer
hardware or reset. If the compare function is not needed, the two bytes of the output compare
6
register can be used as storage locations.
6.3
Timer during WAIT mode
In WAIT mode all CPU action is suspended, but the programmable timer continues counting. An
interrupt from an input capture, an output compare or a timer overflow, if enabled, will cause the
processor to exit WAIT mode.
6.4
Timer during STOP mode
In the STOP mode all MCU clocks are stopped, hence the timer stops counting. If STOP is exited
by an interrupt the counter retains the last count value. If the device is reset, then the counter is
forced to $FFFC. During STOP, if at least one valid input capture edge occurs at the TCAP pin, the
input capture detect circuit is armed. This does not set any timer flags nor wake up the MCU. When
the MCU does wake up, however, there is an active input capture flag and data from the first valid
edge that occurred during the STOP period. If the device is reset to exit STOP mode, then no input
capture flag or data remains, even if a valid input capture edge occurred.
6.5
Timer state diagrams
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.
MOTOROLA
6-8
16-BIT PROGRAMMABLE TIMER
TPG
MC68HC05J3