Yes, you could start an endless timer interrupt (let's say few milliseconds) in which you check your value, then start the HPWM and keep track of the required delay.
OR, enable the timer interrupt in your code, and assign a duration or flags for the HPWM.


simply because I'm so used to it by now, I've never had to do the HPWM. I do a lot of temperature controllers with cycle times in the range of 1 to 30 seconds. So, ..... It's more a matter of personal taste.

Bookmarks