Pulse-based Control Application
PWM selection is commonly used for functions like adjusting LED brightness and controlling fan speed. In this implementation two LEDs are adjusted to discrete brightness levels based upon the input of two switches.
- GreenPAK with DCMP
- No other components are needed
- Enable the DCMP by removing VDD from SHARED PD input. Set DCMP/PWM power register to Power on. Set IN+ selector to Register selected through from matrix. Set IN- selector to FSM1. Set the registers of DCMP0: register 0 – 51; register 1 – 102; register 2 – 154; register 3 – 0.
- Add CNT/DLY block configured as Counter/FSM. Set counter data to 255.
- Configure RC OSC power mode to Force power on.
- Configure PIN10 and PIN9 to open drain NMOS.
- Add LUT as an inverter.
- Connect input pins to the MTRX SEL options of a DCMP/PWM block.