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.
hi am using 89c55 and wrote a code in c which acquires data from a serial device performs calculations and the gives an alarm when an abnormality is detected. when i compiled i got as Program Size: data=9.0 xdata=7569 code=4140. i used large memory model.it works well when i checked with keil simulator but when i burnt into my uc i don see any output. iam new to uc's should i add any eeproms before burning?? please help me out. thanks in advance.
regards, deepthi
I presume you mean:
"can I select a uC with flash memory >= my progran's code size?"
The answer should be obvious!
Think about it: If you buy a PC program that says it requires x MB RAM and y MB disk, can you use it on a PC that has more RAM and disk than that...?
"can I select a uC with flash memory >= my progran's code size?" sorry if iam not clear with this statement here i mean to ask if it is sufficient to consider code size in the selection of UC without considering the XDATA size, as it was said befor that the XDATA has nothing to do with flash memory size and it looks for RAM.so i just wanted to confirm that point.
and in the statement "what does data size represent" i wanted to know what exactly it represents as when i compiled my code in keil i got as Program Size: data=9.0 xdata=6320 code=3632.
in the beginning i thought that i can use 89c51 for my code what ever i had, later on with all of ur advice i understood that i have to add an external RAM as my XDATA is large.later i was suggested to go for UC with larger flash memory as my HEX file size is around 12K. This is the reason i raised an issue of "can I select a uC with flash memory >= my progran's code size?"
Please tell me if that is sufficient and also about the data=9.0
The flash memory can not be used instead of RAM. It is intended for code but you can instruct the compiler to place constants there too. But it is a type of read-only memory, so if you need to be able to regularly change the value of a variable then you need to look at something else.
DATA in this situation is one of several memory areas in your processor. The different memory areas in the processor has different capabilities, and requires different ways to access them. The DATA area is a RAM area built into the 8051 chip. The XDATA is another memory area, originally intended for use with extermal memory chips and requiring different processor instructions to access the variables. The 8051 can have internal and/or external XDATA memory. The DATA area is extremely limited in size, but it is possible to have very large XDATA support. The instruction set is intended for accessing up to 64kB of XDATA, but it is possible to get past this limit. People who think that 64kB of XDATA is little should probably look at other processor architectures instead.
You can use the following link and search for 8051 chips with enough space for your program and for your variables. http://www.keil.com/dd/search_parm.asp
Note that the colum for RAM has the heading "DATA +XDATA", giving the built-in amount of RAM for these two memory areas.
For configurations that are seldom changed, but must be remembered after a power loss, you can look at the column "On-chip EEPROM". But you are limited to 100.000 to 1000.000 writes/memory cell for most EEPROM, so it is a complement, but not suitable to use instead of RAM.
Thanks PER for that information..
That means that your program uses 9 bytes of DATA space and 6320 bytes of XDATA space and 3632 bytes of CODE space.
Clearly, this means that your target system must provide at least 9 bytes of DATA space and at least 6320 bytes of XDATA space and at least 3632 bytes of CODE space. Whether these are provided internally on the chip, or with external chips on your board (or a combination of both) is really immaterial.
PS
If you're still not sure of the differences between DATA, CODE, and XDATA spaces, then you still haven't sufficiently studied the basics of the 8051 architecture - including the so-called "bible". See the links provided earlier.
look up those two