230 likes | 832 Views
Advanced features of this set of instruction range to increment, decrement and adjust decimal operations.<br><br>
E N D
Instruction Set of 8051 Microcontroller Let’s Explore!
Agenda • Types of Instructions • Data transfer instructions. • Arithmetic instructions • Logical Instructions • Program Control Instructions • Bit manipulation instructions
Types of Instructions in 8051 MC • Data transfer instructions. • Arithmetic instructions • Logical Instructions • Program Control Instructions • Bit manipulation instructions
Data transfer instructions Data transfer instructions are used to transfer the data between registers, memory, and ports. This is a kind of data movement instruction, application of which performs movement of data from one location to other locations. Examples: • MOV destination, source. • XCH • XCHD • PUSH and POP
Arithmetic instructions Arithmetic instructions of 8051 Microcontroller performs arithmetic operations like addition, subtraction, multiplication, and division. Advanced features of this set of instruction range to increment, decrement and adjust decimal operations. Examples: • ADD A, byte • SUBB A, byte • MUL AB • DIV AB • INC byte • DEC byte • DAA
Logical Instructions The instruction performs logical operation between the source byte and destination byte. Example: • ANL destination, origin • ORL destination, origin • XRL destination, origin In case of Accumulator • CLR A • CPL A • SWAP A • RL A. • RLC A • A. RR. • A. RRC.
Bit manipulation instructions Bit manipulation instructions are used to manipulate the value of specified bit. It either sets, resets or complement the value of the destination bit. For example: • CLR bit • SETB bit • CPL bit