Electronic – High side switching bizarre side effects

pnpswitching

I'm not quite sure how to title this question. In essence, I have a high-side power switch circuit that is not switching off all the way under circumstances I cannot explain.

First, here's the entire circuit:

GPS Pack schematic

It is a battery powered GPS system. It is designed primarily to be a reverse geocache. When operating, it draws about 150 mA of battery power, and when it's sleeping it draws about 1 mA, both of which are perfect.

What is bizarre is that the power switch won't switch completely off unless I set the pinMode of the 6 logic pins connected to the LCD to INPUT.

I've spent an all-nighter trying other things, and that's the only one that causes the power to go completely out. It's a complete mystery to me.

A logic low on the MMBT3904 base resistor is only 0.06 volts. If I simulate the power circuit, it requires closer to 1 volt to even begin to switch on (with a 100k resistor).

The other weirdness is that with the LCD connected, AVR-ISP programming doesn't work. I've used that same pin configuration before and it's worked, so that's another mystery (but probably for a different question).

Best Answer

The LCD has internal pull-up resistors (at least on the data lines), and probably a protection network on each pin with a diode to Vcc. Hence when a uC output to the LCD is high, it attempts to 'power' the LCD via the LCD input pin. Making the uC pins inputs will prevent this. Making the pins low should also prevent this.