Sei sulla pagina 1di 12

Lab-08

(a) Introduction to 8254 (8253) programmable


interval timer (b) Design and implementation of
traffic controller using 8255 PPI and 8253
programmable interval timer in 8086
microprocessor environment
Intel’s Programmable
Not Counter/ Timer Device
Possible To (8253/8254) Facilitates
Generate • Accurate Time Delays
Accurate • Minimizes Load On Mp
Time • Real Time Clock
Delays • Event Counter
Using Delay • Digital One Shot
Routines in • Square Wave Generator
8086 • Complex Waveform Generator
8254-ADVANCED VERSION OF 8253
8253 • 8254 can operate with higher clock

• 8253 can Frequency Range ( DC To 8 Mhz AND 10 Mhz


operate at FOR 8254-2)
frequency
from dc to • Includes Status Read Back Command That
2mhz Latches The Count And Status Of Counters
Counters:
 Three Counters – C1,C2 & C3
 Each 16 Bit Identical Presettable
 Down Counter Operates In BCD /Hex
 Controlled By Loading Count To Command Word Register
 “On The Fly” Reading

Control Logic:
 CS – Logic 0 – Enables 8254
 RD – Logic 0 – Tells Microprocessor Reads Count From 8254
 WR – Logic 0 – Tells Microprocessor Writes Count/ Command
Into 8254
 A1,a0 – Address Input Pins To Select Modes And Counters
Data Buffers:
 8 Bit Bidirectional D0-d7 Connected To Data Bus Of Microprocessor

 In  Reads Data From Peripheral

 Out  Writes Data To Peripheral

Control Word Register:


 Accepts 8 Bit Control Word Written By Microprocessor

 Can Only Be Written ( Not Read)

 Control Word Chooses One Of The Six Modes Of Operation


MDA Win 8086 Trainer Kit Port Address

For 8254 For 8255


Port Port Name Port Address Port Name
Address
19H Port A
09H Counter 0
1BH Port B
0BH Counter 1
1DH Port C
0DH Counter 2
0FH Control register 1FH Control register
Traffic Signal Flow diagram

G3 Y3 R3
Road 1 G1 Y1 R1

Road 3 Road 4

Road 2
G2 Y2 R2 G4 Y4 R4
Traffic signal generating Coding Table

PA7 PA6 PA5 PA4 PA3 PA2 PA1 PB7 PB6 PB5 PB4 PB3 PB2 PB1
PA0 PB0
0 0 G2 Y2 R2 G1 Y1 R1 0 0 G4 Y4 R4 G3 Y3 R3
R1 R2 G3 G4 0 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0
= 09H =24H
Y1 Y2 Y3 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0
Y4 = 12H = 12H
R3 R4 G1 G2 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 1
= 24H = 09H
Y1 Y2 Y3 0 0 0 0 1 0 1 0 0 0 0 1 0 0 1 0
Y4 = 12H = 12H
Control Word
For Load Operation
D7 D6 D5 D4 D3 D2 D1 D0
0 1 1 1 0 0 0 0
For Latching
D7 D6 D5 D4 D3 D2 D1 D0
0 1 0 0 0 0 0 0
Control word for 8255
D7 D6 D5 D4 D3 D2 D1 D0
1 0 0 0 0 0 0 0

Potrebbero piacerti anche