So you want to erase the eeprom every time the pic is started?
I'm rather new to pics and PB, but I'll give you my opinion.
Maybe you can add something like:
w0 var word
for w0 = 0 to 255 'It depends on how many slots you want to erase, I'm erasing 256
write w0, 0 'We write a zero to the eeprom at the desired location, like erasing it
next w0 ' we continue with the next w0
hope this helps.
By the way, there's the Data command, with it you can preset the eeprom to whatever you want at the time of the programing. You add Data @0,2,6, 3, 50, etc at the beginning of your program and when your program your pic (not every time you power it up) the eeprom recieves the values you specified, in this case:
eeprom 0 = 0
eeprom 1 = 2
eeprom 2 = 6
eeprom 3 = 3
eeprom 4 = 50
bye
Art
Bookmarks