2. General Architecture of Microcontrollers
8051 was based on 8 bit architecture designed and produced by Intel. It was organized in 40 external hardware pins, 128 bytes of RAM Random Access Memory, 4Kb of ROM Read Only Memory Program Storage with 2 timers with 16 bit values. It has 4 ports with 8 bit architecture. With the integration of crystal oscillators to provide pulse frequency of 12 MHz. It uses internal registers in CPU for temporary storage: Accumulator, B register, Stack Pointer (SP), R register, Program Counter (PC), Data Pointer (DPTR).
4. Addressing Modes and Data Move Operations
This chapter focuses on different addressing modes of 8051 microcontrollers, these are 1 byte, 2 byte instructions used in addressing modes. Using 8 bit long opcode 256 opcodes can be generated and can be used. With the 12 Mhz frequency system can execute 64 instructions in just 1 microsecond example multiplication, addition and division. Six types of addressing modes for data movement in 8051 are Immediate Addressing Mode, Register Addressing Mode, Direct Addressing Mode, Register Indirect Addressing Mode, Indexed Addressing Mode, Implied Addressing Mode.
There are 24 Arithmetic instructions in 8051 with 64 opcodes.Add, ADDC, SUBB, Carry Flag(CY), Auxiliary Carry(AC) and OverFlow(OV) instructions. These are all important instructions used by microcontrollers for every arithmetic operation. Without which embedded application can not be developed. In this chapter we will learn how to use all these instructions and later, will develop applications.
While executing instructions in 8051 there are some situations when an application jumps from one location to another instruction block to execute some special tasks. Example calling delays, loops, sub functions etc can be executed using branching functions SJMP, AJMP, LJMP, LCALL, ACALL, SCALL.7. Programming Examples
This chapter focuses on live examples using programming language. A detailed example will teach you how to write program coding, timers, interrupts, internal and external routines. How to connect the external world with help of ports and RS22.
8. Subroutines and Stacks
Stack are memory locations in every microcontroller in Read and Write Memory. During the execution of an application, stack is used to store information in the memory for later use by system. It also stores the return address for subroutine calls. Values produced by application are stored in memory for later use, this data is stored in stack pointer and received when we need this data.
Under the logical operation group there are 25 different instructions in 8051 architecture and they can be used easily as per the requirement in development. 49 opcodes with Carry Flag that affect RRC and RLC instructions. These boolean operators are AND, OR, XOR, NOT and Mnemonic are ANL, ORL, XRL and CPL. Every instruction has its own role in applications. There are two types of boolean operations in 8051 architecture: logical operation and bitwise operations.
10. Boolean Variable Manipulation
11. Programming Examples:
In this chapter the author puts light on live practical examples, it is not easy to understand the working of any embedded system using simple theoretical language, we need to understand every practical given in this chapter so that we should have a complete hold on practical development of applications.
12. Advanced Instructions
Here comes some advanced chapters for some advanced engineers or for those who want to learn some advanced technique of 8051 application development. Author focuses on live advanced instructions.
14. External Interrupts
8051 Microcontroller consists of various important interrupts; they are 2 external interrupts, 1 serial interrupt and 2 Timer interrupts. External interrupts name are external interrupt 0(INT0) and external interrupts1(INT1). They are activated from external events. When they receive some external interruption they execute the code inside it.
17. Interfacing: External Memory
At the end of this chapter, the reader will be capable of interfacing external memory types like RAM (Random Access Memory), ROM(Read Only Memory) with the help of the internal memory register and functionality. In this chapter you will be introduced to interfacing RAM with MCS51 architecture, timing circuits and others.
From Chapter 18-19: you will learn various interfacing techniques like keyboards, DAC and ADC, LCD displays, DC Motors, Servo Motors, Stepper Motors etc. These entire chapters are based on interfacing.
24 Power Management of Microcontrollers
25 Case Study: An Home Protection System
26 Advanced Microcontrollers
27: Interfacing Intel 8255 PPI with 8051
Appendix A: MCS-51 Instruction Set
Appendix B: 8051 Programs using C
Appendix C: Intel MCS – 51 Programmer’s Guide and Instruction Set