Status: New Owner: robhamerling Labels: Type-Enhancement Priority-Medium New issue 92 by robhamerling: 'high' and 'low' resolution in pwm libraries http://code.google.com/p/jallib/issues/detail?id=92
PWM hardware uses always 10 bits for the period setting: the high order 8 bits in CCPR1L, the low order 2 bits in CCPxCON_DCxB. A large number of available PWM steps (HIGH RESOLUTION) requires a value with a large number of significant bits. The lower the value the less PWM steps are available (lower PWM resolution). In the current PWM libraries the implementation of high and low resolution is wrong. The procedure: pwmx_set_dutycycle(byte in duty) puts 'duty' in CCPRxL, which means 'duty' is effectively used as a 10 bits value of which the low order 2 bits are zero. So in practice there is no difference with the procedure pwm1_set_dutycycle_highres(word in duty) except that the latter allows to use the low order 2 bits for a higher PRECISION of the period setting, not for a HIGH RESOLUTION of PWM! -- You received this message because you are listed in the owner or CC fields of this issue, or because you starred this issue. You may adjust your issue notification preferences at: http://code.google.com/hosting/settings --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/jallib?hl=en -~----------~----~----~----~------~----~------~--~---
