Skip to main content

The PC Timer

  • Chapter
Interfacing with C++
  • 2175 Accesses

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.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

13.10 Bibliography

  • Van Gilluwe, F., The Undocumented PC, Addison Wesley, 1994.

    Google Scholar 

  • IBM, Technical Reference — Personal Computer AT, IBM Corporation, 1985.

    Google Scholar 

  • Auslander D.M. and Tham, C. H., Real-Time Software for Control, Prentice Hall, 1990.

    Google Scholar 

  • Intel, M8254 Programmable Interval Timer — Data Sheet, Intel Corporation, 1986.

    Google Scholar 

Download references

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics