Category: 8051 Micro-controller

8051 Rotate Instructions

ROTATE INSTRUCTIONS These instruction rotate the accumulator left, or right with or without carry. The instructions are RR, RRC, RL, RLC. RL Instruction The RL instruction rotates accumulator left one bit left Figure shows how the bits rotate left internally and then bit-7 to bit-0 No flags are affected by this instruction Figure 7.1 : Rotate left […]

8051 Conditional Branch Instructions

CONDITIONAL BRANCH INSTRUCTIONS CJNE The CJNE instruction compares the first two operands and branches to the specified destination if their values are not equal. If the values are the same, execution continues with the next instruction. format example Operation Opcode/ Encoding Flags affected Byte Cycles CJNE @Rn, #immd,offset CJNE @R1, #24h,label PC=PC+3 If (Rn) <>#data PC=PC+offset If(Rn) […]

Subroutine Call and Return Instructions

Branch Type Instructions   These are of two types: Subroutine CALL Instruction JMP Instruction Unconditional JMP Conditional JMP Subroutine Call Instructions: These instructions are used to calls a subroutine located at the specified address. There are two subroutine Call instructions, theses are ACAL and LCALL instruction ACALL Instruction Size                 : Two bytes Requirement  : […]

8051 Arithmetic Instructions

Arithmetic Instructions One of the operand in arithmetic type of instruction is accumulator. Other operand, if there, will be immediate value, direct memory, register, register indirect, except in case of MUL and DIV where register B is used to hold the value of the 2nd operand. ADD   Format of Instruction Opcode/Encoding Example and Operation […]

8051 Data Transfer Instructions

Date Transfer Instructions Used to move a source data to destination MOV Instruction Instruction/Addressing Opcode Subsequent Byte Example and Operation Flags Affected MOV Rn, #immediate   01111nnn MOV R4, #5h None MOV A, #Immediate 01110100 Immediate MOV A, #0FFh P MOV @Rn, #immediate 0111011n Immediate MOV @R0, #05h None MOV direct, #immediate   01110101 Direct,  […]

8051 Instructions

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, […]

8051 Addressing Modes

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 […]

care4you © 2014 care4you © Revision-1: 2016 care4you © Revision-2: 2019 Connect On Facebook DMCA.com Protection Status
error: Content is protected !!