I am working on an application with a PIC24 and EEPROM. I'd like to be able to turn it off (more than just sleep) since it won't be used for long periods of time. The problem is that I don't want to turn it off during the middle of an EEPROM write.
I thought about an N-Channel MOSFET across the power switch (switch in ground leg) controlled by an output port. I can control the MOSFET, but as soon as power goes away, the output pin floats enough to keep the power switch on.
How is this kind of thing usually done? Solid state relay? Some other way?
Thanks!