We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I'm trying to put 2 config chars into ROM (user makes a change which the ROM remembers during power down). However on compiling I get: 'error C142: illegal initialization' and then 'warning C34: 'code' : missing declaration specifiers The code I am using is as follows: code const unsigned char Config1 = 0x00; code const unsigned char Config2 = 0xA0; Can anyone tell me what is going on. Thanks
"Does a const value allow you to change it at runtime and retain it's value on power loss?" No. const is simply a hint to the compiler that it should not let you write to the variable. I think you need to buy a good 'C' textbook.
About the chip: in the past there were some C167-CS flash derivatives (SAx C167-CS 32FM) integrating some amount of Data Flash, acting like the eeprom you are searching for, but they were engineering samples and they have never been released for volume production. Data Flash is present in all C167-CS 32FM chip steps until DA, from DA step Data Flash has been cancelled.
Thanks Bruno. I think I'm just going to have to stick on a 8 pin Flash device to get around the problem.