Does the pic need power when the device is off? If not, how about a pulldown resistor on the /shutdown pin. A switch from battery positive through a diode to the shutdown pin. A momentary push of the button powers up the regulator for as long as the button is down. Next, another diode goes from a PIC output pin to the /shutdown pin. This way, when the PIC is powered up, the pin can be set high to keep the regulator running. Finally, a voltage divider off the switched power side of the switch drives a PIC input pin. On power up, the PIC finds this pin high. Wait for it to go low (with a debounce delay). The next time it goes high, they are hitting the switch to turn the system off. Drive the pic output pin low. When the switch is released, the regulator will shut down. Harold > I'm designing a handheld PIC-based device (a handheld GPS / nav. > unit). It'll be using a PIC18LF2620 and will be battery powered. I'd > like to give it a software power-on/off feature so I can use one of > the control buttons for power on/off rather than having a big ugly > power switch. I was wondering what circuits people would suggest? > > Just to complicate the issue some parts of the circuit operate at 5V > and others need 3.3V. The 18LF2620 can operate at down to 2.0V but > when the circuit's in full-power mode it needs to be running at 5V. My > plan was to use a 6V Ni-MH battery pack with MAX883 and MAX884 > regulators. These have a low dropout voltage and provide a shutdown > mode. I was thinking I could power the PIC through a schottky diode > off the 5V normally and then have an "off" mode where it's powered on > ~3.6V (three Ni-MH cells) through a different schottky diode. The > "off" mode would power only the PIC which would be in sleep mode. A > button press on one of the interrupt-on-change lines would wake the > CPU and it would raise an output line to tell the regulators to power > up again. > > Does this sound like a feasible plan? Is there an easier way of doing > this? > > Thanks, > Zik > (Apologies if this appears twice - I had some trouble with the mailing > list) > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- FCC Rules Updated Daily at http://www.hallikainen.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist