Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
07/03/09 08:34
Read: times


 
#166687 - How to use on-chip RAM for array storage in Keil?
I am developing a project for Nokia 3310 LCD having a resolution of 84x48 pixels. Since this LCD's not readable, I wanted to have the image data stored in an array of 504 Bytes (84*48/8) external to the LCD.

I had 2 options for this: use external RAM (not feasible in this project) or use a uC with higher on-chip RAM. 89S52 had only 256 Bytes RAM so I tried to use 89V51RD2 with 1 kB RAM (in "Device selection for target" in keil)

I have following queries:

1) How to allocate 504 Bytes in RAM? I tried unsigned char image_buffer[504] but it says error C249: 'DATA': SEGMENT TOO LARGE (for any array >128 Bytes)

2) The max array size of image_buffer is 112 Bytes. The corresponding build O/P is:
Program Size: data=129.0 xdata=0 code=1502
creating hex file from "nokia3310"...
"nokia3310" - 0 Error(s), 0 Warning(s).
If I try unsigned char image_buffer[113], address space overflows. So what is this 'data' & where is it stored? In RAM?

3) This problem is there irrespective of using 89S52 or 89V51RD2! So where is the difference in available memory if address space overflows for same array? How can I use the extra RAM of RD2?

List of 14 messages in thread
TopicAuthorDate
How to use on-chip RAM for array storage in Keil?            01/01/70 00:00      
   Basics: 8052 Memory Spaces            01/01/70 00:00      
      The message doesn't exist            01/01/70 00:00      
   data, xdata            01/01/70 00:00      
      Incorrect            01/01/70 00:00      
         Getting it now....            01/01/70 00:00      
            Not quite            01/01/70 00:00      
               I got it completely now!            01/01/70 00:00      
   Some possible answers..Munish            01/01/70 00:00      
      Thanks!            01/01/70 00:00      
      "RAM" and "Data Memory" are not synonymous            01/01/70 00:00      
         Agreed            01/01/70 00:00      
      NO WAY            01/01/70 00:00      
         Thanks for correcting me            01/01/70 00:00      

Back to Subject List