In
computing
Computing is any goal-oriented activity requiring, benefiting from, or creating computer, computing machinery. It includes the study and experimentation of algorithmic processes, and the development of both computer hardware, hardware and softw ...
and in
embedded system
An embedded system is a specialized computer system—a combination of a computer processor, computer memory, and input/output peripheral devices—that has a dedicated function within a larger mechanical or electronic system. It is e ...
s, a programmable interval timer (PIT) is a
counter that generates an output signal when it reaches a programmed count. The output signal may trigger an
interrupt
In digital computers, an interrupt (sometimes referred to as a trap) is a request for the processor to ''interrupt'' currently executing code (when permitted), so that the event can be processed in a timely manner. If the request is accepted ...
.
Common features
PITs may be one-shot or periodic. One-shot timers will signal only once and then stop counting. Periodic timers signal every time they reach a specific value and then restart, thus producing a signal at periodic intervals. Periodic timers are typically used to invoke activities that must be performed at regular intervals.
Counters are usually programmed with fixed intervals that determine how long the counter will count before it will output a signal.
IBM PC compatible
The
Intel 8253 PIT was the original timing device used on
IBM PC compatible
An IBM PC compatible is any personal computer that is hardware- and software-compatible with the IBM Personal Computer (IBM PC) and its subsequent models. Like the original IBM PC, an IBM PC–compatible computer uses an x86-based central p ...
s. It used a 1.193182
MHz
The hertz (symbol: Hz) is the unit of frequency in the International System of Units (SI), often described as being equivalent to one event (or cycle) per second. The hertz is an SI derived unit whose formal expression in terms of SI base u ...
clock signal
In electronics and especially synchronous digital circuits, a clock signal (historically also known as ''logic beat'') is an electronic logic signal (voltage or current) which oscillates between a high and a low state at a constant frequency and ...
(one third of the
color burst
Colorburst is an analog and composite video signal generated by a video-signal generator used to keep the chrominance subcarrier synchronized in a color television signal. By synchronizing an oscillator with the colorburst at the back porc ...
frequency used by
NTSC
NTSC (from National Television System Committee) is the first American standard for analog television, published and adopted in 1941. In 1961, it was assigned the designation System M. It is also known as EIA standard 170.
In 1953, a second ...
, one twelfth of the system clock
crystal oscillator
A crystal oscillator is an electronic oscillator Electrical circuit, circuit that uses a piezoelectricity, piezoelectric crystal as a frequency selective surface, frequency-selective element. The oscillator frequency is often used to keep trac ...
, therefore one quarter of the 4.77 MHz CPU clock) and contains three timers. Timer 0 is used by
Microsoft Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
(uniprocessor) and
Linux
Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
as a system timer, timer 1 was historically used for
dynamic random access memory
Dynamics (from Greek δυναμικός ''dynamikos'' "powerful", from δύναμις ''dynamis'' " power") or dynamic may refer to:
Physics and engineering
* Dynamics (mechanics), the study of forces and their effect on motion
Brands and ente ...
refreshes and timer 2 for the
PC speaker
A PC speaker is a loudspeaker built into some IBM PC compatible computers. The first IBM Personal Computer, model 5150, employed a standard 2.25 inch magnetic driven (dynamic) speaker. More recent computers use a tiny moving-iron or pie ...
.
The
LAPIC in newer Intel systems offers a higher-resolution (one microsecond) timer.
[Uwe Walter, Vincent Oberl]
μ-second precision timer support for the Linux kernel
/ref> This is used in preference to the PIT timer in Linux kernel
The Linux kernel is a Free and open-source software, free and open source Unix-like kernel (operating system), kernel that is used in many computer systems worldwide. The kernel was created by Linus Torvalds in 1991 and was soon adopted as the k ...
s starting with 2.6.18.Determining and changing the rate of timer interrupts a guest operating system requests (1005802)
/ref>
See also
* High Precision Event Timer
* Monostable multivibrator
A multivibrator is an electronic circuit used to implement a variety of simple two-state devices such as relaxation oscillators, timers, latches and flip-flops. The first multivibrator circuit, the astable multivibrator oscillator, was invented ...
* NE555
References
{{Reflist
External links
High Performance Windows Timers
Timing on the PC family under DOS
IBM PC compatibles
Digital electronics