On Wed, 24 Jun 1998 09:49:50 -0400 "Matthew J. Ancona" writes: >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. There are bits in the STATUS register for this purpose. >The STATUS register has a couple of bits, PD and TO, dealing in this >area, >but I don't know if there is a logical combination that will give me >what I >need. The PD bit is the one to look at. If the chip has been asleep since the power was turned on, it will be 0. Turning the power off and back on sets the bit to 1. Executing a SLEEP instruction sets it to 0. So if after a reset you find the PD bit is 1, initialize everything. If it is zero, it's just a wakeup from SLEEP. > >If the 16C55 can't, is there another part that could? I think all PICs, 12 and 14-bit, have the same logic. _____________________________________________________________________ You don't need to buy Internet access to use free Internet e-mail. Get completely free e-mail from Juno at http://www.juno.com Or call Juno at (800) 654-JUNO [654-5866]