M68HC11
REFERENCE MANUAL
MAIN TIMER AND REAL-TIME INTERRUPT
MOTOROLA
10-39
before the output-compare match was about to occur. The force mechanism would
toggle the pin once, and as soon as the match occurs, the pin would toggle again,
which is almost certainly not what the user would want to happen. In the same situa-
tion, if the automatic pin action was programmed to set the pin high or clear the pin
low, an actual match just after a force mechanism would order the pin to change to the
state it is already in (same effect as doing nothing).
The following register and bit descriptions explain the output-compare force register
(CFORC).
FOCx — Force Output Compare (x = 1, 2, 3, 4, or 5)
These bits may be used to force an output compare rather than waiting for a match
between the output-compare register and the free-running counter. The automatic pin
actions programmed for the output compare happen as if a match had occurred, but
no interrupt is generated (OCxF is not set). To force one or more output-compare
channels, write to the CFORC register with ones in the bit positions corresponding to
the channels to be forced. The logic-high state of these bits is transitory, and the
CFORC register will never be read as anything other than zero. The force mechanism
is synchronized to the timer counter clock. As many as 16 E-clock cycles could occur
between the write to CFORC and the compare force if the largest prescale factor is set
for the timer system (PR1, PR0 = 1:1 to
÷
16).
10.5 Timing Details For The Main Timer System
The detailed timing information presented is much more detailed than most users will
ever need, but it is given to provide additional insight into the operation of the MCU.
Figure 10-13
shows the details concerning the timer counter as the MCU leaves reset.
During reset, the counter is forced to $FFFF and does not count. As the internal reset
signal is released, the counter begins to count just before the reset vector appears on
the address bus. Although
Figure 10-13
shows the reset vector to be $FFFE,FFFF,
the timing details would be the same if the processor is reset in any mode, including
test and bootstrap modes where the reset vector would be $BFFE,BFFF. The timer
overflow logic is inhibited so that this first $FFFF–$0000 transition does not register as
an overflow.
CFORC —
Timer Compare Force
$100B
BIT 7
FOC1
0
6
5
4
3
2
0
0
1
0
0
BIT 0
0
0
FOC2
0
FOC3
0
FOC4
0
FOC5
0
RESET: