CPU. Objectives. Introduction to Assembly Chapter 2. Topics. AVR s CPU 12/09/2017

Size: px
Start display at page:

Download "CPU. Objectives. Introduction to Assembly Chapter 2. Topics. AVR s CPU 12/09/2017"

Transcription

1 Students should be able to: Objectives ntroduction to Assembly Chapter 2 he AVR microcontroller and embedded systems using assembly and c List the registers of the AVR microcontroller Draw and label a detail memory map of any AVR microcontroller Writecodetoperformsimpleoperations,suchas:ADDandloaddataand access internal RAM memory in the AVR Explain the purpose of the status register Discuss data RAM memory space in allocation in the AVR microcontroller Code in AVR assembly language Describe AVR data types and directives AssembleandrunaAVRprogramusingAVRStudio Describe the sequence of events that occur upon power-up Examine programs in AVR ROM code Detail the execution of AVR assembly language instructions Understand the RSC and Harvard architectures of the AVR microcontroller Examine the AVR s registers and data RAM using the AVR Studio simulator opics AVR s CPU AVR s CPU ts architecture Some simple programs Data Memory access Program memory RSC architecture AVR s CPU ALU 32 General Purpose registers (R0 to R31) PC register nstruction decoder ALU CPU R0 R1 R2 R15 R16 R17 PC nstruction decoder R30 R31 nstruction Register registers 1

2 MCU nstructions MCU nstructions Opcode Operand Opcode Operand nstruction nstruction Operation Code Meaning h C4h 26h 81h EAh 0h 5h A [17] B A A [6] A A+B [7] A 000 A x 001 A [x] 010 A A register (x) 011 A A + x 100 A A + register (x) 101 A A x 110 Register (x H ) Register (x L ) 111 [x] A Source: Loading values into the general purpose registers (Load mmediate) Rd, k Example: ts equivalent in high level languages: Rd = k R16,53 R16 = 53 R19,132 R23,0x27 R23 = 0x27 Arithmetic calculation here are some instructions for doing Arithmetic and logic operations; such as: ADD, ADC, SUB, SBC, MUL, AND, etc. ADD Rd,Rs Rd = Rd + Rs Example: ADD R25, R9 R25 = R25 + R9 ADD R17,R30 R17 = R17 + R30 2

3 A simple program Write a program that calculates R16, 19 ;R16 = 19 R20, 95 ;R20 = 95 ADD R16, R20 ;R16 = R16 + R20 A simple program Write a program that calculates R16, 19 ;R16 = 19 R20, 95 ;R20 = 95 R21, 5 ;R21 = 5 ADD R16, R20 ;R16 = R16 + R20 ADC R16, R21 ;R16 = R16 + R21 R16, 19 ;R16 = 19 R20, 95 ;R20 = 95 ADD R16, R20 ;R16 = R16 + R20 R20, 5 ;R20 = 5 ADC R16, R20 ;R16 = R16 + R20 SUB Rd,Rs Rd = Rd Rs Example: SUB R25, R9 R25 = R25 -R9 SUB R17,R30 R17 = R17 -R30 Arithmetic calculation NC Rd Rd = Rd + 1 Example: NC R25 R25 = R DEC Rd Rd = Rd -1 Example: DEC R23 R23 = R23-1 Arithmetic calculation 3

4 Assembly Assembly What is assembly language? Assembly language is an alphanumeric representation of machine code. Below is an example of a AVR assembly code written in assembly language. Each line of the code is an instruction telling the microcontroller to carry out a task. Example Code ADD R16, R17 ; Add value in R16 to value in R17 DEC R17 ; Minus 1 from the value contained in R17 MOV R18, R16 ; Copy the value in R16 to R18 END: JMP END ; Jump to the label END Notes: he instructions used in writing programs in assembly programs are not general but specific to the microcontroller. Each company provides a set of instructions for there microcontrollers. AVR 8-bits microcontrollers have a common instruction set. Note however that not all instructions are available to all microcontrollers. he set available to each AVR microcontroller is given in its datasheet. Reference: Reference: Assembly Assembly Good Programming Practice Good Programming Practice When writing your AVR assembly programs it is a good practice to organize your code in four columns as shown in the code below. his has the benefit of your program being easier to read/debug by you and others. Column 1 (Col_1) is used for labels. Labels are basically markers use by the programmer when indicating to the microcontroller to jump to a specific location in the code. Column 2 (Col_2) is used for the microcontroller instructions. Col_1 Col_2 Col_3 Col_4 Column 3 (Col_3) is used for arguments operated on by the instruction in column 2. ADD R16, R17 ;Add value in R16 to value in R17 DEC R17 ;Minus 1 from the value contained in R17 MOV R18, R16 ;Copy the value in R16 to R18 END: JMP END ;Jump to the label END Reference: Column 4 (Col_4) is used for comments. Note here that a semicolon ";" is put in front of each comments. hat is the semi-colon indicate that the statement that follows it in the same line is a comment. Reference: 4

5 Address Name /O Mem. $00 $20 WBR $01 $21 WSR $02 $22 WAR $03 $23 WDR $04 $24 ADCL $05 $25 ADCH $06 $26 ADCSRA $07 $27 ADMUX $08 $28 ACSR $09 $29 UBRRL $0A $2A UCSRB $0B $2B UCSRA $0C $2C UDR $0D $2D SPCR $0E $2E SPSR $0F $2F SPDR $10 $30 PND $11 $31 DDRD $12 $32 PORD $13 $33 PNC $14 $34 DDRC $15 $35 PORC Address /O Mem. $16 $36 $17 $37 $18 $38 $19 $39 $1A $3A $1B $3B $1C $3C $1D $3D $1E $3E $1F $3F Name PNB DDRB PORB PNA DDRA PORA EECR EEDR EEARL EEARH UBRRC $20 $40 UBRRH $21 $41 WDCR $22 $42 ASSR $23 $43 OCR2 $24 $44 CN2 $25 $45 CCR2 $26 $46 CR1L $27 $47 CR1H $28 $48 OCR1BL $29 $49 OCR1BH Address /O Mem. $2B $4B $2C $4C $2D $4D $2E $4E $2F $4F $30 $50 $31 $51 $32 $52 $33 $53 $34 $54 $35 $55 $36 $56 $37 $57 $38 $58 $39 $59 $3A $5A $3B $5B $3C $5C $3D $5D $3E $5E Name OCR1AH CN1L CN1H CCR1B CCR1A SFOR OCDR OSCCAL CN0 CCR0 MCUCSR MCUCR WCR SPMCR FR MSK GFR GCR OCR0 SPL SPH OCR1AL $3E $5E $2A $4A SREG LDS (Load direct from data space) LDS Rd, addr ;Rd = [addr] Example: LDS R1, 0x60 Example: Write a program that copies the contents of location 0x80 of RAM into location 0x81. LDS R20, 0x80 SS 0x81, R20 ;R20 = [0x80] ;[0x81] = R20 = [0x80] SS (Store direct to data space) SS addr,rd ;[addr]=rd Example: SS 0x60,R15 ; [0x60] = R15 Example: Write a program that stores 55 into location 0x80 of RAM. R20, 55 ;R20 = 55 SS 0x80, R20 ;[0x80] = R20 = 55 5

6 Example: Add contents of location 0x90 to contents of location 0x95 and store the result in location 0x313. Example: Store 0x53 into the SPH register. he address of SPH is 0x5E LDS R20, 0x90 LDS R21, 0x95 ADD R20, R21 SS 0x313, R20 ;R20 = [0x90] ;R21 = [0x95] ;R20 = R20 + R21 ;[0x313] = R20 R20, 0x53 ;R20 = 0x53 SS 0x5E, R20 ;SPH = R20 Example: What does the following instruction do? LDS R20,2 Answer: t copies the contents of R2 into R20; as 2 is the address of R2. OU (OU to O location) Using Names of O registers OU OAddr,Rd ;[addr]=rd Example: OU 0x3F,R12 ;SREG = R12 OU 0x3E,R15 ;SPH = R15 N (N from O location) N Rd,Oaddress ;Rd = [addr] Example: N R1, 0x3F ;R1 = SREG N R17,0x3E ;R17 = SPH Example: OU SPH,R12 ;OU 0x3E,R12 N R15,SREG ;N R15,0x3F Example: Write a program that adds the contents of the PNC O register to the contents of PND and stores the result in location 0x90 of the SRAM N R20,PNC ;R20 = PNC N R21,PND ;R21 = PND ADD R20,R21 ;R20 = R20 + R21 SS 0x90,R20 ;[0x90] = R20 6

7 nterrupt emporary Sign N+V overflow Negative nterrupt emporary Sign N+V overflow Negative ALU R0 R1 R2 ALU R0 R1 R2 H CPU S V N Z C PC R15 R16 R17 H CPU S V N Z C PC R15 R16 R17 nstruction decoder nstruction Register R30 R31 registers nstruction decoder nstruction Register R30 R31 registers Example: Show the status of the C, H, and Z flags after the addition of 0x38 and 0x2F in the following instructions: R16, 0x38 R17, 0x2F ADD R16, R17 ;R16 = 0x38 ;R17 = 0x2F ;add R17 to R16 Example: Show the status of the C, H, and Z flags after the addition of 0x9C and 0x64 in the following instructions: R20, 0x9C R21, 0x64 ADD R20, R21 ;add R21 to R20 1 $ $2F $ R16 = 0x67 C = 0 because there is no carry beyond the D7 bit. H = 1 because there is a carry from the D3 to the D4 bit. Z = 0 because the R16 (the result) has a value other than 0 after the addition. 1 $9C $ $ R20 = 00 C = 1 because there is a carry beyond the D7 bit. H = 1 because there is a carry from the D3 to the D4 bit. Z = 1 because the R20 (the result) has a value 0 in it after the addition. 7

8 Example: Show the status of the C, H, and Z flags after the subtraction of 0x23 from 0xA5 in the following instructions: R20, 0xA5 R21, 0x23 SUB R20, R21 ;subtract R21 from R20 Example: Show the status of the C, H, and Z flags after the subtraction of 0x73 from 0x52 in the following instructions: R20, 0x52 R21, 0x73 SUB R20, R21 ;subtract R21 from R20 $A $ $ R20 = $82 C = 0 because R21 is not bigger than R20 and there is no borrow from D8 bit. Z = 0 because the R20 has a value other than 0 after the subtraction. H = 0 because there is no borrow from D4 to D3. $ $ $DF R20 = $DF C = 1 because R21 is bigger than R20 and there is a borrow from D8 bit. Z = 0 because the R20 has a value other than zero after the subtraction. H = 1 because there is a borrow from D4 to D3. Assembly Language Example: Show the status of the C, H, and Z flags after the subtraction of 0x9C from 0x9C in the following instructions: R20, 0x9C R21, 0x9C SUB R20, R21 ;subtract R21 from R20 $9C $9C $ R20 = $00 C = 0 because R21 is not bigger than R20 and there is no borrow from D8 bit. Z = 1 because the R20 is zero after the subtraction. H = 0 because there is no borrow from D4 to D3. 8

9 .EQU name= value Assembler Directives.EQU and.se Example:.EQU COUN = 0x25 R21, COUN ;R21 = 0x25 R22, COUN + 3 ;R22 = 0x28 Assembler Directives.NCLUDE.NCLUDE filename.ext.se name= value Example:.SE COUN = 0x25 R21, COUN ;R21 = 0x25 R22, COUN + 3 ;R22 = 0x28.SE COUN = 0x19 R21, COUN ;R21 = 0x19 M32def.inc.equ SREG = 0x3f.equ SPL = 0x3d.equ SPH = 0x3e....equ N_VECORS_SZE = 42 Program.asm.NCLUDE M32DEF.NC R20, 10 OU SPL, R20 Assembler Directives.ORG Assembler.ORG address Assembly EDOR PROGRAM assembler myfile.asm 00 E ASSEMBLER PROGRAM Machine Language Program.asm ORG 0 R16, 0x25.ORG 0x7 R17, 0x34 R18, 0x31 assembler E E321 myfile.eep myfile.hex myfile.map myfile.lst DOWNLOAD O AVR s EEPROM DOWNLOAD O AVR s FLASH myfile.obj A

10 Flash memory and PC register Fetch and execute R16, 0x25 R17, $34 R18, 0x31 ADD R16, R17 ADD R16, R18 R17, 11 ADD R16, R17 SS SUM, R16 HERE:JMP HERE 00 E E E F F02 16-bit E01B 05 E01B 06 0F C 0A 0009 Old Architectures nstruct 4 nstruct 3 nstruct 2 nstruct 1 Fetch 00 E E E F F02 16-bit 05 E01B 06 0F C 0A AB Execute Pipelining nstruct 4 nstruct 3 nstruct 2 nstruct 1 Fetch Execute Pipelining 00 E E E F F02 16-bit 05 E01B 06 0F C 0A 0009 How to speed up the CPU ncrease the clock frequency More frequency More power consumption & more heat Limitations Change the architecture Pipelining RSC 10

11 Changing the architecture RSC vs. CSC CSC (Complex nstruction Set Computer) Put as many instruction as you can into the CPU RSC (Reduced nstruction Set Computer) Reduce the number of instructions, and use your facilities in a more proper way. RSC architecture Feature 1 RSC processors have a fixed instruction size. t makes the task of instruction decoder easier. n AVR the instructions are 2 or 4 bytes. n CSC processors instructions have different lengths E.g. in 8051 CLR C ; a 1-byte instruction ADD A, #20H ; a 2-byte instruction LJMP HERE ; a 3-byte instruction RSC architecture Feature 2: reduce the number of instructions Pros: Reduces the number of used transistors Cons: Can make the assembly programming more difficult Can lead to using more memory Feature 4: Load/Store LDS R20, 0x200 LDS R21, 0x220 ADD R20, R21 SS 0x230, R20 RSC architecture Feature 3: limit the addressing mode Advantage hardwiring Disadvantage Can make the assembly programming more difficult 11

12 RSC architecture Feature 5 (Harvard architecture): separate buses for opcodes and operands Advantage: opcodes and operands can go in and out of the CPU together. Disadvantage: leads to more cost in general purpose computers. RSC architecture Feature 6: more than 95% of instructions are executed in 1 machine cycle Code Memory Control bus Data bus CPU Control bus Data bus Data Memory Feature 7 RSC processors have at least 32 registers. Decreases the need for stack and memory usages. n AVR there are 32 general purpose registers (R0 to R31) Address bus Address bus Memory Maps Memory Maps What is a memory map? he memory map of a microcontroller is a diagram which gives the size, type and layout of the memories that are available in the microcontroller. he information use to construct the memory map is extracted from the datasheet of the microcontroller. Notes: Although the above memory map includes the EEPROM. he EEPROM is seen by some as a peripheral and may not be included as part of the map. he above memory map is basic. t could be expanded giving more details for the General Purpose and nput/output (/O) registers. he external memory option could also be included in the memory map. Each section can also be seen as a memory map in and of itself. Namely the Data Memory Map, the Program Memory Map and the EEPROM Memory Map. Source: 12

Lecture 2. Introduction to Microcontrollers

Lecture 2. Introduction to Microcontrollers Lecture 2 Introduction to Microcontrollers 1 Microcontrollers Microcontroller CPU + ++++++++++ Microprocessor CPU (on single chip) 2 What is a Microcontroller Integrated chip that typically contains integrated

More information

Module 2: Introduction to AVR ATmega 32 Architecture

Module 2: Introduction to AVR ATmega 32 Architecture Module 2: Introduction to AVR ATmega 32 Architecture Definition of computer architecture processor operation CISC vs RISC von Neumann vs Harvard architecture AVR introduction AVR architecture Architecture

More information

Introduction to Embedded Systems

Introduction to Embedded Systems Introduction to Embedded Systems UsingANSICand the Arduino Development Environment David J. Russell University of NebraskaLincoln SYNTHESIS LECTURES ONDIGITAL CIRCUITSAND SYSTEMS #30 xi Preface Introduction

More information

APPENDIX A FOR SKEE3732 LABORATORY 1 SHEET

APPENDIX 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 information

Review on Lecture-1. ICT 6641: Advanced Embedded System. Lecture 2 Branch, Call and Delay Loops, AVR I/O port programming

Review 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 information

Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017

Lecture Objectives. Introduction to Computing Chapter 0. Topics. Numbering Systems 04/09/2017 Lecture Objectives Introduction to Computing Chapter The AVR microcontroller and embedded systems using assembly and c Students should be able to: Convert between base and. Explain the difference between

More information

AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo

AVR 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 information

8-bit Microcontroller with 8K Bytes Programmable Flash AT90C8534. Preliminary

8-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 information

AVR094: Replacing ATmega8 by ATmega88. 8-bit Microcontrollers. Application Note. Features. Introduction

AVR094: Replacing ATmega8 by ATmega88. 8-bit Microcontrollers. Application Note. Features. Introduction AVR094: Replacing by 8 Features Interrupt Vectors Bit and Register s and locations Oscillators and Start up Delay Brown Out Detection USART Control Register access Internal Voltage Reference Programming

More information

AT90S Bit Microcontroller with 1K bytes Downloadable Flash AT90S1200. Features. Description. Pin Configuration

AT90S 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 information

ก AVR Microcontrollers

ก 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 information

AVR ISA & AVR Programming (I) Lecturer: Sri Parameswaran Notes by: Annie Guo

AVR 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 information

ECED3204: Microprocessor Part I--Introduction

ECED3204: 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 information

AVR ISA & AVR Programming (I)

AVR 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 information

AVR Microcontrollers Architecture

AVR 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 information

EE 308: Microcontrollers

EE 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 information

Chapter 1 Microprocessor architecture ECE 3120 Dr. Mohamed Mahmoud http://iweb.tntech.edu/mmahmoud/ mmahmoud@tntech.edu Outline 1.1 Computer hardware organization 1.1.1 Number System 1.1.2 Computer hardware

More information

8-bit Microcontroller with 8K Bytes In-System Programmable Flash AT90S8515

8-bit Microcontroller with 8K Bytes In-System Programmable Flash AT90S8515 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 information

8-bit Microcontroller with 16K Bytes In-System Programmable Flash. ATmega163 ATmega163L

8-bit Microcontroller with 16K Bytes In-System Programmable Flash. ATmega163 ATmega163L Features High-performance, Low-power AVR 8-bit Microcontroller 3 Powerful Instructions - Most Single Clock Cycle Execution 32 x 8 General Purpose Working Registers Fully Static Operation Up to 8 MIPS Throughput

More information

8-bit Microcontroller with 4K/8K bytes In-System Programmable Flash AT90S4414 AT90S8515. Features. Pin Configurations

8-bit Microcontroller with 4K/8K bytes In-System Programmable Flash AT90S4414 AT90S8515. Features. Pin Configurations 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 information

CN310 Microprocessor Systems Design

CN310 Microprocessor Systems Design CN310 Microprocessor Systems Design Instruction Set (AVR) Nawin Somyat Department of Electrical and Computer Engineering Thammasat University Outline Course Contents 1 Introduction 2 Simple Computer 3

More information

EE 308: Microcontrollers

EE 308: Microcontrollers EE 308: Microcontrollers AVR Architecture Aly El-Osery Electrical Engineering Department New Mexico Institute of Mining and Technology Socorro, New Mexico, USA January 23, 2018 Aly El-Osery (NMT) EE 308:

More information

COMP2121: Microprocessors and Interfacing. Instruction Set Architecture (ISA)

COMP2121: 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 information

8-bit Microcontroller with 16K Bytes In-System Programmable Flash. ATmega163 ATmega163L. Advance Information

8-bit Microcontroller with 16K Bytes In-System Programmable Flash. ATmega163 ATmega163L. Advance Information Features High-performance, Low-power AVR 8-bit Microcontroller 3 Powerful Instructions - Most Single Clock Cycle Execution 32 x 8 General Purpose Working Registers Fully Static Operation Up to 8 MIPS Throughput

More information

acret Ameya Centre for Robotics & Embedded Technology Syllabus for Diploma in Embedded Systems (Total Eight Modules-4 Months -320 Hrs.

acret Ameya Centre for Robotics & Embedded Technology Syllabus for Diploma in Embedded Systems (Total Eight Modules-4 Months -320 Hrs. acret Ameya Centre for Robotics & Embedded Technology Syllabus for Diploma in Embedded Systems (Total Eight Modules-4 Months -320 Hrs.) Module 0 Introduction Introduction to Embedded Systems, Real Time

More information

8-bit Microcontroller with 64K/128K Bytes In-System Programmable Flash. ATmega603 ATmega603L ATmega103 ATmega103L. Preliminary.

8-bit Microcontroller with 64K/128K Bytes In-System Programmable Flash. ATmega603 ATmega603L ATmega103 ATmega103L. Preliminary. Features Utilizes the AVR RISC Architecture AVR - High-performance and Low-power RISC Architecture 120/121 Powerful Instructions - Most Single Clock Cycle Execution 32 x 8 General Purpose Working Registers

More information

COMP3221: Microprocessors and Embedded Systems

COMP3221: 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 information

Lecture 14. Ali Karimpour Associate Professor Ferdowsi University of Mashhad

Lecture 14. Ali Karimpour Associate Professor Ferdowsi University of Mashhad Lecture 14 AUTOMATIC CONTROL SYSTEMS Ali Karimpour Associate Professor Ferdowsi University of Mashhad Lecture 4 The AVR Microcontroller Introduction to AVR CISC (Complex Instruction Set Computer) Put as

More information

Mark II Aiken Relay Calculator

Mark II Aiken Relay Calculator Introduction to Embedded Microcomputer Systems Lecture 6.1 Mark II Aiken Relay Calculator 2.12. Tutorial 2. Arithmetic and logical operations format descriptions examples h 8-bit unsigned hexadecimal $00

More information

FIFTH SEMESTER DIPLOMA EXAMINATION IN ENGINEERING/ TECHNOLOGY-MARCH 2014 EMBEDDED SYSTEMS (Common for CT,CM) [Time: 3 hours] (Maximum marks : 100)

FIFTH 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 information

are Softw Instruction Set Architecture Microarchitecture are rdw

are Softw Instruction Set Architecture Microarchitecture are rdw Program, Application Software Programming Language Compiler/Interpreter Operating System Instruction Set Architecture Hardware Microarchitecture Digital Logic Devices (transistors, etc.) Solid-State Physics

More information

Computer Architecture 2/26/01 Lecture #

Computer Architecture 2/26/01 Lecture # Computer Architecture 2/26/01 Lecture #9 16.070 On a previous lecture, we discussed the software development process and in particular, the development of a software architecture Recall the output of the

More information

8-bit Microcontroller with 4K Bytes of In-System Programmable Flash AT90S4433 AT90LS4433. Features. Not Recommend for New Designs. Use ATmega8.

8-bit Microcontroller with 4K Bytes of In-System Programmable Flash AT90S4433 AT90LS4433. Features. Not Recommend for New Designs. Use ATmega8. Features High-performance and Low-power AVR 8-bit RISC Architecture 118 Powerful Instructions Most Single Cycle Execution 32 x 8 General Purpose Working Registers Up to 8 MIPS Throughput at 8 MHz Data

More information

EXPERIMENT NO. 1 THE MKT 8085 MICROPROCESSOR TRAINER

EXPERIMENT 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 information

Diploma in Embedded Systems

Diploma in Embedded Systems Diploma in Embedded Systems Duration: 5 Months[5 days a week,3 hours a day, Total 300 hours] Module 1: 8051 Microcontroller in Assemble Language Characteristics of Embedded System Overview of 8051 Family

More information

COMP2121: Microprocessors and Interfacing

COMP2121: 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 information

Chapter 1. Microprocessor architecture ECE Dr. Mohamed Mahmoud.

Chapter 1. Microprocessor architecture ECE Dr. Mohamed Mahmoud. Chapter 1 Microprocessor architecture ECE 3130 Dr. Mohamed Mahmoud The slides are copyright protected. It is not permissible to use them without a permission from Dr Mahmoud http://www.cae.tntech.edu/~mmahmoud/

More information

AVR MICROCONTROLLER ARCHITECTURTE

AVR 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 information

COMP2121: Microprocessors and Interfacing. Instruction Formats and Addressing Modes

COMP2121: 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 information

Mechatronics 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 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 information

Grundlagen Microcontroller Processor Core. Günther Gridling Bettina Weiss

Grundlagen 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 information

VCC PB2 (SCK/ADC1/T0/PCINT2) PB1 (MISO/AIN1/OC0B/INT0/PCINT1) PB0 (MOSI/AIN0/OC0A/PCINT0)

VCC PB2 (SCK/ADC1/T0/PCINT2) PB1 (MISO/AIN1/OC0B/INT0/PCINT1) PB0 (MOSI/AIN0/OC0A/PCINT0) Features High Performance, Low Power AVR 8-Bit Microcontroller Advanced RISC Architecture 120 Powerful Instructions Most Single Clock Cycle Execution 32 x 8 General Purpose Working Registers Fully Static

More information

COMP2121: Microprocessors and Interfacing

COMP2121: Microprocessors and Interfacing Interfacing Lecture 6: Instruction Format http://www.cse.unsw.edu.au/~cs2121 Lecturer: Hui Wu Session 1, 2006 Overview Instruction format AVR instruction format examples PowerPC instruction format examples

More information

8-bit Microcontroller with 2K Bytes of In-System Programmable Flash. ATtiny22 ATtiny22L. Preliminary. Features. Description

8-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 information

Computer System Architecture

Computer 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 information

EE 308: Microcontrollers

EE 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 information

CN310 Microprocessor Systems Design

CN310 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 information

Introduction to Embedded Systems and Chapter 1: Introduction to HCS12/MC9S12. EE383: Introduction to Embedded Systems University of Kentucky

Introduction to Embedded Systems and Chapter 1: Introduction to HCS12/MC9S12. EE383: Introduction to Embedded Systems University of Kentucky Introduction to Embedded Systems and Chapter 1: Introduction to HCS12/MC9S12 EE383: Introduction to Embedded Systems University of Kentucky Samir Rawashdeh With slides based on material by H. Huang Delmar

More information

Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 153) Pass Marks: 24

Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 153) Pass Marks: 24 Prepared By ASCOL CSIT 2070 Batch Institute of Science and Technology 2065 Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 153) Pass

More information

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 2, 2016 CS 31: Intro to Systems Digital Logic Kevin Webb Swarthmore College February 2, 2016 Reading Quiz Today Hardware basics Machine memory models Digital signals Logic gates Circuits: Borrow some paper if

More information

Solution to the Problems and Questions

Solution to the Problems and Questions Solution to the Problems and Questions Chapter 1 Problems and Questions 1. Show an analog signal 2. Show a digital signal Springer International Publishing Switzerland 2015 A. Elahi, T. Arjeski, ARM Assembly

More information

By: Dr. Hamed Saghaei

By: 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 information

8-bit Microcontroller with 2K Bytes Flash. ATtiny26 ATtiny26L

8-bit Microcontroller with 2K Bytes Flash. ATtiny26 ATtiny26L Features High-performance, Low-power AVR 8-bit Microcontroller RISC Architecture 118 Powerful Instructions Most Single Clock Cycle Execution 32 x 8 General Purpose Working Registers Fully Static Operation

More information

Digital Blocks Semiconductor IP

Digital 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 information

8-Bit Microcontroller with 1K bytes In-System Programmable Flash AT90S1200. Features. Description. Pin Configuration

8-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 information

Introduction to Assembly language

Introduction 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 information

8-bit Microcontroller with 2K Bytes of In-System Programmable Flash AT90S2313

8-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 information

8-bit Microcontroller with 8K Bytes In-System Programmable Flash. ATmega8515 ATmega8515L. Features

8-bit Microcontroller with 8K Bytes In-System Programmable Flash. ATmega8515 ATmega8515L. Features Features High-performance, Low-power AVR 8-bit Microcontroller RISC Architecture 130 Powerful Instructions Most Single Clock Cycle Execution 32 x 8 General Purpose Working Registers Fully Static Operation

More information

CHAPTER ASSEMBLY LANGUAGE PROGRAMMING

CHAPTER 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 information

Digital Blocks Semiconductor IP

Digital 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 information

AT90S Bit Microcontroller with 8K bytes Downloadable Flash. AT90S8515 Preliminary. Features. Description. Pin Configurations

AT90S Bit Microcontroller with 8K bytes Downloadable Flash. AT90S8515 Preliminary. Features. Description. Pin Configurations Features Utilizes the AVR Enhanced RISC Architecture 120 Powerful Instructions - Most Single Clock Cycle Execution 8K bytes of In-System Reprogrammable Downloadable Flash - SPI Serial Interface for Program

More information

9/25/ Software & Hardware Architecture

9/25/ Software & Hardware Architecture 8086 Software & Hardware Architecture 1 INTRODUCTION It is a multipurpose programmable clock drive register based integrated electronic device, that reads binary instructions from a storage device called

More information

17.1. Unit 17. Instruction Sets Picoblaze Processor

17.1. Unit 17. Instruction Sets Picoblaze Processor 17.1 Unit 17 Instruction Sets Picoblaze Processor INSTRUCTION SET OVERVIEW 17.2 17.3 Instruction Set Review Defines the software interface of the processor and memory system Instruction set is the vocabulary

More information

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 3, 2015

CS 31: Intro to Systems Digital Logic. Kevin Webb Swarthmore College February 3, 2015 CS 31: Intro to Systems Digital Logic Kevin Webb Swarthmore College February 3, 2015 Reading Quiz Today Hardware basics Machine memory models Digital signals Logic gates Circuits: Borrow some paper if

More information

Processor design - MIPS

Processor design - MIPS EASY Processor design - MIPS Q.1 What happens when a register is loaded? 1. The bits of the register are set to all ones. 2. The bit pattern in the register is copied to a location in memory. 3. A bit

More information

A Bit of History. Program Mem Data Memory. CPU (Central Processing Unit) I/O (Input/Output) Von Neumann Architecture. CPU (Central Processing Unit)

A Bit of History. Program Mem Data Memory. CPU (Central Processing Unit) I/O (Input/Output) Von Neumann Architecture. CPU (Central Processing Unit) Memory COncepts Address Contents Memory is divided into addressable units, each with an address (like an array with indices) Addressable units are usually larger than a bit, typically 8, 16, 32, or 64

More information

Zet x86 open source SoC

Zet x86 open source SoC http://zet.aluzina.org v1.1 19 Feb 2010 Contents 1 2 Contents 1 2 Terasic Altera DE1 - Cyclone II FPGA http://www.terasic.com.tw Physical devices 1 FPGA 2 SDRAM 3 SRAM 4 Flash 5 SD card 6 VGA 7 50 Mhz

More information

Microprocessors/Microcontrollers

Microprocessors/Microcontrollers Microprocessors/Microcontrollers A central processing unit (CPU) fabricated on one or more chips, containing the basic arithmetic, logic, and control elements of a computer that are required for processing

More information

Microcontroller Intel [Instruction Set]

Microcontroller 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 information

Chapter 2 Sections 1 8 Dr. Iyad Jafar

Chapter 2 Sections 1 8 Dr. Iyad Jafar Introducing the PIC 16 Series and the 16F84A Chapter 2 Sections 1 8 Dr. Iyad Jafar Outline Overview of the PIC 16 Series An Architecture Overview of the 16F84A The 16F84A Memory Organization Memory Addressing

More information

Architecture & Instruction set of 8085 Microprocessor and 8051 Micro Controller

Architecture & 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 information

8-bit Microcontroller with 2/4/8K Bytes In-System Programmable Flash. ATtiny261/V ATtiny461/V ATtiny861/V. Preliminary

8-bit Microcontroller with 2/4/8K Bytes In-System Programmable Flash. ATtiny261/V ATtiny461/V ATtiny861/V. Preliminary Features High Performance, Low Power AVR 8-Bit Microcontroller Advanced RISC Architecture 123 Powerful Instructions Most Single Clock Cycle Execution 32 x 8 General Purpose Working Registers Fully Static

More information

AVR. 2. (Assembler directives ) 3. ( Instruction field) 5. (Comment field) 1. (Label field) Assembler. 4. ก (Operands field) (AVR Assembly Language)

AVR. 2. (Assembler directives ) 3. ( Instruction field) 5. (Comment field) 1. (Label field) Assembler. 4. ก (Operands field) (AVR Assembly Language) 3 AVR (AVR Assembly Language). ก ก ก /* * AVRAssembler1.asm * * Created: 9/7/2554 9:40:18 * Author: xp */.org 0 rjmp RESET ;Reset Handle rjmp RESET rjmp RESET RESET: ldi r16, 0b11111111 ;load register

More information

CPU Structure and Function

CPU Structure and Function Computer Architecture Computer Architecture Prof. Dr. Nizamettin AYDIN naydin@yildiz.edu.tr nizamettinaydin@gmail.com http://www.yildiz.edu.tr/~naydin CPU Structure and Function 1 2 CPU Structure Registers

More information

EE 308: Microcontrollers

EE 308: Microcontrollers EE 308: Microcontrollers Interrupts Aly El-Osery Electrical Engineering Department New Mexico Institute of Mining and Technology Socorro, New Mexico, USA March 1, 2018 Aly El-Osery (NMT) EE 308: Microcontrollers

More information

8-bit Atmel Microcontroller with 8/16K Bytes In-System Programmable Flash AT90PWM81 AT90PWM161

8-bit Atmel Microcontroller with 8/16K Bytes In-System Programmable Flash AT90PWM81 AT90PWM161 Features High performance, low power Atmel AVR 8-bit Microcontroller Advanced RISC architecture 131 powerful instructions - most single clock cycle execution 32 8 general purpose working registers Fully

More information

8-bit Microcontroller with 2K Bytes of In-System Programmable Flash AT90S2323 AT90LS2323 AT90S2343 AT90S/LS2323. Features.

8-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 information

8-bit Microcontroller with 1K Byte of In-System Programmable Flash AT90S1200

8-bit Microcontroller with 1K Byte of In-System Programmable Flash AT90S1200 Features Utilizes the AVR RISC Architecture AVR High-performance and Low-power RISC Architecture 89 Powerful Instructions Most Single Clock Cycle Execution 32 x 8 General-purpose Working Registers Up to

More information

ME 515 Mechatronics. A microprocessor

ME 515 Mechatronics. A microprocessor ME 515 Mechatronics Microcontroller Based Control of Mechanical Systems Asanga Ratnaweera Department of Faculty of Engineering University of Peradeniya Tel: 081239 (3627) Email: asangar@pdn.ac.lk A microprocessor

More information

EE 308: Microcontrollers

EE 308: Microcontrollers EE 308: Microcontrollers Introduction Aly El-Osery Electrical Engineering Department New Mexico Institute of Mining and Technology Socorro, New Mexico, USA January 6, 2018 Aly El-Osery (NMT) EE 308: Microcontrollers

More information

Unit 17. Instruction Set Review INSTRUCTION SET OVERVIEW. Historical Instruction Format Options. Instruction Sets Picoblaze Processor

Unit 17. Instruction Set Review INSTRUCTION SET OVERVIEW. Historical Instruction Format Options. Instruction Sets Picoblaze Processor 17.1 17.2 Unit 17 Instruction Sets Picoblaze Processor INSTRUCTION SET OVERVIEW 17.3 17.4 Instruction Set Review Defines the software interface of the processor and memory system Instruction set is the

More information

8-bit Microcontroller with 2/4/8K Bytes In-System Programmable Flash. ATtiny261 ATtiny461 ATtiny861. Automotive

8-bit Microcontroller with 2/4/8K Bytes In-System Programmable Flash. ATtiny261 ATtiny461 ATtiny861. Automotive Features High Performance, Low Power AVR 8-Bit Microcontroller Advanced RISC Architecture 123 Powerful Instructions Most Single Clock Cycle Execution 32 x 8 General Purpose Working Registers Fully Static

More information

Computer Organization

Computer Organization Computer Organization (Instruction set Architecture & Assembly Language Programming) KR Chowdhary Professor & Head Email: kr.chowdhary@gmail.com webpage: krchowdhary.com Department of Computer Science

More information

Chapters 5. Load & Store. Embedded Systems with ARM Cortex-M. Updated: Thursday, March 1, 2018

Chapters 5. Load & Store. Embedded Systems with ARM Cortex-M. Updated: Thursday, March 1, 2018 Chapters 5 Load & Store Embedded Systems with ARM Cortex-M Updated: Thursday, March 1, 2018 Overview: Part I Machine Codes Branches and Offsets Subroutine Time Delay 2 32-Bit ARM Vs. 16/32-Bit THUMB2 Assembly

More information

Chapter 4. The Processor

Chapter 4. The Processor Chapter 4 The Processor Introduction CPU performance factors Instruction count Determined by ISA and compiler CPI and Cycle time Determined by CPU hardware 4.1 Introduction We will examine two MIPS implementations

More information

8-bit Microcontroller with 4K Bytes In-System Programmable Flash. ATtiny40. Preliminary

8-bit Microcontroller with 4K Bytes In-System Programmable Flash. ATtiny40. Preliminary Features High Performance, Low Power AVR 8-Bit Microcontroller Advanced RISC Architecture 54 Powerful Instructions Most Single Clock Cycle Execution 16 x 8 General Purpose Working Registers Fully Static

More information

Lecture 5. EEE3410 Microcontroller Applications Department of Electrical Engineering Assembly Language Programming (1)

Lecture 5. EEE3410 Microcontroller Applications Department of Electrical Engineering Assembly Language Programming (1) Department of Electrical Engineering Lecture 5 8051 Assembly Language Programming (1) 1 In this Lecture 8051 programming model Assembly language syntax Operation codes and operands Machine instructions

More information

CN310 Microprocessor Systems Design

CN310 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 information

Instruction Set Architecture (ISA)

Instruction Set Architecture (ISA) Instruction Set Architecture (ISA) Encoding of instructions raises some interesting choices Tradeoffs: performance, compactness, programmability Uniformity. Should different instructions Be the same size

More information

8051 Overview and Instruction Set

8051 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 information

8-bit Microcontroller with 4/8K Bytes In-System Programmable Flash. ATtiny48/88. Preliminary

8-bit Microcontroller with 4/8K Bytes In-System Programmable Flash. ATtiny48/88. Preliminary Features High Performance, Low Power AVR 8-Bit Microcontroller Advanced RISC Architecture 23 Powerful Instructions Most Single Clock Cycle Execution 32 x 8 General Purpose Working Registers Fully Static

More information

INSTRUCTION SET AND EXECUTION

INSTRUCTION SET AND EXECUTION SECTION 6 INSTRUCTION SET AND EXECUTION Fetch F1 F2 F3 F3e F4 F5 F6 Decode D1 D2 D3 D3e D4 D5 Execute E1 E2 E3 E3e E4 Instruction Cycle: 1 2 3 4 5 6 7 MOTOROLA INSTRUCTION SET AND EXECUTION 6-1 SECTION

More information

AVR. (AVR Assembly Language) Assembler . ก ก

AVR. (AVR Assembly Language) Assembler . ก ก AVR (AVR Assembly Language). ก ก Assembler 2 1 ก /* * AVRAssembler1.asm * * Created: 9/7/2554 9:40:18 * Author: xp */.org 0 rjmp RESET ;Reset Handle rjmp RESET rjmp RESET RESET: ldi r16, 0b11111111 ;load

More information

MICROPROCESSOR BASED SYSTEM DESIGN

MICROPROCESSOR BASED SYSTEM DESIGN MICROPROCESSOR BASED SYSTEM DESIGN Lecture 5 Xmega 128 B1: Architecture MUHAMMAD AMIR YOUSAF VON NEUMAN ARCHITECTURE CPU Memory Execution unit ALU Registers Both data and instructions at the same system

More information

Practical Malware Analysis

Practical Malware Analysis Practical Malware Analysis Ch 4: A Crash Course in x86 Disassembly Revised 1-16-7 Basic Techniques Basic static analysis Looks at malware from the outside Basic dynamic analysis Only shows you how the

More information

CS 24: INTRODUCTION TO. Spring 2018 Lecture 3 COMPUTING SYSTEMS

CS 24: INTRODUCTION TO. Spring 2018 Lecture 3 COMPUTING SYSTEMS CS 24: INTRODUCTION TO Spring 2018 Lecture 3 COMPUTING SYSTEMS LAST TIME Basic components of processors: Buses, multiplexers, demultiplexers Arithmetic/Logic Unit (ALU) Addressable memory Assembled components

More information

Intel 8086 MICROPROCESSOR. By Y V S Murthy

Intel 8086 MICROPROCESSOR. By Y V S Murthy Intel 8086 MICROPROCESSOR By Y V S Murthy 1 Features It is a 16-bit μp. 8086 has a 20 bit address bus can access up to 2 20 memory locations (1 MB). It can support up to 64K I/O ports. It provides 14,

More information

8051 Microcontroller Assembly Programming

8051 Microcontroller Assembly Programming 8051 Microcontroller Assembly Programming EE4380 Fall 2002 Class 3 Pari vallal Kannan Center for Integrated Circuits and Systems University of Texas at Dallas Topics Machine code 8051 Addressing Modes

More information

Basic ARM InstructionS

Basic ARM InstructionS Basic ARM InstructionS Instructions include various fields that encode combinations of Opcodes and arguments special fields enable extended functions (more in a minute) several 4-bit OPERAND fields, for

More information

CPE 323 MSP430 INSTRUCTION SET ARCHITECTURE (ISA)

CPE 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 information