>On a 16C55, I'd like to be able to distinguish between the first time the >chip powers up and every other time it awakes from sleep. I'm not sure if there is any way to distinguish between power up and external reset. If you have an uncommitted port pin, you can try my old standby which is a 1 uF cap connected to the port pin. When the system is first powered up, the cap has been dishcarged thru the ESD clamping diode. It will read as a logic low. Do all your init stuff, then turn the pin to an output and set the pin to logic HI. When you go to sleep, the pin remains HI and keeps the cap charged. After the system has been reset, the pin has been turned back into an input. So long as the reset pulse was not too long (several minutes or hours), the pin will still read as logic HI. Jump past all your init stuff, turn the pin back into an output (logic HI), and continue on your merry way. Total cost: 1 port pin and 1 capacitor. Note that port pin RA4 does NOT have the required ESD protect diode and would require the discharge diode from the pin to VDD. dwayne Dwayne Reid Trinity Electronics Systems Ltd Edmonton, AB, CANADA (403) 489-3199 voice (403) 487-6397 fax