1 / 7

ELE2MIC Friday Lecture Venue Change

ELE2MIC Friday Lecture Venue Change. From Mon 13 August 2007 Lectures previously held in PW101 are moving to PW215. Not Glenn college as previously advised. Please pass this on to your fellow students. ELE2MIC Lectures Week 4. ELE22MIC Lectures 7 and 8 Binary Arithmetic Revision:

jennij
Télécharger la présentation

ELE2MIC Friday Lecture Venue Change

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ELE2MIC Friday Lecture Venue Change • From Mon 13 August 2007 Lectures previously held in PW101 are moving to PW215. • Not Glenn college as previously advised. Please pass this on to your fellow students.

  2. ELE2MIC Lectures Week 4. • ELE22MIC Lectures 7 and 8 • Binary Arithmetic Revision: • ALU and Multiplexors • Introduction to AVR Instruction set : Registers, Load, store, Add, Set & Clear bit, Instruction Set Overview • Addressing Modes • Add, Push, Pull, Jump • Conditional Jumps

  3. NAND GATE

  4. AVR Assembler (0) AVR Assembly Language is a mnemonic language aimed at making it more straight- forward to command the micro-controller to perform a sequence of instructions. Basic instructions are broken down into 2 or more parts: 1. The OpCode - this says what to do 2. The Operands - and what to do it to. 3. Ancillary functions

  5. AVR Assembler (1) For example, if register r22 = $7F then the instruction: inc r22 1. inc is the increment OpCode The Operation Code 2. r22 is the Operand = What to do it to r22 is the destination after instruction execution r22 = $80

  6. AVR Assembler (2) For example, if register r0 = $34, r1 = $21 and the carry flag was set (I.e = 1), then: adc r0, r1 1. adc is the OpCode Operation Code 2. r0 and r1 are the Operands r0 is the destination r1 is the (other) source after the execution of the instruction r0 = $56 Register r1 would be unchanged and still equal $21 The carry flag would also be set to a 0

  7. AVR Assembler (0) Assembly Directives The assembler supports a number of directives making the application development easier. In addition to the directives for macro generation and control, the assembler contains directives for: • Including files. Included files can be nested. • Set program origin. • Symbol usage. The user can define symbols and labels and refer to these throughout the assembly program. • Constant data initialization. The user can do constant initialization. Constants will be placed in the Flash program memory. • List file control. • Support of expressions in a C-like syntax.

More Related