Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Introduction:
Peripheral devices provide interface between the CPU and slow
electromechanical devices
Previously, all these devices were taken care of by the CPU using
interrupt mechanism or polling techniques, which results in reduced
overall efficiency and low processing speed
To minimize the slow speed I/O communication overhead, a set of
dedicated programmable peripheral devices have been introduced
Thus once initiated by the CPU, these devices take care of all the interface
activities , and thus makes the CPU free from the interface activities and
execute its main task more efficiently.
Advanced Microprocessor
At the end of the count, it generates a pulse that can be used to interrupt the
CPU.
The counter can count either in binary or BCD.
In addition, a count can be read by the CPU while the counter is decrementing.
FEATURES:
Three independent 16-bit down counters.
Each with maximum count rate of 2.6 MHz .
Three counters are identical presettable, down counters and can be
programmed for either binary or BCD count.
Counter can be programmed in six different modes.
Compatible with all Intel and most other microprocessors.
FEATURES:
8254 has powerful command called READ BACK command which allows the
user to check the count value, programmed mode and current mode and
current status of the counter.
Architecture and signal descriptions:
Three independent 16-bit counters, all these counters may be independently
controlled by programming the 3 internal command word registers, thus possible
to generate 3 totally independent delays or maintain 3 independent counters
simultaneously.
It has 8-bit, bidirectional data buffer interfaces internal circuit of 8253 to
microprocessor system bus.
Data is transmitted or received by the buffer upon the execution of IN (reads data)
or OUT(writes data to a peripheral) instruction.
Read/write logic controls the direction of the data buffer depending upon whether
it is read or write operation.
Advanced Microprocessor
I/O Interface
8254 Functional Description
Advanced Microprocessor
Advanced Microprocessor
Fig. above shows the block diagram of 8253/54. It includes three counters, a data
bus buffer, Read/Write control logic, and a control register.
Each counter has two input signals CLOCK and GATE and one output signal
OUT.
CLK: The clock input is the timing source for each of the internal counters. It is often connected to
the PCLK signal from the bus controller.
GATE: The gate input controls the operation of the counter in some modes.
OUT: A counter output where the wave-form generated by the timer is available.
Advanced Microprocessor
Read/Write Logic :
The Read/Write logic has five signals : RD,WR,CS and the address lines A0 and
A1.
In the peripheral I/O mode, the RD, and WR signals are connected to IOR and
IOW, respectively.
In memory-mapped I/O, these are connected to MEMR and MEMW.
Address lines A0 and A1 of the CPU are usually 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 and A1.
Advanced Microprocessor
Read/Write Logic :
A low on CS line enables the 8253. No operation will be performed by 8253 till it
is enabled. Table below shows the selected operations for various inputs of 8253:
CS RD
WR
A1
A0
selected operation
0
1
0
0
0
write counter 0
0
1
0
0
1
write counter 1
0
1
0
1
0
write counter 2
0
1
0
1
1
write control word
0
0
1
0
0
read counter 0
0
0
1
0
1
read counter 1
0
0
1
1
0
read counter 2
0
0
1
1
1
no operation
0
1
1
x
x
no operation
1
X
x
x
x
disabled
Advanced Microprocessor
Advanced Microprocessor
10
Operational Description:
The complete functional definition of the 8253/54 is programmed by the system
software. Once programmed, the 8253/54 is ready to perform whatever timing
tasks it is assigned to accomplish.
Programming the 8253/54 :
Each counter of the 8253/54 is individually programmed by writing a control
word into the control word register (A0 -A1 = 11).
The Fig. shows the control word format.
Bits SC1 and SC0 select the counter, bits RW1 and RW0 select the read, write or
latch command, bits M2,M1 and M0 select the mode of operation and bit BCD
decides whether it is a BCD counter or binary counter.
The complete functional definition of the 8253/54 is programmed by the system
software.
Once programmed, the 8253/54 is ready to perform whatever timing tasks it is
assigned to accomplish.
Advanced Microprocessor
11
Advanced Microprocessor
12
Advanced Microprocessor
13
Advanced Microprocessor
14
15