Hi Peter,
Data EEPROM memory and FLASH program memory are both EEPROM, and unfortunately not all PICs have the ability to write to their own FLASH program memory space.
Most of the 16Fxxx & 18Fxxx parts allow writing to program FLASH. The best way to find out is by looking over the datasheet.
If the datasheet for the PIC you're using doesn't show EEPROM control registers like EECON1, EECON2, etc.., then you can't use WRITECODE or WRITE, and attempting to use these commands returns the error you received.
WRITECODE is used to write to FLASH "EEPROM" program code space. WRITE is used to write to Data EEPROM.
> and if I have to change pics to an 'F872, what are valid
> addresses I can use?
Pretty much anywhere as long as you're not going to over-write your own program, and if you're going to use WRITECODE, then I highly recommend you read this app note by Melanie: http://www.picbasic.co.uk/forum/show...=&threadid=137
Bookmarks