Years ago I was working on a design for a digital video recorder. The design used a power on push button. You know the ones where you press to power on the device and then once powered on you press and held to power off.
We were on our 3rd PCB design and was adding more transistors and logic to get the button to work the way we wanted. Yes we were spinning a board mainly for a stupid power button. At this point one of the engineers said "Why don't we just use a microcontroller?"
Microcontrollers For Glue Logic
We all realized instantly this was the right approach. A small low power micro would be less of a drain than all the resistors and transistors we were using trying to implement the logic.
I have seen this push button logic problem on countless designs since, most will multiple board spins to get it working. Where the reality is that a simple micro with less than 100 lines of code could solve the problem. Now the micro is not always the perfect solution as that it does require the micro be programmed in the factory, and you might need a way to update the firmware on the micro in the field depending on use, however it is often worth the cost.
The power on push button problem came up recently on a design review I was doing. The board had multiple power rails that had to be brought up in certain order. So the engineer had designed logic to do this. Then there was the RTC, watchdog timer IC, accelerometer, battery fuel gauge, etc. Many of these chips are I2C chips. If you do not know about I2C hell then lets just say if you use an I2C chip make sure your processor can power cycle chip, we will do a blog about this latter.
I finally convinced the designer to put a micro in the design. All of a sudden the design lost two schematic sheets of parts. That is most of the external functionality could be managed by the microcontroller leaving the main processor to do what it needed to.
Sometimes adding that second microcontroller is all you need.