Page 1 of 1

Using other PWM outputs aside from CCP1 and CCP2

Posted: Wed Mar 06, 2013 10:59 am
by paulm
Hi,

I'm using the PIC16F1824 which is a 14pin IC.

I am using 2 PWM channels (CCP1 and CCP2) to drive a DC motor differentially for forward and reverse positional control.

CCP1 and CCP2 are located at pins 5 and 7 of the IC which are on the left hand side of the chip.

The PIC16F1824 supports 4 PWM outputs (CCP1, CCP2, CCP3 CCP4).

I would like to use CCP3 and CCP4 instead due to PCB layout reasons which are on pins 11 and 9 respectively since they are on the right hand side of the IC.

Does Flowcode support using other PWM modules aside from CCP1 and CCP2. If so, how do I use the CCP3 and CCP4 modules when using the PWM macro in flowcode?

Thanks,
Paul

Re: Using other PWM outputs aside from CCP1 and CCP2

Posted: Wed Mar 06, 2013 11:35 am
by Benj
Hi Paul,

Flowcode v5 supports the additional PWM channels. Otherwise you could maybe use software generated PWM using a timer interrupt as shown here.

http://www.matrixmultimedia.com/article.php?a=52

Re: Using other PWM outputs aside from CCP1 and CCP2

Posted: Sun Mar 10, 2013 10:47 am
by brandonb
you can make simple pwms that go to any pin on the micro http://www.matrixmultimedia.com/mmforum ... 26&t=11590