I need to pick some brains and hopefully this forum can help. I'm trying to come up with a circuit that controls dimming of a LED driver without using a MCU, only one push button. Each push of the button increase the brightness. The LED driver has voltage controlled brightness on the feedback pin or the brightness can be controlled at the enable pin by varying the duty cycle of a PWM signal.
The cost of a MCU is ~$0.30 so the goal is to create something for that cost or less.
One idea I had was to use a SN74LV161A (4-bit Binary Counter) and have the push button connect to the clock signal. The output of the SN74LV161A would then feed a SN74LV4051A-Q1 (8 channel multiplexor). The input to the multiplexor would be different pull-up resistor values on each pin.
The problem with this circuit is that we need to have the LEDs turn off on one of the button pushes so I'm thinking something like using the RCO fed to an inverter which is connected to the enable pin of the LED driver. The other issue I see is that the multiplexer only has 3 inputs but the counter has 4 outputs. Ideally I would like to have the LED brightness in 7 or 8 steps with one of the steps being LED OFF.
I initially tried coming up with a PWM circuit based on maybe a 555 timer but everything I would come up with cost more than the $0.30 MCU.