i am using keil microvision 2 . i want to interface 64kb sram with 8051 suggest me code . i know hardware interfacing but i am confused among xdata ,compact,small,large memory models suggest me how to use this with example.
"i am confused among xdata, compact, small, large memory models" XDATA is not a memory model - it's an address space. Keil uses "XDATA" to mean "memory accessed by using the MOVX instruction" So your external SRAM will be all XDATA. To have the compiler put variables into XDATA (and, thus, into your external SRAM), define them with the xdata keyword. For details, see the C51 Manual compact, small, and large are Memory Models. The Memory Model defines the default location for variables when you don't explicitly state a memory space. It's also where the compiler will put function parameters, etc. Again, this is describes in the the C51 Manual
http://www.keil.com/support/man/docs/c51/c51_le_memareas.htm http://www.keil.com/support/man/docs/c51/c51_le_memmodels.htm http://www.keil.com/support/man/docs/c51/c51_le_memtypes.htm
Andy, what a nice post. Now I wonder, when will Pranam be back with a question "where in the manual ios?" Erik
"when will Pranam be back with a question 'where in the manual is?'" Here: http://www.keil.com/forum/docs/thread7377.asp And here: http://www.keil.com/forum/docs/thread7410.asp#msg34248