1.Set a flag in the Eeprom on start up then load the 5's in unless the flag has been set before 2. Don't do it in the code. Pre load the EEprom at program time. Tim -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of samo benedihih Sent: Tuesday, March 25, 2003 6:57 PM To: PICLIST@MITVMA.MIT.EDU Subject: [PIC]: part of program only once Hi all! I'm building central heating controller. In INIT phase of my program there is a few instructions that preload first five EEPROM locations with number five. What I'd like to know is: how do I tell the PIC that it should execute this part of program only at first go after programming the PIC and that it shouldn't touch EEPROM in INIT phase after any kind of reset. Is it POR or BOR bit that I should test? I'm using 16f877. Thanks in advance, Samo -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details. -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.