Chapter 8: Programmable Interval Timer
Manual Number: 00650-014-4
Page 8-1
Chapter 8: Programmable Interval Timer
The AD12-8 contains a type 8253 programmable counter/timer which allows you to implement
such functions as a Real-Time Clock, Event Counter, Digital One-Shot, Programmable Rate Gener-
ator, Square-Wave Generator, Binary Rate Multiplier, Complex Wave Generator, and/or a Motor
Controller. The 8253 is a flexible but powerful device that consists of three independent, 16-bit,
presettable, down counters. Each counter can be programmed to any count as low as 1 or 2, and up
to 65,535 in binary format, depending on the mode chosen.
On the AD12-8 these three counters are designated Counter #0, Counter #1, and Counter #2. Counter
#0 is un-dedicated, with the gate, output and clock connections fully accessible via the I/O connec-
tor. Counter #1 receives clock inputs from a 1/32 multiple of the high speed computer color oscil-
lator clock (14.31818 MHz). The output of counter #1 is used as the clock for counter #2, thus
counters #1 and #2 are cascaded together to form a 32-bit counter. The output of counter #2 is also
available at the I/O connector, pin 23. If the CLK0 jumper is installed, the output of counter #1 can
be used as an alternate input clock for counter #0. Outputs of counter #2 are used to initiate A/D
conversions if the TMR/EXT jumper is in the TMR position.
Operational Modes
The 8253 modes of operation are described in the following paragraphs to familiarize you with the
versatility and power of this device. For those interested in more detailed information, a full
description of the 8253 programmable interval timer can be found in the Intel (or equivalent manu-
facturers) data sheets. The following conventions apply for use in describing operation of the
8253:
Clock:
A positive pulse into the counters clock input.
Trigger:
A rising edge input to the counters gate input.
Counter Loading: Programming of a binary count into the counter.
Mode 0: Pulse on Terminal Count
After the counter is loaded, the output is set low and will remain low until the counter decrements
to zero. The output then goes high and remains high until a new count is loaded into the counter. A
trigger enables the counter to start decrementing. This mode is commonly used for event counting
with Counter #0.
Mode 1: Retriggerable One-Shot
The output goes low on the clock pulse following a trigger to begin the one-shot pulse and goes
high when the counter reaches zero. Additional triggers result in reloading the count and starting
the cycle over. If a trigger occurs before the counter decrements to zero, a new count is loaded.
Thus, this forms a re-triggerable one-shot. In mode 1, a low output pulse is provided with a period
equal to the counter count-down time.