Patent ID: 8988008
Filing Date: 2015-03-24
Classification: H05B

Abstract:
1. A method of controlling a current to a load, where the load is powered by an AC voltage having a frequency and a period, the method comprising: utilizing timer logic comprising a timer, a reload register, a capture register, a compare register and an output, wherein the timer counts to a value based on a value loaded in the reload register, resets and restarts, and wherein the output is asserted when the value of the timer is greater than a value loaded in the compare register; electrically connecting the output to the gate of a triac, where the triac is disposed between a source of the AC voltage and the load; loading the reload register with a value such that the timer restarts at a rate equal to twice the frequency of the AC voltage; loading the compare register with a value less than the value of the reload register, where the difference between the value of the reload register and the value of the compare register defines a pulse width of the output; calculating a desired temporal relationship between the restarting of the timer and the AC voltage to achieve the desired current, where said relationship can be determined by reading the value of the timer when the AC voltage is at zero voltage by reading the capture register; reading the capture register to determine the actual temporal relationship; determining a difference between the actual temporal relationship and the desired temporal relationship; adjusting the value of the reload register based on the difference; and repeating the reading, determining and adjusting steps.