8051 Instructions 8051 Micro-controller by Ravinder Nath Rajotiya - April 19, 2019June 10, 20190 Instructions of 8051 An instruction performs a specific operation. The instructions in 8051 can be classified as per the size they take up in memory or as per the function they perform. Classification as per Size Single Byte instructions Two Byte instructions 3 Byte Instructions Classification based on the function Data Transfer Instruction : MOV, MOVC, MOVX, SWAP, XCH, XCHG, PUSH, POP Arithmetic Instruction : ADD, ADDC, INC, SUB, SUBB, DEC, DA, MUL, DIV Branch Type Instructions : ACALL, LCALL, JMP, SJMP, Logical Instructions Rotate Instructions Date Transfer Instructions These are used to move or transfer data from source to destination. The source may be an immediate data, a register or a RAM or ROM location, the destination may be a register or
8051 Addressing Modes 8051 Micro-controller by Ravinder Nath Rajotiya - April 19, 2019June 10, 20190 Addressing Modes in 8051 The operands may be an immediate value, a value in registers or in memory. The way in which the operands are fetched by thee 8051 microcontroller is called as the addressing modes. 8051 supports the following types of addressing modes. Immediate addressing mode Direct addressing mode Register direct addressing mode Register indirect addressing mode Indexed addressing mode Immediate Addressing Mode In this addressing mode, an immediate 8-bit is part of the instruction. Here source is an immediate data, Destination can be a register or register indirect or direct memory Examples MOV @Rn, #data MOV A, #data ; Instruction size is 2 byte, 1-byte opcode(74) and 1-byte data MOV direct, #data MOV Rn,#data MOV DPTR,#data ; 3-byte instruction The #data is an eight bit constant and may be
General features of a 8051 Microcontroller 8051 Micro-controller by Ravinder Nath Rajotiya - April 19, 2019June 10, 20190 Features of Microcontrollers : Microcontrollers are the system-on-chip devices, where emphasis is on reducing the chip count in the system as a whole. The number of features has been integrated inside it, and is described below: Clocking: They have an internal clocking circuit that allows easy interfacing of an external crystal with few capacitors or with an external clock input. They may also have an internal ring oscillator allowing it to run from the internally generated clock input. These clock inputs are used to synchronize the internal operations and to help in sequencing the execution of instructions as an an instruction cycle require a specific number of states or clock inputs. Internally, 8051 generates a two phase clock requiring the microcontroller six ‘T’
8051 PIN Diagram and 8051 Block Diagram 8051 Micro-controller by Ravinder Nath Rajotiya - April 19, 2019June 10, 20190 Internal Architecture 8051 Microcontroller: The 8051 is a low-power, high-performance CMOS 8-bit microcontroller with 4K bytes of in-system programmable Flash memory. The device is manufactured using Atmel’s high-density nonvolatile memory technology and is compatible with the industry-standard 8051 instruction set and pinout. The initial version of 8051 used 4 KByte ROM whereas later version employed on-chip flash allows the program memory to be reprogrammed in-system or by a conventional nonvolatile memory programmer. By combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip, the 8051 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications. The 8051 provides the following standard features: 4K bytes of ROM 128 bytes of RAM 4 i/o ports
8051 Internal Architecture 8051 Micro-controller by Ravinder Nath Rajotiya - April 19, 2019May 8, 20220 8051 Internal Architecture 8051 microcontroller was developed by Intel in 1980s. It is an 8-bit controller and is based on Harvard Architecture which uses two separate memory for storing program and data. The internal architecture describes the organization of the internal components of 8051. Figure 5.1 shows the internal architecture of 8051. Internal components of 8051 Internal Memory: 8051 has two separate memory blocks these are program memory (ROM) and data memory (RAM). Data Memory RAM is used as data memory. 8051 has 256 byte of direct addressable memory and 128 byte indirect addressable memory. 256 Byte RAM includes four register banks named bank 3 through bank 0. Each bank contains 8-register each of 8-bits. they are name R7 through R0. It also include 16