8254 Timer
8254 Timer
1
09-01-2023
Features of 8253 / 54
It has three independent 16-bit down counters.
It can handle inputs clocks from DC to 10 MHz.
These three counters can be programmed for either
hexadecimal or BCD count.
It is compatible with almost all microprocessors.
8254 has a powerful command called READ BACK command,
which allows the user to check the count value, the
programmed mode, the current mode, and the current status of
the counter.
Each timer may be programmed to operate in one of the six
modes, independent of the mode of operation of the other two
timers.
The timers are software programmable.
Each counter can be programmed separately to divide the
input frequency by a number from 1 to 65536 (216)
2
09-01-2023
3
09-01-2023
Control Register
The control word register is used to program the timers in
different modes and control their operations.
It is selected when A0 and A1 pins are 1,1. If
are low, it accepts information from the data bus buffer
and stores it in control word register.
The word stored in CR controls the operation mode of
each counter, selection of hexadecimal or BCD counting
and loading of each count register.
This register can be written into only; no read operation of
this content is available
Counters
Each of the timers has three pins associated with it. Clock
(CLK) input, gate (GATE) control input and output (OUT).
CLK - This clock input causes the timer to decrement.
Counters operate at HIGH to LOW transition (the negative
edge) of this clock input.
GATE - The gate input pin is used to initiate or enable
counting. The exact effect of the gate signal depends on
which of the six modes of operation is chosen.
OUTPUT- The output pin provides an output from the
timer. Its actual use depends on the mode of operation of
the timer. The counter can be read “on the fly” without
inhibiting gate pulse or clock input.
4
09-01-2023
5
09-01-2023
Modes of 8253
1. Mode 0 – Interrupt on Terminal Count
2. Mode 1 – Programmable Mono shot
3. Mode 2 – Rate Generator
4. Mode 3 – Square wave Generator
5. Mode 4 – S/w triggered Strobe
6. Mode 5 – H/w triggered Strobe
6
09-01-2023
7
09-01-2023
8
09-01-2023
Example 1