KEMBAR78
8254 Timer | PDF | Digital Electronics | Manufactured Goods
0% found this document useful (0 votes)
111 views12 pages

8254 Timer

The 8254 timer has 3 independent 16-bit counters that can be programmed in 6 different modes for counting in binary or BCD. It has a read back command that allows checking the count value, programmed mode, current mode, and status. Each counter has inputs for a clock, gate, and output and is programmed via a control word to select the operating mode and count value. The 6 modes determine how the counter and output respond to the clock and gate signals.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
111 views12 pages

8254 Timer

The 8254 timer has 3 independent 16-bit counters that can be programmed in 6 different modes for counting in binary or BCD. It has a read back command that allows checking the count value, programmed mode, current mode, and status. Each counter has inputs for a clock, gate, and output and is programmed via a control word to select the operating mode and count value. The 6 modes determine how the counter and output respond to the clock and gate signals.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

8254 Timer

Features of 8254 Timer


It has 3 independent 16 bit down counters.
Counters can be programmed in 6 different modes.
Counting facility in both BCD and Binary number systems.
It 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.
Operating frequency range is
For 8253:- upto 2.6 MHz
For 8254:- upto 10 MHz
8254 Functional Description

 Figure shows the pin-out of the 8254,


a higher-speed version of the 8253, and a diagram
of one of the three counters.
 Each timer contains:
 a CLK input which provides the basic operating frequency
to the timer
 a gate input pin which controls the timer in some modes
 an output (OUT) connection to obtain the output
of the timer
8254 Control word
8254 Programming

 Each counter may be programmed with a count of 1 to FFFFH.


 Minimum count is 1 all modes except 2 and 3 with minimum count of 2.
 Each counter has a program control word used to select the way the
counter operates.
 If two bytes are programmed, then the first byte (LSB) stops the count, and the
second byte (MSB) starts the counter with the new count.
 Mode 0: Interrupt on terminal count

- The output becomes a logic 0 when the control


word is written
- and remains there until N plus the number of
programmed counts
MODE 1:- HW triggered / programmable one shot.
The triggering must be done through the GATE input by sending a
0-to-1 pulse to it.

Steps: 1) Load the count register


2) A 0-to-1 pulse must be sent to the GATE
input to trigger the count.
3) In Mode 1, after sending the 0-to-1 pulse to GATE, OUT
becomes low and stays low for a duration of N*T, then
becomes high and stays high until the GATE is triggered
again.
4) If during the activation, a retriggered happened, then restart
the down counting.
Mode 2: Rate Generator (Divide-by-N
 counter
In Mode2, if GATE=1, OUT will be high for N*T, goes low only for
one clock pulse, then counter is reloaded automatically,
 The cycle is repeated until reprogrammed or G pin set to 0.
Mode 3: Square wave rate generator

 Mode 3: Generates a continuous square-wave with G set to 1.


 If count is even, 50% duty cycle otherwise OUT is high 1 cycle
longer
Mode 4: Software triggered strobe
 In Mode4, if GATE=1, the output will go high when loading the
count, it will stay high for duration N*T.
 After the count reaches zero, it becomes low for one clock pulse,
then goes high again and stays high until a new command word
or new count is loaded
 To repeat the strobe, the count must be reloaded
Mode 5: Hardware triggered strobe

 Similar to Mode4, except that the triggering must be


done with the GATE input
 The count starts only when a 0-to-1 pulse is sent to the
GATE input
 If GATE retriggered during the counting, it will restart
the down counting

You might also like