Universal College Of Engineering & Technology UCET 1/27.

Slides:



Advertisements
Similar presentations
EECC250 - Shaaban #1 Lec # 2 Winter Addressing Modes  Addressing modes are concerned with the way data is accessed  Addressing can be.
Advertisements

9/20/6Lecture 3 - Instruction Set - Al Instruction Set.
Department of Computer Science and Software Engineering
COMP3221: Microprocessors and Embedded Systems
COMP3221: Microprocessors and Embedded Systems--Lecture 7 1 COMP3221: Microprocessors and Embedded Systems Lecture 7: Arithmetic and logic Instructions.
COMP3221: Microprocessors and Embedded Systems--Lecture 7 1 COMP3221: Microprocessors and Embedded Systems Lecture 7: Arithmetic and logic Instructions.
© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Chapter 5 Arithmetic and Logic Instructions.
Chapter 4 Basic Instructions. 4.1 Copying Data mov Instructions mov (“move”) instructions are really copy instructions, like simple assignment statements.
ARM Instructions I Prof. Taeweon Suh Computer Science Education Korea University.
Rabel Talpur:12BME#025.  40-pin chip  Developed by Motorola in 1975  16 address lines and 8 data lines  Used only +5V.
INSTRUCTION SET OF MICROPROCESSOR 8085
The M68HC11 Basic Instruction Set Basic Arithmetic Instructions
The 8051 Microcontroller and Embedded Systems
Digital 2 : EKT 221. Today’s Outline RTL Arithmetic Operations Conditional Register Transfer RTL Logical Operations RTL Shift Operations.
Khaled A. Al-Utaibi  Introduction  Arithmetic Instructions  Basic Logical Instructions  Shift Instructions  Rotate Instructions.
9/20/6Lecture 3 - Instruction Set - Al Instruction Set (2)
Chapter four – The 80x86 Instruction Set Principles of Microcomputers 2015年10月19日 2015年10月19日 2015年10月19日 2015年10月19日 2015年10月19日 2015年10月19日 1 Chapter.
Microprocessor Dr. Rabie A. Ramadan Al-Azhar University Lecture 7.
BITWISE OPERATIONS – Microprocessor Asst. Prof. Dr. Choopan Rattanapoka and Asst. Prof. Dr. Suphot Chunwiphat.
Arithmetic Flags and Instructions
Microprocessor Dr. Rabie A. Ramadan Al-Azhar University Lecture 8.
Arithmetic and Logic Instructions
Arithmetic and Logic Chapter 5
Assembly Language Programming of 8085 BY Prof. U. V. THETE Dept. of Computer Science YMA.
III] Logical Group 1)ANA r : LOGICAL AND REGISTER WITH ACCUMULATOR Format : [A] [A] Λ [r] Addressing : Register addressing Group : Logical group Bytes.
King Fahd University of Petroleum and Minerals King Fahd University of Petroleum and Minerals Computer Engineering Department Computer Engineering Department.
ECE 447: Lecture 11 Introduction to Programming in Assembly Language.
Microprocessor & Assembly Language Arithmetic and logical Instructions.
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization.
MIPS Arithmetic and Logic Instructions
“ INSTRUCTIONS SET OF AVR MICROCONTROLLER ” SIGMA INSTITUTE OF ENGINEERING Prepared By: SR.NO NAME OF STUDENT ENROLLMENT 1 Abhishek Lakhara
Unit 1 Instruction set M.Brindha AP/EIE
Data Transfers, Addressing, and Arithmetic
Microprocessor Systems Design I
Overview of Architecture Assembly Programming Concepts
Classification of Instruction Set of 8051
Assembly Language Programming of 8085
Microprocessor T. Y. B. Sc..
3.Instruction Set of 8085 Consists of 74 operation codes, e.g. MOV
The Cortex-M3/m4 Embedded Systems: Cortex-M3/M4 Instruction Sets
COMP2121: Microprocessors and Interfacing
Microprocessor Systems Design I
Lecture Set 5 The 8051 Instruction Set.
Introduction to 8085 Instructions
Microcomputer Programming
Overview Introduction General Register Organization Stack Organization
The University of Adelaide, School of Computer Science
Data Processing Instructions
Arithmetic and Logic Chapter 5
68000 Arithmetic Instructions
The 8051 Assembly Language Arithmetic & Logic Instructions
Chapter 11 © 2011, The McGraw-Hill Companies, Inc.
MISP Assembly.
Computer Architecture & Operations I
INSTRUCTION SET OF 8085.
Addressing Modes Register Direct, with 1 and 2 registers I/O Direct
Topic 6: Bitwise Instructions
COMP3221: Microprocessors and Embedded Systems
Programmer’s View of the EAGLE
MIPS History MIPS is a computer family
MIPS Assembly.
Arithmetic and Logic Chapter 5
Branching instructions
Chapter 5 Arithmetic and Logic Instructions
MIPS Assembly.
MIPS History MIPS is a computer family
CS501 Advanced Computer Architecture
MIPS Arithmetic and Logic Instructions
MIPS Arithmetic and Logic Instructions
Arithmetic and Logic Chapter 3
Presentation transcript:

Universal College Of Engineering & Technology UCET 1/27

MICROCONTROLLER AND INTERFACING Guided By : Prof. Parth Patel Soni Kapil EC 5 TH SEMESTER UCET 2/27

UCET 3/27 ADD INSTRUCTION Mnemonic: ADD Rd, Rr Operation: This instruction adds the contents of source register Rr with the contents of destination register. Example: ADD R3, R4 This instruction adds the contents of registers of R3 and R4 and result is placed in R3 register.

UCET 4/27 ADC INSTRUCTION Mnemonic: ADC Rd, Rr Operation: This instruction adds the contents of source register Rr with the contents of destination register and carry. Example: ADC R4, R1 This instruction adds the contents of registers of R4 and R1 with carry and result is placed in the R4 register.

UCET 5/27 ADIW INSTRUCTION Mnemonic: ADIW Rd+1:Rd,K Operation: This instruction adds immediate data to a register pair and stores the result in the register pair. Example: ADIW R25:R24,3 This instruction adds 3 to the contents of register pair R25:R24. The result is placed in the register pair R25:R24.

SUB INSTRUCTION Mnemonic: SUB Rd, Rr Operation: This instruction subtracts the contents of source register Rr from the contents of destination register and result is placed in the destination register. Example: SUB R3, R4 This instruction subtracts the contents of register of R3 from register R4 and result is placed in the R3 register. UCET 6/27

UCET 7/27 SUBI INSTRUCTION Mnemonic: SUBI Rd, K Operation: This instruction subtracts the contents of constant K from the contents of register Rd and places the result in register Rd. Example: SUBI R20, 0x10 This instruction subtracts 0x10 from the contents of register R20 and result is placed in register R20.

UCET 8/27 SBC INSTRUCTION Mnemonic: SBC Rd, Rr Operation: This instruction subtracts the contents of source register Rr and carry from the contents of destination register and result is placed in the destination register. Example: SBC R3, R4 This instruction subtracts the contents of R4 and carry C from the contents of register R3 and result is placed in the destination register.

UCET 9/27 SBCI INSTRUCTION Mnemonic: SBCI Rd,K Operation: This instruction subtracts the contents of constant K and carry C from the contents of register Rd and places the result in the register Rd. Example: SUBI R24, 0x20 SBCI R25, 0x44 subtract 4420 from R25:24 register pair R24=R24-20 R25=R25-44-C subtract high byte with carry

SBIW INSTRUCTION Mnemonic: SBIW Rd+1:Rd,K Operation: This instruction subtracts the contents of constant K from the contents of register pair Rd+1: and places the result in the register pair Rd+1:Rd. Example: SBIW R25:R24, 3 This instruction subtracts 3 from the contents of register pair R25:R24. The result is placed in the register pair R25:R24. UCET 10/27

UCET 11/27 AND INSTRUCTION Mnemonic: AND Rd,Rr Operation: This instruction logically ANDs the contents of source register Rr with the contents of destination register and result is placed in the destination register. Example: AND R3, R4 This instruction logically ANDs the contents of register R3 and R4 and result is placed in the register R3.

AND INSTRUCTION Mnemonic: ANDI Rd, K Operation: This instruction logically ANDs the contents of register Rd with constant K and places the result in register Rd. Example: ANDI R18, 0xFo This instruction logically ANDs the contents R18 with F0 H and result is placed in register Rd. UCET 12/27

UCET 13/27 OR INSTRUCTION Mnemonic: OR Rd,Rr Operation: This instruction logically ORs the contents of source register Rr with the contents of destination register and result is placed in the destination register Example: OR R3, R4 This instruction logically Ors the contents of source register R3 and R4 and result is placed in the R3 register.

UCET 14/27 ORI INSTRUCTION Mnemonic: ORI Rd, K Operation: This instruction logically ORs the contents of register Rd with constant K and places the result in the Register Rd. Example: ORI R18, 0xF0 This instruction logically Ors the contents of register R18 with F0H and result is placed in in register R18.

UCET 15/27 EOR INSTRUCTION Mnemonic: EOR Rd, Rr Operation: This instruction logically Ex-Ors the contents of source register Rr with the contents of destination register Rd and result is placed in the destination register Rd. Example: EOR R3, R4 This instruction logically Ex-Ors the contents of register R3 and R4 and result is placed in register R3.

COM INSTRUCTION Mnemonic: COM Rd Operation: This instruction finds the 1’s complement of the value in register Rd and the result is stored in in Rd. Example: COM R2 Find 1’s complement of the number in R2 UCET16/27

NEG INSTRUCTION Mnemonic: NEG Rd Operation: This instruction finds the 2’s complement of the value in register Rd and the result is stored in Rd. Example: NEG R10 Find 2’s complement of the number in R10. UCET17/27

SBR INSTRUCTION Mnemonic: SBR Rd, K Operation: This instruction sets the bits specified in register Rd, performs logical OR Operation with the contents of register Rd and stores the result in register Rd. Example: SBR R18, 2 The instruction sets bit 2 in register R18. UCET 18/27

CBR INSTRUCTION Mnemonic: CBR Rd, K Operation: This instruction clears the bits specified in register Rd, performs the logical AND operation with the contents of register and stores the result in Rd Example: CBR R18, 2 This instruction clears bit 2 in register R18. UCET19/27

INC INSTRUCTION Mnemonic: INC Rd Operation: This instruction increment the contents of register Rd by 1 and result is stored in register Rd. Example: INC R20 This instruction increment the contents of the register Rd by 1 and result is stored in register Rd UCET20/27

DEC INSTRUCTION Mnemonic: DEC Rd Operation: This instruction decrement the contents of register Rd by 1 and result is stored in register Rd. Example: DEC R16 This instruction decrement the contents of R16 by 1. UCET21/27

TST INSTRUCTION Mnemonic: TST Rd Operation: This instruction is used to test a register for zero or negative, a logical AND operation is done. Example: TST R2 Test register R2 UCET22/27

CLR INSTRUCTION Mnemonic: CLR Rd Operation: This instruction clears a register Rd by performing logical Ex-OR operation with itself. Example: CLR R16 This instruction will clear the register. UCET23/27

SER INSTRUCTION Mnemonic: SER Rd Operation: This instruction loads register Rd with FF H Example: SER R19 This instruction sets all the bits of register R19=FF H UCET24/27

MUL INSTRUCTION Mnemonic: MUL Rd, Rr Operation: This instruction multiplies an eight bit unsigned integer in the register Rr with the unsigned number Rd. Example: MUL R5, R2 This instruction multiplies the unsigned number in register R5 and R2 and result is placed in R1 and R0 register. UCET25/27

MULS INSTRUCTION Mnemonic: MULS Rd, Rr Operation: This instruction multiplies an eight bit signed integer in the register Rr with the signed number in register Rd. Example: MULS R25, R2 This instruction multiplies the signed number in register R25 and R2 and result is placed in R1 and R0 register. UCET26/27

MULSU INSTRUCTION Mnemonic: MUL Rd, Rr Operation: This instruction multiplies an eight bit unsigned integer in the register Rr with the signed number in register Rd. The low order byte of the sixteen bit product is left in the register R0 and the high order byte in register R1. UCET 27/27