Heating elements are used to tune the optical properties of silicon photonic devices, to stabilize operating temperatures, and to compensate for fabrication variations. In this paper, we characterize the transient thermal response and develop models for silicon photonic devices equipped with such heating mechanisms. To demonstrate the usefulness and practicality of the proposed models, we investigate pulse width modulation (PWM) drive scheme for microheaters and experimentally demonstrate its use in stabilizing microring resonators by digital driving signals (two-level voltage). Requirements on the drive frequency and duty cycle of the PWM signal to minimize optical power penalties owing to the undesired thermal ripples are discussed based on the accurately modeled thermal frequency response of the heater-ring system. It is shown that smaller duty cycles require higher drive frequencies and the maximum optical ripple for a microring resonator occurs at 65% duty cycle.