POKECODE puts the data in the .hex file, and the programmer puts it in the chip while programming.
It does not write to flash memory at run-time.
So putting ERASECODE in your program would normally erase what was already programmed.
But on the 16F877A, you cannot use ERASECODE because there is no FREE bit in EECON1.
When writing to flash at run-time on this chip, it does an erase/write cycle much like EEPROM.
There is no mechanism to erase blocks of FLASH memory.
Most PIC chips do not work that way.
So just lose the ERASECODE statement.
And don't try to put all 500 values in the same POKECODE statement.
Split them up into multiple POKECODEs.
Bookmarks