programmable interval timer - 8254

36
Programmable Interval Timer - 8254 Prepared By: Prof. M. B. Salunke SITS, Narhe, Pune - 41. E-mail: [email protected]

Upload: freya-hardy

Post on 31-Dec-2015

149 views

Category:

Documents


4 download

DESCRIPTION

Programmable Interval Timer - 8254. Prepared By: Prof. M. B. Salunke SITS, Narhe, Pune - 41. E-mail: [email protected]. Features. Three Independent 16-Bit Counters, Clock input upto 10 MHz, Status Read-Back Command, Six Programmable Counter Modes, Binary or BCD Counting, - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Programmable Interval Timer - 8254

Programmable Interval Timer - 8254

Prepared By:Prof. M. B. Salunke

SITS, Narhe, Pune - 41.

E-mail: [email protected]

Page 2: Programmable Interval Timer - 8254

Features

• Three Independent 16-Bit Counters,

• Clock input upto 10 MHz,

• Status Read-Back Command,

• Six Programmable Counter Modes,

• Binary or BCD Counting,

• Single +5V Supply,

• Superset of PIT-8253.

Page 3: Programmable Interval Timer - 8254

Pin Diagram

Page 4: Programmable Interval Timer - 8254

Pin Description

Page 5: Programmable Interval Timer - 8254

Block Diagram of 8254

Page 6: Programmable Interval Timer - 8254

• Count Register (CR) to store count (CRL & CRM),

• Counting elements (CE) are used for counting,• Output Latch (OLL & OLM) to latch the count

in CE,• The Control Word Register is not part of the

Counter itself, but its contents determine how the Counter operates.

• The status register, when latched, contains the current contents of the Control Word Register and status of the output and null count flag.

Internal Blocks of Counter

Page 7: Programmable Interval Timer - 8254

Internal Block Diagram

Page 8: Programmable Interval Timer - 8254

System Interface

Page 9: Programmable Interval Timer - 8254

Control Word format

8254 Programming• Each counter is individually programmed by writing a control

word, followed by the initial count. • The control word allows the programmer to select the counter,

mode of operation, binary or BCD count and type of operation (read/write).

Page 10: Programmable Interval Timer - 8254

WRITE Operation

• Control Word to Control register

• Initial count must follow the count format specified in the Control Word (least significant byte only, most significant byte only, or least significant byte and then most significant byte).

Page 11: Programmable Interval Timer - 8254

READ Operation

Three Possible Methods to read counters

• Simple Read Operation,

• Counter Latch Command,

• Read Back Command.

Note: Two I/O read operations have to be performed to get first Lower Byte and then higher byte of count.

Page 12: Programmable Interval Timer - 8254

Simple Read Operation:After inhibiting counter using GATE or CLK input we can read count

Counter Latch Command:

D5 D4 = 0 0 Designates the counter latch command

SC1 SC2 = Specify counter to be latched.

X – Don’t care bits must be 0 to ensure compatibility with future Intel products.

Page 13: Programmable Interval Timer - 8254

Read Back Command:

Page 14: Programmable Interval Timer - 8254

Status Byte

Page 15: Programmable Interval Timer - 8254

Read-back command example

Page 16: Programmable Interval Timer - 8254

Valid sequence for read and write of the same

counter set for two byte count:

1. Read least significant byte,

2. Write new least significant byte,

3. Read most significant byte,

4. Write new most significant byte.

Interleaved Read and Write Operations:

Page 17: Programmable Interval Timer - 8254

Modes of 8254

Six Different Modes• Mode 0: Interrupt On Terminal Count• Mode 1: Hardware Retriggerable One-shot • Mode 2: Rate Generator• Mode 3: Square Wave Mode• Mode 4: Software Triggered Strobe• Mode 5: Hardware Triggered Strobe

(Retriggerable)

Page 18: Programmable Interval Timer - 8254

MODE 0 – Interrupt on Terminal Count

N : Undefined Count

Page 19: Programmable Interval Timer - 8254
Page 20: Programmable Interval Timer - 8254

MODE 1: Hardware Retriggerable One Shot.

Page 21: Programmable Interval Timer - 8254
Page 22: Programmable Interval Timer - 8254

MODE 2: Rate Generator

Page 23: Programmable Interval Timer - 8254
Page 24: Programmable Interval Timer - 8254

MODE 3: Square Wave Mode

Page 25: Programmable Interval Timer - 8254
Page 26: Programmable Interval Timer - 8254

MODE 4: Software Triggered Strobe

Page 27: Programmable Interval Timer - 8254
Page 28: Programmable Interval Timer - 8254

MODE 5 : Hardware Triggered Strobe (Retriggerable)

Page 29: Programmable Interval Timer - 8254
Page 30: Programmable Interval Timer - 8254
Page 31: Programmable Interval Timer - 8254
Page 32: Programmable Interval Timer - 8254

Minimum & Maximum Initial Count

Page 33: Programmable Interval Timer - 8254

Gate Pin Operations Summery

Page 34: Programmable Interval Timer - 8254

Applications of 8254

• Real time clock• Event-counter• Digital one-shot• Programmable rate generator• Square wave generator• Binary rate multiplier• Complex waveform generator• Complex motor controller

Page 35: Programmable Interval Timer - 8254

References

• Microprocessors and Interfacing by Douglas V. Hall, TMH Publication.

• Intel 8254 data sheet (www.datasheetcatalog.com)

Page 36: Programmable Interval Timer - 8254