Engineering:Programmable interval timer: Difference between revisions

From HandWiki
imported>Nautica
simplify
 
Wincert (talk | contribs)
update
 
Line 1: Line 1:
{{Short description|Counter that generates an output signal when it reaches a programmed count}}
{{Short description|Counter that generates an output signal when it reaches a programmed count}}
In computing and in [[Embedded system|embedded system]]s, a '''programmable interval timer''' ('''PIT''') is a [[Counter (digital)|counter]] that generates an output signal when it reaches a programmed count. The output signal may trigger an [[Interrupt|interrupt]].
In [[Central processing unit|computing]] and in [[Embedded system|embedded system]]s, a '''programmable interval timer''' ('''PIT''') is a [[Counter (digital)|counter]] that generates an output signal when it reaches a programmed count. The output signal may trigger an [[Interrupt|interrupt]].


==Common features==
==Common features==
Line 8: Line 8:


==IBM PC compatible==
==IBM PC compatible==
The Intel 8253 PIT was the original timing device used on IBM PC compatibles. It used a 1.193182 MHz [[Clock signal|clock signal]] (one third of the color burst frequency used by [[Engineering:NTSC|NTSC]], one twelfth of the system clock [[Engineering:Crystal oscillator|crystal oscillator]],<ref>{{cite web|url=http://www.osdever.net/bkerndev/Docs/pit.htm |title=Bran's Kernel Development Tutorial: The Programmable Interval Timer |publisher=Osdever.net |date= |accessdate=2013-10-30}}</ref> therefore one quarter of the 4.77 MHz CPU clock) and contains three timers. Timer 0 is used by [[Software:Microsoft Windows|Microsoft Windows]] (uniprocessor) and [[Software:Linux|Linux]] as a system timer, timer 1 was historically used for dynamic random access memory refreshes and timer 2 for the [[Engineering:PC speaker|PC speaker]].<ref>{{cite web|url=http://wiki.osdev.org/Programmable_Interval_Timer |title=Programmable Interval Timer - OSDev Wiki |publisher=Wiki.osdev.org |date=2012-06-26 |accessdate=2013-10-30}}</ref>
The Intel 8253 PIT was the original timing device used on IBM PC compatibles. It used a 1.193182 [[Hertz|MHz]] [[Clock signal|clock signal]] (one third of the color burst frequency used by [[Engineering:NTSC|NTSC]], one twelfth of the system clock [[Engineering:Crystal oscillator|crystal oscillator]],<ref>{{cite web|url=http://www.osdever.net/bkerndev/Docs/pit.htm |title=Bran's Kernel Development Tutorial: The Programmable Interval Timer |publisher=Osdever.net |date= |accessdate=2013-10-30}}</ref> therefore one quarter of the 4.77 MHz CPU clock) and contains three timers. Timer 0 is used by [[Software:Microsoft Windows|Microsoft Windows]] (uniprocessor) and [[Software:Linux|Linux]] as a system timer, timer 1 was historically used for [[Dynamic random-access memory|dynamic random-access memory]] refreshes and timer 2 for the [[Engineering:PC speaker|PC speaker]].<ref>{{cite web|url=http://wiki.osdev.org/Programmable_Interval_Timer |title=Programmable Interval Timer - OSDev Wiki |publisher=Wiki.osdev.org |date=2012-06-26 |accessdate=2013-10-30}}</ref>


The LAPIC in newer Intel systems offers a higher-resolution (one microsecond) timer.<ref name="timer">Uwe Walter, Vincent Oberle [http://telematics.tm.kit.edu/publications/Files/61/walter_ibm_linux_challenge.pdf μ-second precision timer support for the Linux kernel]</ref> This is used in preference to the PIT timer in [[Software:Linux kernel|Linux kernel]]s starting with 2.6.18.<ref>[http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1005802 Determining and changing the rate of timer interrupts a guest operating system requests (1005802)]</ref>
The [[Advanced Programmable Interrupt Controller|LAPIC]] in newer Intel systems offers a higher-resolution (one microsecond) timer.<ref name="timer">Uwe Walter, Vincent Oberle [http://telematics.tm.kit.edu/publications/Files/61/walter_ibm_linux_challenge.pdf μ-second precision timer support for the Linux kernel]</ref> This is used in preference to the PIT timer in [[Software:Linux kernel|Linux kernel]]s starting with 2.6.18.<ref>[http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1005802 Determining and changing the rate of timer interrupts a guest operating system requests (1005802)]</ref>


==See also==
==See also==
* [[Engineering:High Precision Event Timer|High Precision Event Timer]]
* [[Engineering:High Precision Event Timer|High Precision Event Timer]]
* [[Engineering:Monostable multivibrator|Monostable multivibrator]]
* [[Engineering:Monostable multivibrator|Monostable multivibrator]]
* NE555
* [[Engineering:555 timer IC|NE555]]


==References==
==References==
Line 21: Line 21:


== External links ==
== External links ==
* http://www.luxford.com/high-performance-windows-timers
* [http://www.luxford.com/high-performance-windows-timers High Performance Windows Timers]
* https://stackoverflow.com/questions/10567214/what-are-linux-local-timer-interrupts
* [http://www.phatcode.net/articles.php?id=246 Timing on the PC family under DOS]
* [http://www.phatcode.net/articles.php?id=246 Timing on the PC family under DOS]



Latest revision as of 12:51, 5 April 2026

Short description: Counter that generates an output signal when it reaches a programmed count

In computing and in embedded systems, 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.

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 compatibles. It used a 1.193182 MHz clock signal (one third of the color burst frequency used by NTSC, one twelfth of the system clock crystal oscillator,[1] therefore one quarter of the 4.77 MHz CPU clock) and contains three timers. Timer 0 is used by Microsoft Windows (uniprocessor) and Linux as a system timer, timer 1 was historically used for dynamic random-access memory refreshes and timer 2 for the PC speaker.[2]

The LAPIC in newer Intel systems offers a higher-resolution (one microsecond) timer.[3] This is used in preference to the PIT timer in Linux kernels starting with 2.6.18.[4]

See also

References