The PIC microcontroller stores all of the temperature change entries as a table in its EEPROM memory, and keeps track of which is the current entry based upon the time it reads from the RTC. Every five seconds, the RTC is accessed. Then, the current temperature change entry is calculated. And finally, the temperature sensor is updated with the new alarm temperature.
USB thermostat with PIC18F252 - [Link]