I am trying to design a control for a BLDC motor with a PIC16F887.
I have managed to activate a PWM output and be able to vary it with a potentiometer. The point is, I need to get 6 PWM signals out.
When I change the CCP1CON I can vary the PWM output but it is always one.
I attach the part of my code where I configure the PWM.
void PWM_Initialize()
{
PR2 = ("%#x", (_XTAL_FREQ/(PWM_freq*4*TMR2PRESCALE)) - 1);
CCPR1L = 0x1F;
RC1 = 0;
RC2 = 0;
T2CON = 0x03;
CCP1CONbits.CCP1M = 0b1100;
CCP1CONbits.P1M = 0b00;
TMR2 = 0;
T2CONbits.TMR2ON = 1; //Timer 2 ON
}
How can I activate multiple PWM outputs?