GENERAL: SYSTEM ARCHITECTURE AND ASSEMBLY PROGRAMMING
Information in this article applies to:
I'm new to the 8051 and I need to understand more about the CPU architecture. Is there any good literature available to get a better understanding for the hardware and the instruction set?
My questions are:
First, you should obtain a detailed understand of the 8051 hardware architecture. One of the best documents on this subject is the original Intel MCS(R) 51 Microcontroller Family User's Manual. This manual is available from the Intel Web Site.
Chapter 1: MCS 51 Family of Microcontrollers Architectural Overview answers your first question, "What is the difference between ACC and A?". In the Addressing Modes section, it clearly explains REGISTER SPECIFIC INSTRUCTIONS where the Accumulator is referred as A and DIRECT ADDRESSING where ACC is used to specify the SFR address of the Accumulator. Chapter 2: Programmer's Guide and Instruction Set provides a complete description of all CPU instructions. Here you will see that some instructions are only available with DIRECT ADDRESSING. For example, there is no instruction to PUSH the Accumulator. However, you can PUSH the ACC SFR (which effectively does the same thing).
Next, you should start writing assembler programs with a good quality toolset (like the Keil 8051 Development Tools). If you do not already have the Keil tools you may download the C51 Evaluation Tools. The Keil tools come with the µVision2 Getting Started User's Guide which provides the information required to operate the tools. The Assembler/Utilities User's Guide presents all the Assembler and Linker directives. A complete assembler project is provided in the \KEIL\C51\EXAMPLES\ASM folder. You may use the µVision2 Debugger/Simulator to test this small example program.
The Keil C51 toolchain comes with an assembler file template (\KEIL\C51\ASM\TEMPLATE.A51) that provides a good starting point for structuring modular assembler programs. Refer to this template for answers to your final three questions.
Last Reviewed: Friday, June 2, 2006
of your data.