What is Program counter and Rom space in the 8051?
We inspect or examine the capacity of the program counter (PC) listing in executing or implement an 8051 program. We also discuss or talk over ROM memory space or capacity for various 8051 family members.
Program counter and ROM space image-1 |
Program counter in the 8051
Another important or main register in the 8051 is the (program counter) PC. The program counters points or tip to the address of the next instruction or command to be executed. However, not all members or a constituent piece of a complex structure of the 8051 have the entire 64K bytes of on-chip ROM installed or put, as we will see soon.
Where the 8051 wakes
One question that we must ask or query about any microcontroller (or microprocessor) is: At what address does the CPU come to or wake up upon applying power to it? Each microprocessor is different or unlike. The 8051 family the microcontroller come to at memory address 0000 (that is, all members regardless and variation), when it is powered up. By force or powering up we mean applying Vcc to the RESET pin. In other words, when the 8051 is powered or force up, the PC (program counter) has the value of 0000 in it. Looks for the first instruction or command when it is booted. We achieve this by the ORG statement or declaration in the source program as shown earlier.
Placing code in program ROM
To get a better understanding or grip of the role of the program counter in fetching or adorable and executing or perform a program, we examine or survey the action of the program counter as each instruction or command is fetched or get and executed. As we can see, the opcode and operand for each instruction or command are listed on the left side of the list file.
After the program or plan is burned into ROM of an 8051 family member like as AT8951 or 8751, the opcode and operand are placed or set in the ROM memory locations starting at 0000.