TIC-H
OPERATION
(Tl,
Tl COUNT
TZ COUNT
Figure 18. Timer 1 and Timer 2 One-Shot Mode Timing
Timer 1 One-Shot Mode
In the free-running mode, the interrupt flag is set and the
on PB7 is inverted time the
However, instead of continuing to decrement from
zero after time-out, the timer automatically transfers
the contents of the
continues to decrement from there. lt is not
The interval timer one-shot mode
interrupt for Timer load Operation. In addition,
Timer 1 be programmed to produce a
generation of a
negative
a
pulse on
into the
(16
and
to
To generate a
“O”, then either TI L-L
interrupt ACR bits 6 and 7 must be
TIC-L must be written with the
rewrite the timer to enable setting the interrupt flag on the
next time-out. The interrupt flag be cleared by reading
count value.
write to TIC-L is
a
Write to TIL-L). Next, the high-order count value
TIC-L, by writing directly into the flag as will be described
if a new count value is desired by a write to TIC-H.
written to TIC-H, (the value is simultaneously written into
and TIL-L is transferred to TIC-L. Countdown
begins on
following the write TIC-H and decrements
All interval timers in the
are
at the 92 rate. Tl interrupt occurs when the counters
Generation of a negative pulse on PB7 is done
Aewriting the
period. In
if the
will always re-initialize the time-out
the time-out
be prevented completely
in the same
except ACR bit 7 must be a one. PB7
continues to rewrite the timer before it
will go low after a Write TIC-H and go high again when
the counters
Timer
1
will operate in this
if the
writes into the high
However, by loading the
access the timer
only, the
down-counting Operation
The Tl interrupt flag is
a new count)
by either writing TIC-H
by reading TIC-L.
nstead, the
without affecting the time-out in process.
data loaded into the
will determine the length of’
Timing for the one-shot mode is illustrated in Figure 18.
the next time-out period. This capability is
valuable in the free-running mode with the output enabled.
Timer 1 Free-Run Mode
In this mode, the
flag set
rupts with
determine the period of the next half cycle
on PB7 is inverted and the interrupt
time-out. By responding to the
The most important advantage associated with the
data for the
the
in Tl is the ability to produce a continuous series of evenly
spaced interrupts and the ability to produce a
wave
half cycle of the output
very waveforms
an PB7. In this
on PB7 whose frequency is not affected by variations in
be generated. Timing for the
the
interrupt
time. This
accomplished
free-running mode is shown in Figure 19.
in the
mode.
PB7 OUTPUT
Figure 19. Timer 1 Free-Run Mode Timing
Note. A precaution to take when using PB7
bit 7 and ACR bit 7 must be “1” for PB7 to
as a normal output pin, by ORB bit 7.
the timer output concerns the data
Register contents for PB7.
then PB7
as the timer output. If either is a
5 - 2 9