any idea? Thanks
This seems to be a very popular comment. Bruce mentioned that you could modify the 16F library to accomodate for the 3rd HPWM channel. Could any of the advanced members take on this project and post the library? Seems that it would solve many repeat posts for the same problem.
Originally Posted by docwisdom
If someone has just a tip on what to look, I will really appreciate it. Thanks!
The post is the next one
Last edited by sougata; - 10th March 2006 at 08:33. Reason: Double post
Hi,
That's the library bruce was talking about. This contains the PBP function which is used by the compiler to extract and create codes and fits into the target processor. So portions only needed by your code are compiled according to PIC and placed in the top part of your compiled prog.
The problem with the HWPM command is that it calculates the PR2 (Freq) and CCP1CON + CCPCON (Duty Cycle) every time you use it in your code. That's the reason why changes do not take place immediately. So it is always a better idea to modify the duty cycle registers directly. To make life easy use the HPWM once then go on varying the duty cycle yourself. Depending on the PR2 values (read the datasheet for the Math) you should have a limit on the max duty cycle value to ensure smooth rollover.
It was Bruce's code found in a thread which gave me the wayout. Thanks bruce. I should have thanked you much earlier for showing the path.
I do not have a chip lying around that has 3 channels HPWM. I would sure like to give a try modifying the library. No commitments however (My firm is a design house and basically one man army on the development front!!!)
Regards
Sougata
Bookmarks