hi, i want to make pwm and its complementary for half bridge so i choose pic 18f4620 but it give me one pwm but the complementary doesn't appear i read the datasheet he datasheet
what is the problem please help me
Mod edit: added code tags
what is the problem please help me
C:
//names
//var
//modules
void init_(){
trisc.b2=0;
portc.b2=0;
trisd=0;
portd=0;
CCP1CON=0b10001100;
TMR2=0;
PR2=124;
CCPR1L=20;
T2CKPS1_bit=1;
T2CKPS0_bit=0;
TMR2ON_bit=1;
}//init_
void main() {
//setup
init_();
//loop
} //main
Last edited by a moderator: