Tuesday, July 19, 2011

Overview: An intro to 8051 microController part 2

--> One of the important registers in 8051 is the PROGRAM COUNTER. Its width is 16 bit allowing 8051 to access memory address from 0000 to FFFF a total 0f 64K of memory. Though not all 8051 have a 64K of memory.


--> Different microProcessor wakes up at different locations when they are powered up. But microControllers are one unified group of -----. When they are powered up they all woke up at same place that is at memory address 0000H.


--> So when writing code for controller our program should start from memory address 0000H.


--> STACK IN 8051 is a section of RAM used by the CPU to store information temporarily. This information could be data or address. As there are only a limited number of registers therefore CPU needs some storage.


--> The register used to access stack is STACK POINTER REGISTER. This in 8051 is only 8 bits wide. When 8051 is powered up SP has a default value of 07. This means that RAM location 08 is the first location used for STACKING by 8051.


--> STACK POINTER points to last used location of the stack. So when data is PUSH is execute the SP is incremented by one. When its POP is executed the SP is decremented by one.


--> STACK can only be used between 08H to 1FH ie 28 bytes. If we need more than that we have to use address between 30H to i think 6FH or 7FH.

No comments:

Post a Comment