Patent attributes
Timing adjustment for accurate zero-crossing determination includes obtaining time offset(s) representing amounts of time between (i) zero-crossings of an input signal waveform, representative of an input AC waveform, input to a zero-crossing detector circuit and (ii) corresponding transitions of an output signal from an output of the circuit to a microcontroller, and determining times of the zero-crossings of the input AC waveform, which includes determining times of the corresponding transitions as detected by the microcontroller and adjusting the determined times using the time offset(s) to produce the times of the zero-crossings of the input AC waveform. In another aspect, input AC frequency is determined by determining pulse width(s) of pulse(s) of the output signal, and adjusting a half-cycle time corresponding to the pulse width(s) using the time offset(s) to provide a duration of half-cycles of the input AC waveform and inform a frequency of the input AC waveform.