Sei sulla pagina 1di 10

MICROPROCESSOR

8254 IC
MUHAMMAD HASHIR SIDDIQUI (41594)
WED-THU 830-1000
8254 PROGRAMMABLE INTERVAL TIMER

 24 pin IC
 D0-D7 Data lines
 A0-A1
 RD,WR and CS(Chip select)
 3 programmable 16 bits counters
 Each counter have 3 pins
 CLK
 GATE
 OUT
COUNTER PINS

 CLK: It is an input pin that provides basic operating frequency.


 GATE: It is also an input pins, in some modes it is use to control timer
 OUT: It is an output pin, it gives us output of the timer
Address Inputs

 A0-A1 are the 2 Address inputs to select one of the four internal registers of 8254.

A0 A1 Function

0 0 Counter 0

0 1 Counter 1

1 0 Counter 2

1 1 Control word
Control Word

 Control word allows programmer to select the counter(0-2), mode of


operation(0-5) and type of operation(writer/read).
 Control word also selects binary or BCD count.
 Each counter may be programmed with count of 1 - FFFFH or 0 - FFFFH+1
(65,536D)
Control Word for 8254
BCD Bit

 BCD = 1 ; Control word uses BCD Count.


 BCD = 0 ; Control word uses Binary Count.

Decimal BCD Binary


5 0000 0101 101
10 0001 0000 1010
15 0001 0101 1111
20 0010 0000 10100
25 0010 0101 11001
Selection of Modes of Operations(000-101)

 M2 M1 M0 selects one of the 6 modes for the counter.

M2 M1 M0 Mode
0 0 0 0
0 0 1 1
0 1 0 2
0 1 1 3
1 0 0 4
1 0 1 5
RW1 & RW0

 RW1 and RW0 bits determine how data is read or write for the counter.

RW1 RW2 CONTROL


0 0 Counter latch command
0 1 Read/write least significant byte only.
1 0 Read/write most significant byte only
1 1 Read/write from most to least significant byte
Select Counter

 SC1 or SC0 bits selects a counter or special read-back operation.

SC1 SC0 Operation


0 0 Counter 0
0 1 Counter 1
1 0 Counter 2
1 1 Read-Back Operation

Potrebbero piacerti anche