I have two microcontrollers, the beloved ATmega328p and an ATtiny85. The ATtiny85 does power management (toggling power to main MCU, get buttons clicks, and other things). The ATtiny85 disconnects VCC from the main MCU.
The main MCU (ATmega328p) is connected to the ATtiny85 to send a power-off signal. When it's connected directly (simple trace) it will drain current from the ATtiny85 to the ATmega328p.
Is there a way to prevent current sink from one MCU to the other?
Here is what I tried to solve this problem.
- I added a simple MOSFET to act as a switch (it kind of solves my problem, but that is not an elegant solution; what if I need 12 GPIOS?)
- I tried various resistors to limit current, but it will never be 0.
Another thing that I'm thinking about is to control ground and not VCC, But if the ATtiny85's control pin state is LOW, then it's effectively ground, right? Current sinking will continue.
I already optimized my board for a single MCU. This problem will be gone with a new batch of prototypes, but I still want to know how to prevent it if I have to do it that way.