Rohini 83704014962
Rohini 83704014962
Rohini 83704014962
8253 8254
Reads and writes of the same counter Reads and writes of the same counter
cannot be interleaved. can be interleaved.
8254 Architecture:
In the above figure, there are three counters, a data bus buffer, Read/Write control logic,
and a control register. Each counter has two input signals - CLOCK & GATE, and one
output signal - OUT.
Data Bus Buffer
It is a tristate, bi-directional, 8-bit buffer, which is used to interface the 8253/54 to
the system data bus. It has three basic functions −
Programming the modes of 8253/54.
Loading the count registers.
Reading the count values.
Read/Write Logic
It includes 5 signals, i.e. RD, WR, CS, and the address lines A0 & A1. In the
peripheral I/O mode, the RD and WR signals are connected to IOR and IOW,
respectively. In the memory mapped I/O mode, these are connected to MEMR and
MEMW. Address lines A0 & A1 of the CPU are connected to lines A0 and A1 of the
8253/54, and CS is tied to a decoded address. The control word register and counters are
selected according to the signals on lines A0 & A1.
A
A0 Result
1
0 0 Counter 0
0 1 Counter 1
1 0 Counter 2
Control Word
1 1
Register
X X No Selection
A1 A0 RD WR CS Result
0 0 1 0 0 Write Counter 0
0 1 1 0 0 Write Counter 1
1 0 1 0 0 Write Counter 2
0 0 0 1 0 Read Counter 0
0 1 0 1 0 Read Counter 1
1 0 0 1 0 Read Counter 2
1 1 0 1 0 No operation
X X 1 1 0 No operation
X X X X 1 No operation
Counters
Each counter consists of a single, 16 bit-down counter, which can be operated in
either binary or BCD. Its input and output is configured by the selection of modes stored
in the control word register. The programmer can read the contents of any of the three
counters without disturbing the actual count in process.