hello, i'm using AT80C31X2 uC. Keil V3.33 i've declared an array as follows:
unsigned char pdata array_1[8][16];
i got an error code "error C241: 'main': auto segment too large" I've tried to work in compact rom code size and declarde the arrat as follows:
unsigned char pdata array_1[8][16]; unsigned char data *p1; p1 = &array_1[0][0]; unsigned char code numerics[] = { 0x00,0x00,0x3c,0x7e,0x66,0x66,0x66,0x66,0x66,0x66,0x7e,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x7e,0x66,0x66,0x7e,0x7c,0x60,0x60,0x7c,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x7e,0x66,0x66,0x3c,0x7c,0x66,0x66,0x7e,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x7e,0x60,0x60,0x60,0x60,0x30,0x18,0x0c,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x7e,0x46,0x06,0x3e,0x7e,0x66,0x66,0x7e,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x7e,0x06,0x06,0x7e,0x7e,0x60,0x62,0x7e,0x7c,0x00,0x00,0x00,0x00,0x00,0x00,0x66,0x66,0x66,0x66,0x7e,0x7e,0x60,0x60,0x60,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x7e,0x42,0x60,0x78,0x38,0x60,0x66,0x7e,0x3c,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x7e,0x42,0x60,0x30,0x18,0x0c,0x06,0x7e,0x7e,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x38,0x3c,0x34,0x30,0x30,0x30,0x30,0x30,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x3c,0x7e,0x66,0x66,0x66,0x66,0x66,0x66,0x7e,0x3c,0x00,0x00,0x00,0x00 }; for (z = 0; z < 16; z++) { // scan all rows *(p1 + z) = numerics[z + sd0]; *(p1 + 16 + z) = numerics[z + sd1]; *(p1 + 32 + z) = numerics[z + md0]; *(p1 + 48 + z) = numerics[z + md1]; *(p1 + 64 + z) = numerics[z + hd0]; *(p1 + 80 + z) = numerics[z + hd1]; } for (z = 0; z < 16; z++) { P1 = *(p1 + 16 + z); }
Only in simulation the values in the array are passed to P1 correctly. I read all the manuals of Keil and search the forum but still can't figure why it doesn't work. in real i recieve an address from 9 to F. any suggesion please.
80c31 where did you find that anachronism?
how much XDATA (external RAM) do you have?
Erik
My project is a dot matrix display 16(rows)x192(bit's wide) (8x8 dot), and i need this array for shifting the bits all together in a loop. i don't have any XDATA at all. does external RAM is necessary for this kind of job ? or can you recommend another uC with 40DIP socket to hold this amount of data ?
Only the array takes about 375 Byte's, ... i don't have any XDATA at all. so where do you propose to put the 375 bytes, can you put them in codespace i.e. will they ever change?
can you recommend another uC with 40DIP socket to hold this amount of data
find it in "the Keil device database"
http://www.keil.com/dd/parm_search.asp