I have just tried it and it it appears to be really weird as you don't have any control over the HPWM Port bit when the PIC is send to sleep.
It might be HIGH or LOW at the time you send the PIC to sleep and it remains in this state until you wake the PIC up again.
Even a HIGH "HPWMpin" or LOW "HPWMpin" right before e the "SLEEP" command doesn't help.
So depending on what you have connected to the HPWM Pin there is a 50% chance you wouldn't save any Power at all by sending the PIC to sleep.
let's assume you have a MOSFET on your HPWM port driving some "High Power" device there is a 50% chance that it will be instantly ON while the PIC is sleeping.
regards
Ralph




Bookmarks