derser
Member level 1
Hello Friends.
I am trying to control PWM from keypad.In the beginning I load-CCPR1L with value,that produce-8uS output impuls.When I press button I add value 0x14 that must produce 16uS output impuls.But the output impuls is not 16uS,it is about 100uS.I cannot find mistake in code.Where is mistake? I add sample of the code where-firs I load two registres to see-if value in CCPR1L is greater or lower some values.If it is ok-I add-0x14 to increase impulse.The freq of module is 5KHz.
I am trying to control PWM from keypad.In the beginning I load-CCPR1L with value,that produce-8uS output impuls.When I press button I add value 0x14 that must produce 16uS output impuls.But the output impuls is not 16uS,it is about 100uS.I cannot find mistake in code.Where is mistake? I add sample of the code where-firs I load two registres to see-if value in CCPR1L is greater or lower some values.If it is ok-I add-0x14 to increase impulse.The freq of module is 5KHz.