This PIC have only 1 CCP channel, which mean you can't use HPWM for more tha 1 channel. If you need another channel, there's serveral way to do it: Change your PIC for one having 2 CCP module, or keep the existing one but create a Timer interrupt based PWM, or do the same in a tight loop... but you will be limited to do anything else, or Darrel Taylor's Multi_SPWM routine ( http://www.pbpgroup.com/modules/wfse...p?articleid=12 ).
Depending your DC moto spec.. the Timer based or else low frequency PWM may work... or not. HPWM will produce higher frequency and run in background.
Bookmarks