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
To the best of my knowledge, there are no MCUs with on-chip EEPROM among C166 derivatives. There are chips with on-chip flash ROM, but apparently that's not what you are after. So yes, you'll have to put something external on for just two bytes. But really we should not be the ones to explain you all this. It's all in the datasheet of the chip you are using. Just read it. Regards, - mike
Thanks for your help Mike. I'm still waiting for the databook. I just didn't want to sit on my hands until it arrived.
"I'm still waiting for the databook. I just didn't want to sit on my hands until it arrived." Pardon?! Welcome to the 21st Century - don't wait for a clumsy databook, download it now! http://www.keil.com/dd/cl/all/166.htm