i am trying to use code memory space to store some constants patterns. to do this, i have defined an array in code memory space as follows: unsigned char code A[]={0x00,0x3F,0x50,0x90,0x50,0x3F,0xAA}; it doesn't work at all or sometimes i get unpredicted results. but when i define the array in data memory and initialize the array as follows. can anyone help me? thanks A[1] = 0x00; A[2] = 0x3F; . A[6] = 0xAA
We cannot help you further unless you post the smallest complete program which shows the problem. Please copy and paste this from you editor - do not retype it.
have you ever tried to set the "code" definition in the first place. are you sure the array definition "A" is not defined elsewhere. Try out the following definition: code unsigned char MyArray[7]={0x00,0x3F,0x50,0x90,0x50,0x3F,0xAA};
thanks for your attention, and thanks foR your replay, actually there was nathing wrong with the code i had written, there was something wrong with the version of software i was using, i didn't know it was using a cracked one.