December 2015
Beginner to intermediate
650 pages
18h 28m
English
The PIC32 counter/timer peripherals can be used to count external digital pulses, time an external digital pulse, or keep track of time. The five timers can be used as 16-bit timers, or two different pairs of timers can be combined to make two 32-bit timers. Timers can be used to generate interrupts at fixed intervals, useful for implementing real-time controllers. This chapter describes the special function registers (SFRs) associated with PIC32 timers and provides sample code to generate a fixed-frequency interrupt service routine, to count external pulses, and to time the duration of an external pulse.
Keywords
Counter
Timer
Prescaler
Period register
Period match
Counters count rising edges of a pulse ...
Read now
Unlock full access