简体   繁体   中英

PIC24F eeprom and XC16 MPLAB

Can say me anyone why I get error when use this code in XC16 MPLAB? PIC24FJ64GA004

unsigned int __attribute__ ((space(eedata))) eeData[] = {100, 1, 22, 33, 44, 156, 3, 10, 1};

error: space(eedata) not supported on this target

Sorry for beginner question.

The issue is that the PIC24FJ64GA004 doesn't have on-chip EEPROM for you to use. The compiler recognizes this so throws that error. Contrast this against, say, a PIC24F32KA302, which has 512 Bytes of on-chip EEPROM.

Your best bet if you need Non-Volatile memory to write to via your application is to:

A) Use a different target chip with dedicated on-chip EEPROM

B) Emulate an EEPROM using the unused flash program memory (There are Libraries out there for this)

C) Use an off-chip EEPROM that you can interface with via serial communication (such as This )

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM