© Hubert Henry Ward 2020
H. H. WardIntermediate C Programming for the PIC Microcontrollerhttps://doi.org/10.1007/978-1-4842-6068-5_4

4. Creating a Square Wave

Hubert Henry Ward1 
(1)
Leigh, UK
 

In this chapter, you are going to look at creating a square wave on one of the CCP outputs.

After reading this chapter, you should understand what the CCP module is. You should also appreciate why you would want to create a square wave output and how to use the PWM aspect of the CCP module to create a square wave.

In Chapter 6, you will look at an alternative approach to creating a square wave. The approach will involve using the compare aspect of the CCP module and using interrupts.

Why Create a Square Wave?

To answer this question, you are going to look at the ...

Get Intermediate C Programming for the PIC Microcontroller: Simplifying Embedded 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.