Home - News - Details

How To Use A PIC Microcontroller To Generate A PWM Signal That Controls The Speed Of A DC Motor

You can also change the level of the output pins by writing a custom assembly or C code. Another way is to choose a PIC microcontroller with a hardware PWM module. The Microchip modules that provide this functionality are the CCP and ECCP modules. Many PIC microcontrollers have CCP and ECCP modules.


The CCP module can output a 10-bit PWM signal on a single I/O pin. 10-bit precision means the module can accept 210 (or 1024) possible duty cycle values ranging from 0% to 100%. The advantage of using this module is that it can independently generate PWM signals on the input and output pins, freeing up the CPU for other tasks. The CCP module only requires the developer to configure the module parameters. The configuration block includes setting the register frequency and duty cycle. The ECCP module provides all the functions of the CCP module and can control full-bridge or half-bridge circuits. The ECCP module also features automatic shutdown and a programmable kill delay.


Send Inquiry

You Might Also Like