Chapter 11

Timers and Counters

11.1  Controlling the Time Lapse

The mid-range PICs contain facilities and devices for controlling and manipulating time lapses in a program; these are usually in the form of timing and counting operations. It is difficult to find a PIC application that does not require some form of counting or timing. In the programs previously developed we have used a simple iteration counter that produces a delay by means of a loop that implements a delay by wasting a series of machine cycles. In this chapter we expand the theory and the use of delay loops, and explore the use of the built-in timing and counting circuits on the 16F84. The material presented relates to Chapter 10 because timing and counting operations can be set ...

Get Embedded Systems Circuits and Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.