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
Now that we know that it's about C166, it's easy to say why the compiler complained. There is no code keyword, so naturally the offending code looks like rubbish to the compiler. As for the use of non-volatile memory in your application, I'm not at all sure how your are going to achive what you just described with that code. I hope you know what your are doing... Regards, - mike
There lies the problem, I've only been on this chip for a week. I'm assuming it has some sort of internal EEPROM that can be read/written at runtime. Don't tell me I have to put something external on for just two bytes.
Exactly which C166 derivative are you using? http://www.keil.com/dd/cl/all/166.htm Jon