New lessons introducing the CCP and ECCP modules' PWM modes have been added to the Enhanced Mid-Range PIC tutorials.
So what's PWM?
"PWM" stands for pulse-width modulation.
It is a method of controlling the average power supplied to a load, such as a string of LEDs or a motor, by rapidly toggling one or more outputs with a variable duty cycle, which can be adjusted smoothly, with up to 10-bit resolution. Common uses include:
- dimming LEDs
- controlling the speed and direction of motors
- generating audio tones
What does this tutorial cover?
This lesson describes the various PWM modes provided by the CCP and enhanced CCP modules, including:
- standard single-output PWM
- single-output with PWM steering
- half-bridge output
- full-bridge output in forward and reverse modes (for motor control)
The examples include all of the typical uses listed above, but with a particular emphasis on brushed DC motor control.
As usual, this lesson is available in assembly language and C (XC8) versions.
A "migrating from mid-range PIC" lesson is also provided, for those who have already completed the mid-range PIC CCP lessons.
How do I get it?
If you have purchased the enhanced mid-range tutorials, you will find these new lessons available for download via the “Downloads” link in your “My account” area, as usual. And if you have purchased a PIC training board, a new manual is also available for download, with the jumper settings tables (in appendix A) updated to reflect the new lessons.