Timer Interface
Timer Interface
2
8253 Block Diagram
3
Pin Description
• Clock: This is the clock input for the counter. The counter
is 16 bits.
– The maximum clock frequency is 1 / 380 nanoseconds or
2.6 megahertz. The minimum clock frequency is DC or
static operation.
• Out: This single output line is the signal that is the final
programmed output of the device.
– Actual operation of the out line depends on how the
device has been programmed.
• Gate: This input can act as a gate for the clock input line,
or it can act as a start pulse, depending on the
programmed mode of the counter.
4
Counter Features
• Each counter is identical, and each consists of a 16-bit,
pre-settable, down counter.
6
Control Word Register
• This internal register is used to write information to, prior
to using the device.
8
Different uses of the 8253 gate input pin
This table shows the different uses of the 8253 gate input pin.
Each mode of operation for the counter has a different use for the GATE input pin.
Timer Modes - Mode 0
• Interrupt on Terminal Count
• The output will stay a logical 1 until the counter is reloaded with a
new value or the same value or until a mode word is written to the
device.
• Once the counter starts counting down, the GATE input can disable
the internal counting by setting the GATE to a logical 0.
10
Timer Modes - Mode 1
• Programmable One-Shot
• If the trigger occurs during the pulse output, the 8253 will
be retriggered again.
12
Timer Modes - Mode 2
• Rate Generator
• The OUT pin of the counter goes to low for one input
clock period.
14
Timer Modes - Mode 2
• For example, suppose to get an output frequency of 1,000 Hz, the
period would be 1 / 1,000 s = 1 ms or 1,000 µs.
15
Timer Modes - Mode 3
• Square Wave Generator
17
Timer Modes - Mode 4
• Software Triggered Strobe