PIT: Programmable Interval Timer: Introduction To 8253/8254
PIT: Programmable Interval Timer: Introduction To 8253/8254
PIT: Programmable Interval Timer: Introduction To 8253/8254
Timer
Introduction to 8253/8254
8253/54 Timer
Timer Description and Initialization
• PIT (programmable Interval Timer)
• The 8253 chip was used in the IBM PC.
• 8253 and 8254 have exactly the same pinout.
D5 – Same meaning as the bits in the control word for the indicated counter.
D0
Mode 0: interrupt on terminal count
In this mode if GATE = 1, OUT is a square wave where the high pulse is
equal to the low pulse if N is an even number.
• In this case the high part and low part of the pulse have the same
duration and are equal to (N/2)T (50% duty cycle)
• If N is an odd number, the high pulse is one clock pulse longer.
• This mode is widely used as a frequency divider and audio-tone
generator.
Mode 4: software trigger
strobe
•In this mode if GATE = 1, the output will go high upon loading the
count.
• It will stay high for the duration of NT.
• After the count reaches zero (terminal count), 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 again.
• Mode 4 is similar to mode 2, except that the counter is not reloaded
automatically.
• In this mode, the count starts the moment the count is written into the
counter.
Mode 5: hardware trigger
strobe
• This mode is similar to mode 4 except that the trigger must be done
with the GATE input.
• In this mode after the count is loaded, we must send a low-to-high
pulse to the gate to start the counter.