
M68HC11
REFERENCE MANUAL
PULSE ACCUMULATOR
MOTOROLA
11-1
SECTION 11
PULSE ACCUMULATOR
The pulse accumulator, which is similar to the timers in older MC6805 MCUs, is a
much simpler system than the main timer discussed in
SECTION 10 MAIN TIMER
AND REAL-TIME INTERRUPT
. This system is based on an 8-bit counter and can be
configured to operate as a simple event counter or for gated time accumulation. Unlike
the main timer, the 8-bit pulse accumulator counter can be read or written at any time
(the 16-bit counter in the main timer cannot be written). Control bits allow the user to
configure and control the pulse accumulator subsystem. Two maskable interrupts are
associated with the system, each having its own controls and interrupt vector.
The port A bit 7 I/O pin (PA7/PAI/OC1) associated with the pulse accumulator can be
configured to act as a clock (event counting mode) or as a gate signal to enable a free-
running E divided by 64 clock to the 8-bit counter (gated time accumulation mode). The
alternate functions of the pulse accumulator input (PAI) pin present some interesting
application possibilities.
11.1 General Description
The pulse accumulator is an 8-bit counter/timer system that can be configured to op-
erate in either of two basic modes. In the event counting mode, the 8-bit counter is
clocked to increasing values at each active edge of the PAI pin. In the gated time ac-
cumulation mode, the 8-bit counter is clocked by a free-running E divided by 64 clock
subject to the PAI pin being active.
Figure 11-1
is a simplified block diagram of the
pulse accumulator in each of these two possible modes.
Figure 11-1 Pulse Accumulator Operating Modes
Table 11-1
summarizes the important timing periods for the pulse accumulator (when
operating in gated time accumulation mode) for various common crystal rates. The for-
mulas at the bottom of the table can be used for a different crystal frequency than
those shown.
PA7/
PAI/
OC1
PIN
8-BIT COUNTER
PACNT
CLOCK
PA7/
PAI/
OC1
PIN
8-BIT COUNTER
PACNT
CLOCK
E
÷
64 CLOCK
(FROM MAIN TIMER)
PAMOD = 1
GATED-TIME ACCUMULATION MODE
PAMOD = 0
EVENT COUNTING MODE