How to remove leakage current from nRES transistor switch?
AVR reset pin design, which provide a 12V into the nRESET pin of an ATtiny μC.


Re-read the manual. The nRESET pin of an AVR has three states:


12V for HVPP only
GND for Reset/ISP mode
Pulled to VCC via internal or external 1k..10k resistor for normal chip operation


Your circuit above only supports the first two (12V and GND) states.

The 12V HVPP mode is usually only used to recover from wrong fuse settings, so it can be completely omitted in most designs. You will need another programming method (ISP or PDI depending on chip type).

In case one really needs HVPP, a proper high-side switch is strongly recommended, for example:







simulate this circuit &ndash; Schematic created using CircuitLab

Above circuit won't consume any current above transistor leakage levels when HVPP_On is low.

The MOSFET I'm used here is a 20V P-chan MOSFET, because battery can be a bit above 12V.


IRLML6402 (Infineon)