PWM Generator Using DAC and ACMP

PWM Generator Using DAC and ACMP

Pulse-based Control Application

PWM generators can be used to control devices such as dc motors and LEDs. This implementation uses an analog signal that an ACMP compares with the signal of DAC0. CNT3 is used to generate the value for the DAC.

 

Ingredients

  • GreenPAK with DAC
  • No other components are needed

GreenPAK Diagram

Design Steps

  1. Connect ACMPO PWR UP input to POR. Set IN- source Ext. Vref (DAC0 out).
  2. Set DAC0 power on signal to Power on and input selection From DCMP1’s input.
  3. Configure FSM-compatible CNT/DLY to Counter/FSM mode with counter data = 255.
  4. Set RC OSC power mode to Force power on.

Resources

GreenPAK Designer files