romel_emperado
Advanced Member level 2
- Joined
- Jul 23, 2009
- Messages
- 606
- Helped
- 45
- Reputation
- 132
- Reaction score
- 65
- Trophy points
- 1,318
- Location
- philippines
- Activity points
- 6,061
values is 511. So there is the value you need to put into the CCPRxL:CCPxCON<5:4>, 10-bits to generate a 50/50 PWM.
the MSB of CCPR1L is 512 right but since we have a 50% duty cycle 1023/2 = 511.5 ..
if I will round it off into 512 I I will not set anymore the CCPRxL:CCPxCON<5:4> right? then the value of my CCPR1L will be 0b10000000xx ?
---------- Post added at 06:27 ---------- Previous post was at 06:17 ----------
so now if I want to use the 511.5 then the value of my register is 0b0111111111.. = 511.. correct?? how about the 0.5 ? hehe
---------- Post added at 06:30 ---------- Previous post was at 06:28 ----------
I hope im correct... hehe
Last edited: