13.9 Summary
In this chapter we learned how the built-in timer of the PC operates and how it can be used. The object class PCTimer has been developed with the capability to measure very long time periods. It has member functions to mark a time reference, accurately read the elapsed time, and also generate specific delays.
The PCTimer class operates without disabling the PC’s interrupts. As such, the interrupt service routines will generate short interruptions that can contribute to minor inaccuracies when measuring time. This was demonstrated when one of our example programs made repeated measurements of a ‘fixed-time’ event with interrupts enabled, and later with interrupts disabled. Other programs were presented in this chapter that measured a person’s reflex reaction time, generated a waveform plot using an accurate time-base, and used regular and accurate timing to digitise the electrical waveform produced by the interface board’s Charge/Discharge circuit.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
13.10 Bibliography
Van Gilluwe, F., The Undocumented PC, Addison Wesley, 1994.
IBM, Technical Reference — Personal Computer AT, IBM Corporation, 1985.
Auslander D.M. and Tham, C. H., Real-Time Software for Control, Prentice Hall, 1990.
Intel, M8254 Programmable Interval Timer — Data Sheet, Intel Corporation, 1986.
Rights and permissions
Copyright information
© 2006 Springer-Verlag Berlin Heidelberg
About this chapter
Cite this chapter
(2006). The PC Timer. In: Interfacing with C++. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-33581-1_13
Download citation
DOI: https://doi.org/10.1007/3-540-33581-1_13
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-25378-5
Online ISBN: 978-3-540-33581-8
eBook Packages: EngineeringEngineering (R0)