I have to admit being somewhat confused. But that won't stop me from trying to help out. I am not clear (maybe due to my own lack of knowledge) how the PID is fitting in to your description. The subject makes it appear you are going to turn the heat on or off based on time. This needs no PID. Time is know, not variable.
If you are going to be reading the temp, and the setpoint is determined by time, then I get it.
Now to try and help:
Idea 1. If you are using DT_INT's just also use DT elasped timer.
Idea 2. If you already have a 1 second time base, just add a counter to the ISR to keep track of seconds. 1 WORD of seconds is over 18 hours. that is clearly enough time to cook the card, or the turkey too.![]()




Bookmarks