Page 1 of 1

XC8 Table Array Workaround for PIC18FXXK40, Slicon Rev A3

Posted: Mon Mar 06, 2017 10:54 am
by Dillon
Hello All,

Like many of you I ran into errata DS80000712B. Adding +NVMREG in the errata field in the linker properties did not change the symptom for me. I found other threads on the forum with the same result. Adding powerup.as worked for me, as it did for others. One thing to be careful of is that the syntax and formatting of the .as file is exact. The code should look like the attached photo. Make sure that you do not have any extraneous blank lines after the "end" keyword on line 9. Blank lines after end will give you a preprocessor syntax error which is blank.

To make it easier I've also attached a working powerup.as file. Just add this file to your project as a Source file. One more thing, if you use arrays in EEPROM the NVMREG bits will be changed.

Re: XC8 Table Array Workaround for PIC18FXXK40, Slicon Rev A3

Posted: Mon Dec 31, 2018 5:25 am
by san
hello, please you can help me with a code example to work with usart and eeprom of the pic xxK40.

Thank you so much!!!