I was wondering how reliable it would be to drive a P-channel MOSFET directly from a micro-controller pin like this:
When I want the FET to be ON I make the pin output low (connecting the gate to the ground).
When I want the FET to be OFF I make the pin input (high impedance), pulling the gate to 12V through R1.
The only problem I see is that when OFF, the MCU pin will "see" 12V through R1, but I am thinking it shouldn't really be a problem, since R1 is quite high and the impedance of the pin itself is much higher, so there shouldn't really be any danger for the pin. Or am I wrong?
Obviously, we're not talking high switching speeds here, just turning stuff on and off from an MCU.
I know it is usually done with a BJT or N-channel MOSFET acting as "gate driver" for the P-channel MOSFET. The question is, what will go wrong if I try to skip it?
I don't have a specific MCU in mind, could be an ATTiny monitoring the input voltage and deciding whether or not to pass it to the rest of the circuit or an ESP8266 turning stuff on and off over the internet and whatnot.