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.
Pardon me for my ignorance as I am completely new to the 8051. I do have a query which I hope someone can help me with. I am using the 89C51RD2 which has 1KB internal RAM. When I compile my C code in "SMALL" memory model, it gives the error that the data segment is too large. Alternative, the code can only be compiled if "LARGE" memory model is used. However, I have used this code with a x86 compiler for a x86 processor and the data is actually much less than 1KB? Thank you in advance. Why is it that I still get the error that the data segment is too large when my data is actually less than 1KB?
C51 User's Manual answers all your questions, please read this page and the following ones. http://www.keil.com/support/man/docs/c51/c51_le_memareas.htm By the way, 89C51RD2 total RAM is 256 bytes IDATA, plus 1024 bytes XDATA; IDATA area contains DATA and BDATA areas. Please study the 51 family manual for a better understanding of the 51 Harvard architecture.