O'Reilly logo

Make: AVR Programming by Elliot Williams

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 9. Introduction to the Timer/Counter Hardware

In this chapter, we’ll test our reaction time, refine our old organ routines, and transmit AM radio directly from the AVR. What do these projects have in common? They’re all made possible by the internal timer-counter hardware. Previously, we’ve marked the passing of time by holding up the CPU in counting delay loops. No more! The AVRs have dedicated hardware that’ll do that for us.

In all of these cases, you’ll find that using the hardware timers costs a little bit in initial setup, but makes your resulting code significantly simpler, makes the timing significantly more accurate, and frees up the CPU for useful work.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required