Hello I have a mini proyect that senses through ADC a rectified AC inlet. Also I have a switch and a voltage regulator for mi PIC. The switch only cuts off the output pin of the 7805 regulator. I know I can put the switch at the beggining of the circuit and the problem would be solved, but in this case I can´t because the circuit senses when there is power or not and if I put the switch at the beggining of the rectified AC that wouldn´t work.
So my idea was this. When the switch is on, the pic would power up and start sensing and everything should work as expected. When the switch is off, nothing works right?. But here´s what happens.
1) The switch is on, I plug the circuit and everything works fine.
2) I turn of the switch with the AC still plugged in and a led indicator that I have keeps lit up.
3) I turn the switch on, and nothing works. The led is still on.
I have no clue why this is happening. My thought is that somehow when the switch is off the rectified AC current powers up the PIC from other pin that isn´t VDD or MCLR. Not sure about this one but on the datasheet it says that the pic would work with 2.3V and that is close to what my multimeter reads. I have turned off all the resets on the PIC by software.
Has anyone else had this kind of problem before?. To make the question clear:
Is there a way that a MCU can still work when there is no power on it´s power terminals but there is on other non-power related pin?