Here's something to think about when using power control circuits that has the microcontroller in the loop on. The operator pushes the "power" button and turns the power on. Later, when the operator wants to turn the power off, they push the "power" and the PIC senses this and turns the power off. Problems can occur when the PIC crashes and refuses to turn off the power. In one product I know of that had an 8051 cpu and an internal-hard-to-get-at-nicad-battery-pack, this happened and the customer could not turn off the instrument. It was solved by adding a circuit with a mosfet downstream from the cpu in such a way that it could override the cpu. The gate of the mosfet had an R-C circuit: 4.7Megs to the gate with a 10ufd cap to ground and the mosfet was a low threshold device. The resistor went to the "power" button. If the user pressed it in and held it for about 5 seconds, the transistor turned on asserting the power off signal. This worked great. Total cost was about 12 cents. It eliminated all service calls concerning "instrument won't turn off". Tom M. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.