Skip to Content
Interfacing PIC Microcontrollers
book

Interfacing PIC Microcontrollers

by Martin P. Bates
April 2011
Intermediate to advanced
312 pages
9h 32m
English
Newnes
Content preview from Interfacing PIC Microcontrollers
immediately, because the counter runs continuously. The buttons are checked, and
the compare register value incremented or decremented to change the output pe-
riod if one of them is pressed. A check is also made for zero at the upper and lower
end of the period adjustment range, to prevent the compare value rolling over or
under between 00 00 and FF FF. This would cause the output frequency to jump
between the minimum and maximum value, which is undesirable in this case.
The 1 ms pulse period is generated as a software delay, which runs in paral-
lel with the hardware timer count. After 1 ms, the output is cleared to zero, but
the hardware count continues ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Interfacing PIC Microcontrollers, 2nd Edition

Interfacing PIC Microcontrollers, 2nd Edition

Martin P. Bates

Publisher Resources

ISBN: 9780750680288