# PWM Sets Output of LCD/LED Driver

### 要約

The digital, pulse-width-modulation (PWM) output available from many microprocessors is based on an internal 8- or 16-bit counter and features a programmable duty cycle. It is suitable for adjusting the output of an LCD driver, a negative-voltage LED driver, or a current-controlled LED driver.

This design idea appeared in the May 27, 2004 issue of *Electronic Design* magazine.

The digital, pulse-width-modulation (PWM) output available from many microprocessors is based on an internal 8- or 16-bit counter and features a programmable duty cycle. It is suitable for adjusting the output of an LCD driver (Figure 1), a negative-voltage LED driver (Figure 2), or a current-controlled LED driver (Figure 3).

The circuit consists simply of a PWM source, capacitor C, and resistors R_{D} and R_{W}. For CMOS outputs, you calculate the open-circuit output voltage as:

where D is the PWM duty cycle and V_{DD} is the logic supply voltage. The control circuit's output impedance is the sum of resistor values R_{W} and R_{D}:

For the circuit of Figure 1, the output voltage (V_{OUT}) is a function of the PWM average voltage (V_{CONT}):

where V_{REF} is the reference voltage at the feedback input.

Bear in mind that the initial charge on filter capacitor C produces a turn-on transient. The capacitor forms a time constant with R_{CONT}, which causes the output to initialize at a voltage higher than that intended. You can minimize this overshoot by scaling the value of R_{D} as high as possible with respect to R1 and R2. As an alternative, the µP can disable the LCD until the PWM voltage stabilizes.

For Figure 2, the output voltage (V_{OUT}) is a function of the PWM average voltage (V_{CONT}):

where V_{REF} is the reference voltage at the feedback input.

For Figure 3, the output current (I_{OUT}) is a function of the PWM average voltage (V_{CONT}):

where V_{REF} is the reference voltage at the SET output and K is the current-scaling factor.

R_{D} isolates the capacitor from the feedback loop in these PWM-adjustment methods. Assuming a stable voltage at the feedback point, the following equation defines the lowpass filter's cutoff frequency:

where R = R_{W} R_{D}. If R_{D} >> R_{W}, R ≈ R_{W}. To minimize ripple voltage at the output, you should set the cutoff frequency at least two decades below the PWM frequency.