basic memory organizion at 8051
Discussion in "Project Help" started by erez44 Mar 29, 2013.
Fri Mar 29 2013, 03:36 am
hello i want to understand how the memory is organize i know that i have rom and ram.
but inside ram i have data memory and idata memory what is the difference are they the same memory?
but inside ram i have data memory and idata memory what is the difference are they the same memory?
Fri Mar 29 2013, 11:53 am
in 8051 you only have data memory no idata as it only have 128 bytes of ram. Whereas if you go for 8052 architecture where you have 256 bytes or ram. lower 128 bytes are data and upper 128 bytes are idata.
Now the name data and idata differs in the way you can address them. idata can only be addressed indirectly i.e. using r0, r1 registers are pointers. e.g.
whereas data location can be accessed directly/indirectly i.e. method shown above and direct method e.g.
The reason idata can only be addressed indirectly, coz they overlap the SFR memory area. so if you access upper 128 bytes directly you read SFR region whereas if you read them indirectly you read idata region. Usually when writing assembly programs, idata is used for stack and lookup tables etc.
Hope this has helped you understanding difference in both memories
If you have any question do post again.
Tags 8051 memory organization8051 idata and data memory differencekeil idata region8051 idata memory
Now the name data and idata differs in the way you can address them. idata can only be addressed indirectly i.e. using r0, r1 registers are pointers. e.g.
mov r0, #81h ;load r0 with 81h memory location mov a, @r0 ;read 81H location
whereas data location can be accessed directly/indirectly i.e. method shown above and direct method e.g.
mov a, 7fH
The reason idata can only be addressed indirectly, coz they overlap the SFR memory area. so if you access upper 128 bytes directly you read SFR region whereas if you read them indirectly you read idata region. Usually when writing assembly programs, idata is used for stack and lookup tables etc.
Hope this has helped you understanding difference in both memories

Fri Mar 29 2013, 10:39 pm
thanks mister i appreciate your answer do you know where i find material to read about it?
Tue Apr 02 2013, 04:32 pm
or just read MCS51/8051 user manual. Download it from here:
http://www.8051projects.net/download-c16-8051-ebooks-tutorials.html
http://www.8051projects.net/download-c16-8051-ebooks-tutorials.html
Powered by e107 Forum System