Microprocessor Interfacing Microprocessor Interfacing & Application & Application

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

Microprocessor Interfacing

& Application
8254 – Programmable Interval
Timer
8254
l The Intel 8254 is a counter/timer device
designed to solve the common timing
control problems in microcomputer system
design.
l It provides three independent 16-
16-bit
counters, each capable of handling clock
inputs up to 10 MHz.
l All modes are software programmable
Pin
Configuration
Pin Description
Question
l Of the following circuit identify the system
addresses for Counter 0, Counter 1, Counter 2
and Control Word Register.
Question
l Of the following circuit identify the system
addresses for Counter 0, Counter 1, Counter 2
and Control Word Register.
Question
l You are required to design a IO decoder
circuit for 8254 in a 8085 microprocessor
based system. The addresses are Counter
0: B4H, Counter 1:B5H, Counter 2: B6H
and Control Word Register.
Question
l You are required to design a IO decoder
circuit for 8254 in a 8085 microprocessor
based system. The addresses are Counter
0: B4H, Counter 1:B5H, Counter 2: B6H
and Control Word Register: B7H.
Question
l You are required to design a IO decoder
circuit for 8254 in a 8085 microprocessor
based system. The addresses are Counter
0: 98H, Counter 1:B8H, Counter 2: D8H
and Control Word Register: F8H.
Internal
Structure
Operational
Description
l After power-
power-up, the state of the 8254 is
undefined.
l The Mode, count value, and output of all
Counters are undefined.
l How each Counter operates is determined when
it is programmed.
l Each Counter must be programmed before it can
be used.
l Unused counters need not be programmed.
Programming
l Counters are programmed by writing a
Control Word and then an initial count.
l The Control Words are written into the
Control Word Register, which is selected
when A1,A0 = 11.
l The Control Word itself specifies which
Counter is being programmed.
Programming
Programming
l The programming procedure for the 8254 is very
flexible. Only two conventions need to be remembered:
l 1) For each Counter, the Control Word must be written
before the initial count is written.
l 2) The 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).
Read
Operations
l It is often desirable to read the value of a Counter
without disturbing the count in progress. This is easily
done in the 8254.
l There are three possible methods for reading the
counters: a simple read operation, the Counter Latch
Command, and the Read-Read-Back Command.
l The first method is to perform a simple read operation.
To read the Counter, which is selected with the A1, A0
inputs, the CLK input of the selected Counter must be
inhibited by using either the GATE input or external
logic. Otherwise, the count may be in the process of
changing when it is read, giving an undefined result.
Read
Operations
l Counter Latch Command – used to read value from the
Counting Element and load it into the Output Latch
Register. The value is then read by using the counter
address
Read-Back
Read-
Command
l Read-Back Command
Read-
l This command allows the user to check
the count value, programmed Mode, and
current states of the OUT pin and Null
Count flag of the selected counter(s).
Read-Back
Read-
Command
l The following register is Control Word Register. Place
/COUNT = 0 will load value from the Counting Element
and into the Output Latch Register. The value is then
read by using the counter address
Read-Back
Read-
Command
l /Status = 0, read status of each counter. The following
register is the status register that available for each
counter. After latch then the read operation can be done
using the Counter’s address.

You might also like