Microcontroller › PIC › pwm with pic 16f877a › Well iam using mikroC pro as
Well iam using mikroC pro as my compiler an here are the code.s iam using to set up my frq iam using this
PWM1_init();
an for changing the duty iam using
PWM1_Set_Duty();
iam doing the incriment and decrement in the duty properly its working fine 0-255
but iam having some problem with the frq varying
if(RD1_Bit) {
Delay_ms(10);
PWM1_init(1000);
PWM1_Set_Duty();
}
atm iam just runing it like this but i want to do proper increment and decrement in the frq like 1khz to 50khz
with the help on 2 buttons