Sunday, 21 April 2013

Advanced Embedded C Class 1

8051 Memory Configurations:

START END MEMORY CLASS
C:000000H C:00FFFFH CODE
C:000000H C:00FFFFH CONST
I:000000H I:0000FFH IDATA
I:000000H I:00007FH DATA
I:000020H.0 I:00002FH.7 BIT
X:000000H X:00FFFFH XDATA


Code memory starts from zero , but this is reserved for program.It typically executes from C:0000h
to C:FFFFh.The code segment is accessed via program counter(PC).

DATA memory is on chip RAM which starts from D:00 to D:07fh.This RAM can be used for program variables. This is directly addressable.

IDATA memory is also on chip RAM which starts from I:00h to I:FFh. Here IDATA includes DATA memory(00h to 7fh) also which is also indirectly addressable.It is only indirectly addressable and is prefixed by I.

XDATA memory is off chip memory.This exist in external RAM device and X stands XDATA.The DPTR is used to access the XDATA memory.

Memory Models:

There are three memory models SMALL,COMPACT,LARGE

SMALL:
All variables and parameter passing segments are using this model.

COMPACT:

--Site under construction---