Hi Seb, and others who could test PWM, I've rewritten parts of the PWM libs and tested these with some sample/test programs. Major changes: - no API changes, but added a pwmx_set_lowres() procedure - added some error handling (parameter limits) - simplified argument hadnlin/calculations - added or extended comments (e.g. procedure descriptions)
The attached zip file contains new pwm_hardware, pwm_common, pwm_ccp1 and pwm_cpp2 (last two hand-edited!). These have been tested. The old pwm_ccp3,4,5 are unchanged and not tested. Included are also 2 sample programs, each using 2 ADC-PWM channel pairs. I tested these with both the old and the new libraries for 3 main reasons: 1. to check for API changes, 2. to see if ADC and PWM channels work really independent, 3. to see code differences (memory 'consumption'). Points 1 and 2 are OK, point 3 is remarkable: Program '16f886_adc_pwm_res': from 2303/104 to 1634/74 (code/ram memory) Program '16f886_adc_pwm_freq': from 2575/108 to 1725/84 The first uses maximum resolution the second a high frequency allowing only 8-bits resolution. If you (or anybody else!) have some time left, please comment. Maybe I have overlooked something and I'll probably need to improve the documentation somewhat more. Regards, Rob. -- Rob Hamerling, Vianen, NL (http://www.robh.nl/) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
pwm_new.PIZ
Description: application/piz
