摘要:
A method and system produce a PWM signal using a comparator having first and second input terminals and an output terminal at which the PWM signal is produced. The method includes powering the comparator with a supply voltage and receiving a modulating signal at the first input terminal. The method creates a carrier signal with a constant frequency and a maximum amplitude equal to the supply voltage. The comparator receives the carrier signal at the second input terminal and compares the carrier signal to the modulating signal, thereby producing the PWM signal at the output terminal. By creating and using a carrier signal with a maximum amplitude equal to the supply voltage, the PWM signal produced by the method is immune from changes in the supply voltage.