CN310 Microprocessor Systems Design
|
|
- Bryan Thornton
- 5 years ago
- Views:
Transcription
1 CN310 Microprocessor Systems Design Instruction Set (AVR) Nawin Somyat Department of Electrical and Computer Engineering Thammasat University
2 Outline Course Contents 1 Introduction 2 Simple Computer 3 Microprocessor Architecture 4 Memory 5 Peripherals 6 Applications Outline 1 Instruction Set Instruction Set Memory Spaces Registers 2 AVR Microntroller Instruction Memory AVR Register File 3 AVR Addressing Modes 4 AVR Instructions CN310 Microprocessor Systems Design 2 / 35
3 Instruction Set Instruction set: a set of operations that can be performed on a processer. machine language (binary) machine dependent opcode + (0 or more) operands common operations: arithmentic and logic e.g. ADD, SUB, AND, OR data movement/transfer e.g. MOV, LD, IN, OUT control flow e.g. JMP, BREQ, CALL, RET special/extra/misc operations e.g. SEI, CLI, NOP, SWAP instruction length fixed e.g. RISC variable e.g. CISC addressing mode - where to get/set operand(s) result - effect of executing an instruction CN310 Microprocessor Systems Design 3 / 35
4 Memory Spaces Memory spaces: code space Flash - main code, sometimes also for table data EEPROM - additional code, secondary condtant data data space RAM - main data operation storage Some instruction may be able to access only in certain area in memory spaces. In Harvard architecture: same memory address may refer to different memory space depending on instruction. operations are mostly performed on registers in register file I/O data are accessed through I/O registers from load/store instructions CN310 Microprocessor Systems Design 4 / 35
5 Registers An instruction usually involves access to some register(s). Common register types: accumulator general purpose, register file program counter stack pointer, base pointer status, condition code, flag index, offset segment Some registers are grouped to form larger registers e.g. 2 x 8-bit registers grouped to give 1 x 16-bit register. CN310 Microprocessor Systems Design 5 / 35
6 AVR Instruction AVR is an 8-bit microcontroller with RISC architecture. 131 instructions (ATMega168) 32 x 8 general purpose registers (R0-R31) most instructions execute 1 instruction in 1 cycle most instructions are 16-bit 5 groups of instructions arithmetic and logic branch data transfer bit and bit-test MCU control CN310 Microprocessor Systems Design 6 / 35
7 AVR Memory Interconnections CN310 Microprocessor Systems Design 7 / 35
8 AVR Memory Map CN310 Microprocessor Systems Design 8 / 35
9 AVR Data Memory Map (ATMega168) CN310 Microprocessor Systems Design 9 / 35
10 AVR Register File R27:R26 forms 16-bit X register. R29:R28 forms 16-bit Y register. R31:R30 forms 16-bit Z register. CN310 Microprocessor Systems Design 10 / 35
11 AVR Program and Addressing Modes 1 Register Direct, 1 register Rd 2 Register Direct, 2 registers Rd and Rr 3 I/O Direct 4 Data Direct 5 Data Indirect 6 Data Indirect with Displacement 7 Data Indirect with Pre-decrement 8 Data Indirect with Post-increment 9 Program Memory Constant Addressing 10 Program Memory Addressing with Post-increment 11 Direct Program Memory Addressing 12 Indirect Program Memory Addressing 13 Relative Program Memory Addressing CN310 Microprocessor Systems Design 11 / 35
12 Instruction Set Nomenclature Registers and Operands Rd: Destination (and source) register in the Register File Rr: Source register in the Register File R: Result after instruction is executed K: Constant data k: Constant address b: Bit in the Register File or I/O Register (3-bit) s: Bit in the Status Register (3-bit) X,Y,Z: Indirect Address Register (X=R27:R26, Y=R29:R28 and Z=R31:R30) A: I/O location address q: Displacement for direct addressing (6-bit) CN310 Microprocessor Systems Design 12 / 35
13 Register Direct, 1 Register (Rd) The operand is in register d (Rd). The result is stored in register d (Rd). Example: 5.1 INC R0 ; R0 = R0 + 1 CLR R1 ; R1 = 0x00 NEG R2 ; R2 = 0x00 - R2 (2's complement) CN310 Microprocessor Systems Design 13 / 35
14 Register Direct, 2 Registers (Rr and Rd) Operands are contained in register r (Rr) and register d (Rd). The result is stored in register d (Rd). Example: 5.2 ADD R0, R1 ; R0 = R0 + R1 AND R2, R3 ; R2 = R2 & R3 MOV R4, R5 ; R4 = R5 CN310 Microprocessor Systems Design 14 / 35
15 I/O Direct Operand address (A) is contained in 6 bits of the instruction word. Register r/d (Rr/Rd) is the source/destination register. Example: 5.3 IN R6, $1E ; R6 = I/O[0x1E] OUT $2A, R7 ; I/O[0x2A] = R7 CN310 Microprocessor Systems Design 15 / 35
16 Data Direct A 16-bit Data Address is contained in the 16 LSbs of a two-word instruction. Rr/Rd specifies the source/destination register. Example: 5.4 LDS R8, $0AAA ; R8 = Data[0x0AAA] STS $01CD, R9 ; Data[0x01CD] = R9 CN310 Microprocessor Systems Design 16 / 35
17 Data Indirect Operand address is the content of the X, Y, or the Z register. Example: 5.5 LD R10, X ; R10 = Data[X] ST Y, R11 ; Data[Y] = R11 CN310 Microprocessor Systems Design 17 / 35
18 Data Indirect with Displacement Operand address is the result of the Y or Z register content added to the address contained in 6 bits of the instruction word. Rr/Rd specifies the source/destination register. Example: 5.6 LDD R12, Y+1 ; R12 = Data[Y+1] STD Z+2, R13 ; Data[Z+2] = R13 CN310 Microprocessor Systems Design 18 / 35
19 Data Indirect with Pre-decrement The X, Y, or the Z register is decremented before the operation. Operand address is the decremented content of the X, Y, or the Z register. Example: 5.7 LD R14, -X ; X = X-1, R14 = Data[X] ST -Y, R15 ; Y = Y-1, Data[Y] = R15 CN310 Microprocessor Systems Design 19 / 35
20 Data Indirect with Post-increment The X, Y, or the Z register is incremented after the operation. Operand address is the decremented content of the X, Y, or the Z register. Example: 5.8 LD R16, Y+ ; R16 = Data[X], Y = Y + 1 ST Z+, R17 ; Data[Z] = R17, Z = Z + 1 CN310 Microprocessor Systems Design 20 / 35
21 Program Memory Constant Addressing Constant byte address is specified by the Z register content. The 15 MSbs select word address. For LPM, the LSb selects low byte if cleared (LSb = 0) or high byte if set (LSb = 1). Example: 5.9 LPM ; R0 = Prog[Z] LPM R18, Z ; R18 = Prog[Z] CN310 Microprocessor Systems Design 21 / 35
22 Program Memory Addressing with Post-increment Constant byte address is specified by the Z-register contents. The 15 MSBs select word address. The LSb selects low byte if cleared (LSb = 0) or high byte if set (LSb = 1). Example: 5.10 LPM R19, Z+ ; R19 = Prog[Z], Z = Z + 1 CN310 Microprocessor Systems Design 22 / 35
23 Direct Program Memory Addressing Program execution continues at the address immediate in the instruction word. Example: 5.11 JMP $0ABC ; PC = 0x0ABC CALL sub_name ; PC = 0x???? (value resolved by assembler) CN310 Microprocessor Systems Design 23 / 35
24 Indirect Program Memory Addressing Program execution continues at address contained by the Z register (i.e. the PC is loaded with the contents of the Z register). Example: 5.12 IJMP $0ABC ; PC = Z ICALL ; PC = Z CN310 Microprocessor Systems Design 24 / 35
25 Indirect Program Memory Addressing Program execution continues at address PC + k + 1. The relative address k is from to Example: 5.13 RJMP 8 ; PC = PC RCALL -24 ; PC = PC CN310 Microprocessor Systems Design 25 / 35
26 Arithmetic and Logic Instructions Arithmetic and Logic Data Transfer Addition Subtraction Logical AND, OR, XOR One s/two s complement Set/Clear registers Increment/Decrement Multiplication Branch Unconditional - jump Conditional - branch if cond. Skip Subroutine - call/return Compare Move - reg reg Load/Store - I/O reg Program memory - prog reg Input/Output - I/O reg Push/Pop - stack reg Bit and Bit-test Rotate, Shift, Arithmetic shift Bit Load/Store Bit Set/Clear in register MCU Control BREAK, NOP, SLEEP, WDR CN310 Microprocessor Systems Design 26 / 35
27 The Status Register Most flags are set by hardware after executing an instruction. Some flag is programmable, e.g. the global interrupt enable flag. Flags - Nomenclature : Flag affected by instruction 0 : Flag cleared by instruction 1 : Flag set by instruction - : Flag not affected by instruction CN310 Microprocessor Systems Design 27 / 35
28 Example: Arithmetic ADD - Add without carry Description: Adds two registers without the C Flag and places the result in the destination register Rd. Operation: Rd Rd + Rr Syntax: Operands: Proram Counter: ADD Rd,Rr 0 d 31, 0 r 31 PC PC bit opcode: rd dddd rrrr Status Register (SREG) and Boolean Formula: I T H S V N Z C - - CN310 Microprocessor Systems Design 28 / 35
29 Example: Arithmetic Example: 5.14 add r1,r2 ; Add r2 to r1 (r1=r1+r2) add r28,r28 ; Add r28 to itself (r28=r28+r28) Machine Code: rd dddd rrrr add r1,r rd dddd rrrr add r28,r CN310 Microprocessor Systems Design 29 / 35
30 Example: Branch RJMP - Relative Jump Description: Relative jump to an address within PC - 2K + 1 and PC + 2K (words). Operation: PC PC + k + 1 Syntax: Operands: Proram Counter: RJMP k -2K k 2K PC PC + k bit opcode: 1100 kkkk kkkk kkkk Status Register (SREG) and Boolean Formula: I T H S V N Z C CN310 Microprocessor Systems Design 30 / 35
31 Example: Branch Example: 5.15 cpi r16,0x42 ; Compare r16 to 0x42 brne error ; Branch if r16 <> 0x42 rjmp ok ; Unconditional branch error: add r16,r17 ; Add r17 to r16 inc r16 ok: nop ; Destination for rjmp (do nothing) Assume this code starts from address 0x0000 (from cpi instruction.) label ok is resolved into program address 0x0005. Machine Code: 1100 kkkk kkkk kkkk rjmp ok CN310 Microprocessor Systems Design 31 / 35
32 Example: Data Transfer MOV - Copy Register Description: This instruction makes a copy of one register into another. The source register Rr is left unchanged, while the destination register Rd is loaded with a copy of Rr. Operation: Rd Rr Syntax: Operands: Proram Counter: MOV Rd,Rr 0 d 31, 0 r 31 PC PC bit opcode: rd dddd rrrr Status Register (SREG) and Boolean Formula: I T H S V N Z C CN310 Microprocessor Systems Design 32 / 35
33 Example: Data Transfer Example: 5.16 mov r16,r0 ; Copy r0 to r16 Machine Code: rd dddd rrrr mov r16,r CN310 Microprocessor Systems Design 33 / 35
34 Example: Bit and Bit-test SBI - Set Bit in I/O Register Description: Set Bit in I/O Register Operation: I/O(A,b) 1 Syntax: Operands: Proram Counter: SBI A,b 0 A 31, 0 b 7 PC PC bit opcode: AAAA Abbb Status Register (SREG) and Boolean Formula: I T H S V N Z C CN310 Microprocessor Systems Design 34 / 35
35 Example: Bit and Bit-test Example: 5.17 sbi 0x0b,7 ; Set bit 7 in Port D Note: Port D has I/O address of 0x0B. Machine Code: AAAA Abbb sbi 0x0b, CN310 Microprocessor Systems Design 35 / 35
ก AVR Microcontrollers
ก AVR Microcontrollers. ก ก AVR Microcontrollers Architecture 1 Instruction Execution Timing The Parallel Instruction Fetches and Instruction Executions Single Cycle ALU Operation AVR Microcontrollers
More informationAVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo
AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo 1 Lecture Overview AVR ISA AVR Instructions & Programming (I) Basic construct implementation 2 Atmel AVR 8-bit RISC architecture
More informationAVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo
AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo 1 Lecture Overview AVR ISA AVR Instructions & Programming (I) Basic construct implementation 2 Atmel AVR 8-bit RISC architecture
More informationBy: Dr. Hamed Saghaei
By: Dr. Hamed Saghaei The AVR RISC Microcontroller supports powerful and efficient addressing modes for access to the program memory (Flash) and data memory (SRAM). This section describes the different
More informationAVR ISA & AVR Programming (I)
AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo Week 1 1 Lecture Overview AVR ISA AVR Instructions & Programming (I) Basic construct implementation Week 1 2 1 Atmel AVR 8-bit
More informationCOMP2121: Microprocessors and Interfacing. Instruction Formats and Addressing Modes
COMP2121: Microprocessors and Interfacing Instruction Formats and Addressing Modes http://www.cse.unsw.edu.au/~cs2121 Lecturer: Hui Wu Session 2, 2017 1 1 Overview Instruction format AVR instruction format
More informationAVR MICROCONTROLLER ARCHITECTURTE
AVR MICROCONTROLLER ARCHITECTURTE AVR MICROCONTROLLER AVR- Advanced Virtual RISC. The founders are Alf Egil Bogen Vegard Wollan RISC AVR architecture was conceived by two students at Norwegian Institute
More informationCOMP3221: Microprocessors and Embedded Systems
Embedded Systems Lecture 6: Addressing Modes http://www.cse.unsw.edu.au/~cs3221 Lecturer: Hui Wu Session 2, 2005 Addressing Modes Overview Instruction Examples 1 2 Operands Immediate Addressing Instructions
More information8-bit Instruction Set
Instruction Set Nomenclature Status Register (SREG) SREG: Status Register C: Carry Flag Z: Zero Flag N: Negative Flag V: Two s complement overflow indicator S: N V, For signed tests H: Half Carry Flag
More information8-bit Instruction Set
Instruction Set Nomenclature Status Register (SREG) SREG: Status Register C: Carry Flag Z: Zero Flag N: Negative Flag V: Two s complement overflow indicator S: N V, For signed tests H: Half Carry Flag
More informationChapter 4: Atmel s AVR 8-bit Microcontroller Part 1 Assembly Programming
Chapter 4: Atmel s AVR 8-bit Microcontroller Part 1 Assembly Programming Prof. Ben Lee Oregon State University School of Electrical Engineering and Computer Science Chapter Goals Understand how to program
More informationCOMP2121: Microprocessors and Interfacing
Interfacing Lecture 9: Program Control Instructions http://www.cse.unsw.edu.au/~cs2121 Lecturer: Hui Wu Session 1, 2006 Program control instructions in AVR Stacks Overview Sample AVR assembly programs
More informationMechatronics and Microcomputers. Stipendium Hungaricum 2018/2019 Autumn Semester Szilárd Aradi, PhD
Mechatronics and Microcomputers Stipendium Hungaricum 2018/2019 Autumn Semester Szilárd Aradi, PhD ATmega128 CPU Single-level pipelining Egyciklusú ALU működés Reg. reg., reg. konst. közötti műveletek
More informationAPPENDIX A FOR SKEE3732 LABORATORY 1 SHEET
APPENDIX A FOR SKEE3732 LABORATORY 1 SHEET Other documents that are referred within this document are located at the link https://www.dropbox.com/sh/s16jri4eol3agl5/aaazn_w3p7fodjs-wi-xcenqa?dl=0 The ATmega32/ATmega2A
More informationECED3204: Microprocessor Part I--Introduction
ECED3204: Microprocessor Part I--Introduction Jason J. Gu Department of 1 Outline i. Computer ii. Processor iii. Embedded System iv. Memory v. Program Execution VI. VII. VIII. IX. AVR AVR Memory AVR CPU
More informationAT90S Bit Microcontroller with 1K bytes Downloadable Flash AT90S1200. Features. Description. Pin Configuration
Features Utilizes the AVR Enhanced RISC Architecture 89 Powerful Instructions - Most Single Clock Cycle Execution 1K bytes of In-System Reprogrammable Downloadable Flash - SPI Serial Interface for Program
More informationGrundlagen Microcontroller Processor Core. Günther Gridling Bettina Weiss
Grundlagen Microcontroller Processor Core Günther Gridling Bettina Weiss 1 Processor Core Architecture Instruction Set Lecture Overview 2 Processor Core Architecture Computes things > ALU (Arithmetic Logic
More informationAPPENDIX B AVR INSTRUCTIONS EXPLAINED OVERVIEW
APPENDIX B AVR INSTRUCTIONS EXPLAINED OVERVIEW In this appendix, we describe each intruction of the ATmega328. In many cases, a simple code example is given to clarify the instruction. Instructions are
More informationAVR Control Transfer -AVR Branching
1 P a g e AVR Control Transfer -AVR Branching Reading The AVR Microcontroller and Embedded Systems using Assembly and C) by Muhammad Ali Mazidi, Sarmad Naimi, and Sepehr Naimi Chapter 3: Branch, Call,
More informationModule 8: Atmega32 Stack & Subroutine. Stack Pointer Subroutine Call function
Module 8: Atmega32 Stack & Subroutine Stack Pointer Subroutine Call function Stack Stack o Stack is a section of RAM used by the CPU to store information temporarily (i.e. data or address). o The CPU needs
More informationEE 308: Microcontrollers
EE 308: Microcontrollers Assmbly Language Part I Aly El-Osery Electrical Engineering Department New Mexico Institute of Mining and Technology Socorro, New Mexico, USA January 30, 2018 Aly El-Osery (NMT)
More informationAVR Instruction Set Encoding
1 P age AVR Instruction Set Encoding READING 1. "AVR Instruction Set" document doc856 "The Program and Data Addressing Modes." 2. In this lecture I will teach you how to translate your assembly code into
More informationAssembly Language Programming of 8085
Assembly Language Programming of 8085 1. Introduction A microprocessor executes instructions given by the user Instructions should be in a language known to the microprocessor Microprocessor understands
More informationCOMP3221: Microprocessors and Embedded Systems
Embedded ystems Overview Arithmetic and Logic nstructions in AR ample AR Assembly Programs Using AL instructions Lecture 7: Arithmetic and logic nstructions http://www.cse.unsw.edu.au/~cs3221 Lecturer:
More informationECE 375 Computer Organization and Assembly Language Programming Winter 2018 Solution Set #2
ECE 375 Computer Organization and Assembly Language Programming Winter 2018 Set #2 1- Consider the internal structure of the pseudo-cpu discussed in class augmented with a single-port register file (i.e.,
More informationAddressing Modes Part II AVR Addressing Indirect READING
1 P a g e Addressing Modes Part II AVR Addressing Indirect READING The AVR Microcontroller and Embedded Systems using Assembly and C) by Muhammad Ali Mazidi, Sarmad Naimi, and Sepehr Naimi Chapter 6: AVR
More informationCOMP2121: Microprocessors and Interfacing
nterfacing Overview Arithmetic and Logic nstructions in AR ample AR Assembly Programs Using AL instructions Lecture 8: Arithmetic and logic nstructions http://www.cse.unsw.edu.au/~cs2121 Lecturer: ui Wu
More informationCSIS1120A. 10. Instruction Set & Addressing Mode. CSIS1120A 10. Instruction Set & Addressing Mode 1
CSIS1120A 10. Instruction Set & Addressing Mode CSIS1120A 10. Instruction Set & Addressing Mode 1 Elements of a Machine Instruction Operation Code specifies the operation to be performed, e.g. ADD, SUB
More informationCN310 Microprocessor Systems Design
CN310 Microprocessor Systems Design Micro Architecture Nawin Somyat Department of Electrical and Computer Engineering Thammasat University 28 August 2018 Outline Course Contents 1 Introduction 2 Simple
More informationInstruction Sets: Characteristics and Functions Addressing Modes
Instruction Sets: Characteristics and Functions Addressing Modes Chapters 10 and 11, William Stallings Computer Organization and Architecture 7 th Edition What is an Instruction Set? The complete collection
More informationAssembly Language Programming of 8085
Assembly Language Programming of 8085 Topics 1. Introduction 2. Programming model of 8085 3. Instruction set of 8085 4. Example Programs 5. Addressing modes of 8085 6. Instruction & Data Formats of 8085
More informationDigital Systems - Mini AVR 3
Digital Systems - Mini AVR 3 Pere Palà - Alexis López itic http://itic.cat April 2016 Enhancing the processor Up to now, we have a linear program flow Suitable for a pre-planned task Unable to react to
More informationContents 8051 Instruction Set BY D. BALAKRISHNA, Research Assistant, IIIT-H Chapter I : Control Transfer Instructions Lesson (a): Loop Lesson (b): Jump (i) Conditional Lesson (c): Lesson (d): Lesson (e):
More informationCOMP2121: Microprocessors and Interfacing. Instruction Set Architecture (ISA)
COMP2121: Microprocessors and Interfacing Instruction Set Architecture (ISA) http://www.cse.unsw.edu.au/~cs2121 Lecturer: Hui Wu Session 2, 2017 1 Contents Memory models Registers Data types Instructions
More informationMicroprocessors 1. The 8051 Instruction Set. Microprocessors 1 1. Msc. Ivan A. Escobar Broitman
Microprocessors 1 The 8051 Instruction Set Microprocessors 1 1 Instruction Groups The 8051 has 255 instructions Every 8-bit opcode from 00 to FF is used except for A5. The instructions are grouped into
More information8-Bit Microcontroller with 1K bytes In-System Programmable Flash AT90S1200. Features. Description. Pin Configuration
Features AVR - High Performance and Low Power RISC Architecture 89 Powerful Instructions - Most Single Clock Cycle Execution 1K bytes of In-System Reprogrammable Flash SPI Serial Interface for Program
More informationINSTRUCTION SET OF 8085
INSTRUCTION SET OF 8085 Instruction Set of 8085 An instruction is a binary pattern designed inside a microprocessor to perform a specific function. The entire group of instructions that a microprocessor
More information8-bit Microcontroller with 2K Bytes of In-System Programmable Flash AT90S2323 AT90LS2323 AT90S2343 AT90S/LS2323. Features.
Features Utilizes the AVR RISC Architecture AVR - High-performance and Low-power RISC Architecture 118 Powerful Instructions - Most Single Clock Cycle Execution 32 x 8 General Purpose Working Registers
More information8-bit Microcontroller with 2K Bytes of In-System Programmable Flash. ATtiny22 ATtiny22L. Preliminary. Features. Description
Features Utilizes the AVR RISC Architecture AVR - High-performance and Low-power RISC Architecture 118 Powerful Instructions - Most Single Clock Cycle Execution 32 x 8 General Purpose Working Registers
More informationCOMP2121: Microprocessors and Interfacing. AVR Assembly Programming (I) Basic AVR Instructions
COMP2121: Microprocessors and Interfacing AVR Assembly Programming (I) Basic AVR Instructions http://www.cse.unsw.edu.au/~cs2121 Lecturer: Hui Wu Session 2, 2017 1 1 Contents Arithmetic and Logic Instructions
More informationInstruction Set Instruction set of 8085 can be classified in following groups: Data Transfer Instructions These instructions can perform data transfer operations between Registers of 8085 e.g. MOV 8085
More information8051 Overview and Instruction Set
8051 Overview and Instruction Set Curtis A. Nelson Engr 355 1 Microprocessors vs. Microcontrollers Microprocessors are single-chip CPUs used in microcomputers Microcontrollers and microprocessors are different
More informationIntroduction to Assembly language
Introduction to Assembly language 1 USING THE AVR MICROPROCESSOR Outline Introduction to Assembly Code The AVR Microprocessor Binary/Hex Numbers Breaking down an example microprocessor program AVR instructions
More informationBuilding A RISC Microcontroller in an FPGA. Yap Zi He
Building A RISC Microcontroller in an FPGA Yap Zi He yapzihe@hotmail.com http://www.opencores.org/projects/riscmcu/ Supervisor : Muhammad Mun im Ahmad Zabidi (Assoc Prof) raden@utm.my Faculty of Electrical
More information(2) Explain the addressing mode of OR What do you mean by addressing mode? Explain diff. addressing mode for 8085 with examples.
(1) Explain instruction format and Opcode format of 8085 μp with example. OR With help of examples, explain the formation of opcodes of 8085 OR What is an instruction? List type of instruction based on
More information8-bit Microcontroller with 8K Bytes Programmable Flash AT90C8534. Preliminary
Features Utilizes the AVR RISC Architecture AVR High-performance and Low-power RISC Architecture 118 Powerful Instructions Most Single Clock Cycle Execution 32 x 8 General-purpose Working Registers Up
More informationEE 308: Microcontrollers
EE 308: Microcontrollers Review Part I Aly El-Osery Electrical Engineering Department New Mexico Institute of Mining and Technology Socorro, New Mexico, USA February 15, 2018 Aly El-Osery (NMT) EE 308:
More informationMicrocontroller Intel [Instruction Set]
Microcontroller Intel 8051 [Instruction Set] Structure of Assembly Language [ label: ] mnemonic [operands] [ ;comment ] Example: MOV R1, #25H ; load data 25H into R1 2 8051 Assembly Language Registers
More informationComputer Organization CS 206 T Lec# 2: Instruction Sets
Computer Organization CS 206 T Lec# 2: Instruction Sets Topics What is an instruction set Elements of instruction Instruction Format Instruction types Types of operations Types of operand Addressing mode
More informationProgramming. A. Assembly Language Programming. A.1 Machine Code. Machine Code Example: Motorola ADD
A. Assembly Language Programming Programming of a computer system: Machine code direct execution Assembly language tool: assembler High level programming language tool: interpreter tool: compiler Programming
More informationReview on Lecture-1. ICT 6641: Advanced Embedded System. Lecture 2 Branch, Call and Delay Loops, AVR I/O port programming
ICT 6641: Advanced Embedded System Lecture 2 Branch, Call and Delay Loops, AVR I/O port programming Prof. S. M. Lutful Kabir Session: April, 2011 Review on Lecture-1 Three parts of a computer : CPU, Memory
More informationMemory organization Programming model - Program status word - register banks - Addressing modes - instruction set Programming examples.
MICROCONTROLLERS AND APPLICATIONS 1 Module 2 Module-2 Contents: Memory organization Programming model - Program status word - register banks - Addressing modes - instruction set Programming examples. MEMORY
More informationTYPES OF INTERRUPTS: -
There are 3 types of interrupts. TYPES OF INTERRUPTS: - External Interrupts. Internal Interrupts. Software interrupts. Hardware Interrupts (1) External interrupts come from I/O devices, from a timing device
More informationUNIT-II. Part-2: CENTRAL PROCESSING UNIT
Page1 UNIT-II Part-2: CENTRAL PROCESSING UNIT Stack Organization Instruction Formats Addressing Modes Data Transfer And Manipulation Program Control Reduced Instruction Set Computer (RISC) Introduction:
More informationProgramming of 8085 microprocessor and 8051 micro controller Study material
8085 Demo Programs Now, let us take a look at some program demonstrations using the above instructions Adding Two 8-bit Numbers Write a program to add data at 3005H & 3006H memory location and store the
More informationArchitecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller
of 8085 microprocessor 8085 is pronounced as "eighty-eighty-five" microprocessor. It is an 8-bit microprocessor designed by Intel in 1977 using NMOS technology. It has the following configuration 8-bit
More informationAVR Microcontrollers Architecture
ก ก There are two fundamental architectures to access memory 1. Von Neumann Architecture 2. Harvard Architecture 2 1 Harvard Architecture The term originated from the Harvard Mark 1 relay-based computer,
More information8085 INSTRUCTION SET INSTRUCTION DETAILS
8085 INSTRUCTION SET INSTRUCTION DETAILS DATA TRANSFER INSTRUCTIONS MOV Rd, Rs Copy from source to destination This instruction copies the contents of the source register Rs into the destination register
More informationCPU: SOFTWARE ARCHITECTURE INSTRUCTION SET (PART
General Introduction CPU: SOFTWARE ARCHITECTURE INSTRUCTION SET (PART 1) General Introduction (1/5): On Instructions Instruction operate with data or with the flow of the program The following information
More informationMAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI
MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI-621213. QUESTION BANK DEPARTMENT: EEE SUB CODE: EE2324 YR/ SEM:III/ VI SUB NAME: MICROPROCESSORS & MICROCONTROLLERS UNIT 2- PROGRAMMING OF 8085 MICROPROCESSORS
More informationComputer Organization and Technology Processor and System Structures
Computer Organization and Technology Processor and System Structures Assoc. Prof. Dr. Wattanapong Kurdthongmee Division of Computer Engineering, School of Engineering and Resources, Walailak University
More informationThe Assembly Language of the Boz 5
The Assembly Language of the Boz 5 The Boz 5 uses bits 31 27 of the IR as a five bit opcode. Of the possible 32 opcodes, only 26 are implemented. Op-Code Mnemonic Description 00000 HLT Halt the Computer
More informationBasic Processor Design
Basic Processor Design Design Instruction Set Design Datapath Design Control Unit This lecture deals with Instruction Set Design. 1001 Instruction Set Terminology Mnemonic (Instruction Name) SUBI Syntax
More informationSpeed and Size-Optimized Implementations of the PRESENT Cipher for Tiny AVR Devices
Speed and Size-Optimized Implementations of the PRESENT Cipher for Tiny AVR Devices Kostas Papagiannopoulos Aram Verstegen July 11, 2013 Papagiannopoulos and Verstegen July 11, 2013 Speed and Size-Optimized
More informationCHAPTER ASSEMBLY LANGUAGE PROGRAMMING
CHAPTER 2 8051 ASSEMBLY LANGUAGE PROGRAMMING Registers Register are used to store information temporarily: A byte of data to be processed An address pointing to the data to be fetched The vast majority
More information8051 Microcontrollers
8051 Microcontrollers Richa Upadhyay Prabhu NMIMS s MPSTME richa.upadhyay@nmims.edu March 15, 2016 8051 INSTRUCTIONS JUMP, LOOP AND CALL INSTRUCTIONS 8051 INSTRUCTIONS Repeating a sequence of instructions
More informationLogic Instructions and Programs READING
1 P a g e Logic Instructions and Programs READING The AVR Microcontroller and Embedded Systems using Assembly and C) by Muhammad Ali Mazidi, Sarmad Naimi, and Sepehr Naimi Chapter 5: Arithmetic, Logic
More informationQ. Classify the instruction set of 8051 and list out the instructions in each type.
INTRODUCTION Here is a list of the operands and their meanings: A - accumulator; Rn - is one of working registers (R0-R7) in the currently active RAM memory bank; Direct - is any 8-bit address register
More informationFIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100)
(Revision-10) FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100) PART-A (Maximum marks : 10) I. Answer all
More informationLecture 04: Machine Instructions
CSCI2510 Computer Organization Lecture 04: Machine Instructions Ming-Chang YANG mcyang@cse.cuhk.edu.hk Reading: Chap. 2.3~2.4, 2.10~2.11 Recall: Instructions & Program A computer is governed by instructions.
More informationDigital Blocks Semiconductor IP
Digital Blocks Semiconductor IP 805 Microcontroller General Description The Digital Blocks Microcontroller Verilog IP Core is complaint with the MCS 5 Instruction Set and contains standard 805 MCU peripherals,
More informationINSTRUCTION SET ARCHITECTURE
INSTRUCTION SET ARCHITECTURE Slides by: Pedro Tomás Additional reading: Computer Architecture: A Quantitative Approach, 5th edition, Appendix A, John L. Hennessy and David A. Patterson, Morgan Kaufmann,
More informationMicroprocessors & Interfacing
Lecture Overview Microprocessors & Interfacing Interrupts (I) Lecturer : Dr. Annie Guo Introduction to Interrupts Interrupt system specifications Multiple sources of interrupts Interrupt priorities Interrupts
More informationGates and flip-flops: glue logic, simple FSMs, registers Two-level PLDs: FSMs, muxes, decoders. Programmable logic devices (CSE370, CSE467)
Computational hardware Digital logic (CSE370) Gates and flip-flops: glue logic, simple FSMs, registers Two-level PLDs: FSMs, muxes, decoders Programmable logic devices (CSE370, CSE467) Field-programmable
More informationComputer System Architecture
CSC 203 1.5 Computer System Architecture Department of Statistics and Computer Science University of Sri Jayewardenepura Addressing 2 Addressing Subject of specifying where the operands (addresses) are
More informationInterrupts (I) Lecturer: Sri Notes by Annie Guo. Week8 1
Interrupts (I) Lecturer: Sri Notes by Annie Guo Week8 1 Lecture overview Introduction to Interrupts Interrupt system specifications Multiple Sources of Interrupts Interrupt Priorities Interrupts in AVR
More informationDigital Blocks Semiconductor IP
805 SFR Bus Digital Blocks Semiconductor IP 805 Microcontroller Configurable Peripherals General Description The Digital Blocks (Configurable Peripherals) Microcontroller Verilog IP Core is complaint with
More informationEXPERIMENT NO. 1 THE MKT 8085 MICROPROCESSOR TRAINER
OBJECT: EXPERIMENT NO. 1 THE MKT 8085 MICROPROCESSOR TRAINER To understand the structure and operating instruction of the microprocessor trainer. INTRODUCTION: The MKT 8085 is a single-board microcomputer,
More informationAccumulator and memory instructions 1. Loads, stores, and transfers 2. Arithmetic operations 3. Multiply and divide 4. Logical operations 5. Data test
HC11 Instruction Set Instruction classes 1. 2. 3. 4. Accumulator and Memory Stack and Index Register Condition Code Register Program control instructions 2 1 Accumulator and memory instructions 1. Loads,
More informationRegister-Level Programming
Introduction Register-Level Programming Programming can be considered a set a instructions that are executed in a precise order. A programming simulator can evaluate how instructions store, move and calculate
More informationLecture 20: AVR Programming, Continued. AVR Program Visible State (ones we care about for now)
18 100 Lecture 20: AVR Programming, Continued S 15 L20 1 James C. Hoe Dept of ECE, CMU April 2, 2015 Today s Goal: You will all be ace AVR hackers! Announcements: Midterm 2 can be picked up in lab and
More informationModule Contents of the Module Hours COs
Microcontrollers (EE45): Syllabus: Module Contents of the Module Hours COs 1 8051 MICROCONTROLLER ARCHITECTURE: Introduction to Microprocessors and Microcontrollers, the 8051 Architecture, 08 1 and pin
More informationEE 308: Microcontrollers
EE 308: Microcontrollers Introduction to the Assmbly Language Aly El-Osery Electrical Engineering Department New Mexico Institute of Mining and Technology Socorro, New Mexico, USA January 25, 2018 Aly
More informationIntel 8086: Instruction Set
IUST-EE (Chapter 6) Intel 8086: Instruction Set 1 Outline Instruction Set Data Transfer Instructions Arithmetic Instructions Bit Manipulation Instructions String Instructions Unconditional Transfer Instruction
More informationCPE 323 MSP430 INSTRUCTION SET ARCHITECTURE (ISA)
CPE 323 MSP430 INSTRUCTION SET ARCHITECTURE (ISA) Aleksandar Milenković Email: milenka@uah.edu Web: http://www.ece.uah.edu/~milenka Objective Introduce MSP430 Instruction Set Architecture (Class of ISA,
More informationCN310 Microprocessor Systems Design
CN310 Microprocessor Systems Design Simple Computer Nawin Somyat Department of Electrical and Computer Engineering Thammasat University Outline Course Contents 1 Introduction 2 Simple Computer 3 Microprocessor
More informationChapter 3. Z80 Instructions & Assembly Language. Von Neumann Architecture. Memory. instructions. program. data
Von Neumann Architecture The von Neumann architecture is a computer design model that uses a processing unit and a separate storage to hold both instructions and data To run a machine, program and data
More information8-Bit Microcontroller with 2K Bytes of In-System Programmable Flash. AT90S2323 AT90LS2323 AT90S2343 AT90LS2343 Preliminary AT90S/LS2323.
Features Utilizes the AVR Enhanced RISC Architecture AVR - High Performance and Low Power RISC Architecture 118 Powerful Instructions - Most Single Clock Cycle Execution 2K bytes of In-System Programmable
More informationIntroduction to Computers - Chapter 4
Introduction to Computers - Chapter 4 Since the invention of the transistor and the first digital computer of the 1940s, computers have been increasing in complexity and performance; however, their overall
More informationMicrocontrollers. Microcontroller
Microcontrollers Microcontroller A microprocessor on a single integrated circuit intended to operate as an embedded system. As well as a CPU, a microcontroller typically includes small amounts of RAM and
More informationISA and RISCV. CASS 2018 Lavanya Ramapantulu
ISA and RISCV CASS 2018 Lavanya Ramapantulu Program Program =?? Algorithm + Data Structures Niklaus Wirth Program (Abstraction) of processor/hardware that executes 3-Jul-18 CASS18 - ISA and RISCV 2 Program
More information8-bit Microcontroller with 2K Bytes of In-System Programmable Flash AT90S2313
Features Utilizes the AVR RISC Architecture AVR High-performance and Low-power RISC Architecture 118 Powerful Instructions Most Single Clock Cycle Execution 32x8GeneralPurposeWorkingRegisters Up to 10
More informationOSIAC Read OSIAC 5362 posted on the course website
OSIAC 5362 Read OSIAC 5362 posted on the course website The Basic Structure of Control Unit m CLK Run/Inhibit Control Step Counter m Preset (to any new state) Reset IR Decoder/Encoder (combinational logic)
More informationDigital Blocks Semiconductor IP
Digital Blocks Semiconductor IP DB805C-FSM 805 Microcontroller FSM Finite State Machine General Description The Digital Blocks DB805C-FSM IP Core contains Digital Blocks compact DB805C CPU Core & GPIO
More informationSYLLABUS UNIT - I 8086/8088 ARCHITECTURE AND INSTRUCTION SET
1 SYLLABUS UNIT - I 8086/8088 ARCHITECTURE AND INSTRUCTION SET Intel 8086/8088 Architecture Segmented Memory, Minimum and Maximum Modes of Operation, Timing Diagram, Addressing Modes, Instruction Set,
More informationProcessor Status Register(PSR)
ARM Registers Register internal CPU hardware device that stores binary data; can be accessed much more rapidly than a location in RAM ARM has 13 general-purpose registers R0-R12 1 Stack Pointer (SP) R13
More informationCOMPUTER ORGANIZATION & ARCHITECTURE
COMPUTER ORGANIZATION & ARCHITECTURE Instructions Sets Architecture Lesson 5a 1 What are Instruction Sets The complete collection of instructions that are understood by a CPU Can be considered as a functional
More informationAssembly Language programming (2)
EEE3410 Microcontroller Applications LABORATORY Experiment 2 Assembly Language programming (2) Name Class Date Class No. Marks Arithmetic, Logic and Jump instructions Objectives To learn and practice the
More informationLC-3 Instruction Set Architecture
CMPE12 Notes LC-3 Instruction Set Architecture (Textbookʼs Chapter 5 and 6)# Instruction Set Architecture# ISA is all of the programmer-visible components and operations of the computer.# memory organization#
More informationSN8F5000 Family Instruction Set
SONiX Technology Co., Ltd. 8051-based Microcontroller 1 Overview SN8F5000 is 8051 Flash Type microcontroller supports comprehensive assembly instructions and which are fully compatible with standard 8051.
More information