At 01:16 PM 2/17/98 -0400, Rawle Watson wrote: >Hi Picpros, > >I'm using the PIC16f84 in an automotive application. Basically, its an alarm >and an anti-theft device. The alarm monitors the doors, trunk and the hood >of the vehicle when the ignition is turned off. Whereas, the antitheft >device monitors it continually. [snip] >My problem is that the contents of the registers which contain the bypass >word is lost whenever the vehicle's battery power is removed then replaced. >Obviously, this would defeat the purpose of the system. > >As I see it, the way out of this to have a back-up battery on board, or on >the other hand to use some form of memory device. However don't have the >knowledge in none of the above. I'm therefore asking your assistance. Rawle, Instead of storing the bypass word in the PIC's RAM area (file registers), store it in the PIC's EEPROM. Read a copy of it into RAM in your initialization routine, so it's easier do work with, and write the new value to EEPROM whenever it is set by the user. - Rick "Non-volatile" Dickinson +---------------------------------+---------------------------+ | Enterprise ArchiTechs Company |"You can't reason someone | | Lotus Certified Notes | out of a position they | | Appl. Design & Administration | didn't reason themselves | |(818)563-1061 rtd@notesguy.com | into" -- Rick Adams, | | http://www.eArchiTechs.com | in alt.folklore.urban | +---------------------------------+---------------------------+