1. Memory Mapped Systems 2. Adding Unsigned Numbers
|
|
- Ashley Payne
- 6 years ago
- Views:
Transcription
1 1 Memory Mapped Systems 2 Adding Unsigned Numbers 1
2 1 Memory Mapped Systems Our system uses a memory space Address bus is 16-bit locations Data bus is 8-bit 2 Adding Unsigned Numbers 2
3 Our system uses a memory space Address bus is 16-bit locations Data bus is 8-bit Controller Memory Space: locations x 8-bit Central Processing Unit (CPU, ie, μp) Memory: RAM, ROM, FLASH, etc Input/Output (I/O) Controllers ABUS CBUS DBUS 3
4 WHAT IS A MEMORY MAPPED SYSTEM? Each device which the μp controls and uses is assigned a distinct address range in the memory space A device is a memory chip or an I/O controller (with a bunch of registers) The assignment is called mapping a device to the memory space Once a device is mapped into the memory space, when you write a program you will know where the device is located, and therefore, you will know what addresses to use in instructions to read data from and write data to the device For example, the figure to the right shows the address range of each device, ie, shows where each device is mapped in the memory space Note that some areas in the memory space may not be used (as indicated by NOT USED ) FF FF F 0610 EFFF F000 FFFF RAM1 RAM2 PORT IO NOT USED ROM 4
5 Example (Continued) This view shows the devices on the system bus, but does not show the address ranges of the chips Central Processing Unit (CPU, ie, μp) 512x8 RAM1 1Kx8 RAM2 16x8 I/O Controller 4Kx8 ROM 16 8 ABUS CBUS DBUS SYSTEM BUS 5
6 A MEMORY MAPPED SYSTEM EXAMPLE 2 6
7 7 MEMORY MAPPED SYSTEMS OTHER EXAMPLES USER RAM PORT IO FLASH ROM INTERRUPT VECCTORS FF NOT USED FF A000 NOT USED 0804 BFFF DFFF E000 FFF7 FFF8 FFFF USER RAM ROM INTERRUPT VECCTORS FFF NOT USED 8000 E000 FFF7 FFF8 FFFF PORT IO DFFC DFFF RAM1 PORT IO FLASH INTERRUPT VECCTORS FF RAM FF F NOT USED 0810 DFFF E000 FFF7 FFF8 FFFF
8 LAB SYSTEM (PARTIAL) MEMORY MAP FLASHStart EQU $4000 ;Address to place my code/constant data FLASHEnd EQU $7FFF RAMStart EQU $1400 ;Address to place my variables and stack RAMEnd EQU $3FFF ORG RAMStart ;Allocate space for my variables num1 DCB $FF ;Install 1st number at memory location $1400 num2 DCB $03 ;Install 2nd number at memory location $1401 MSresult DSB 1 ;Allocate space to store MS Byte of result LSresult DSB 1 ;Allocate space to store LS Byte of result ORG RAMStart ;Allocate space for my stack ;I have no stack for this program ORG FLASHStart ;Put my program code into FLASH memory, ;starting at $4000 Entry CLRA LDAB num1 ADDB num2 BCC skip LDAA #1 skip STAA MSresult STAB LSresult here BRA here ;Stop the program by looping continually here ORG $FFFE ;Address of Reset Vector DCW Entry ;Install my Reset Vector 8
9 SIZE AND NUMBER OF CHIPS Amount of RAM, ROM, FLASH, and other memories depend on the application A home security system may need a small amount of RAM, ROM, and a few locations for IO controllers A sound recording system and data logging application may need large amount of RAM, small ROM (program), and a few locations for IO controllers You will find that the course projects for this course each need a different amount and type of memory chips 9
10 SYSTEM BUS ARCHITECTURE von Neumann architecture μp Bus Master 16 8 ABUS CBUS DBUS RAM1 RAM2 I/O 1 I/O 2 ROM Single bus for both program and data May have different or same chips for program and data Program and data must be accessed at different times This course uses von Neumann SYSTEM BUS Less complex to implement I/O 1 8 ABUS CBUS I/O 2 RAM1 RAM μp Bus Master 16 8 ROM 8 ABUS CBUS Harvard architecture Separate program memory-bus and data memory-bus Program and data are accessed from separate buses DBUS DATA BUS PROGRAM BUS DBUS Program and data may be accessed at the same time More complex to implement 10
11 WHERE ARE PROGRAM INSTRUCTIONS STORED? A ROM chip is generally used to store the initial program (aka reset routine) to be run on the microprocessor Examples: EEPROM, FLASH, PROM Program needs to be preserved when power is shut off When developing microprocessing applications, program instructions may be stored in RAM to facilitate development, debugging, and testing Once fully developed, debugged, and tested, the program will be burnt into a ROM chip, located in the memory map 11
12 1 Memory Mapped Systems 2 Adding Unsigned Numbers 12
13 ADDING UNSIGNED NUMBERS When you add two 8-bit unsigned numbers, you need to consider the most significant carry out: For example, if you do: $FF + $01 = , the 8-bit result would be $00, and the C=1 in the CCR Therefore, your answer should be $0100 = 256 LDAB $0800 ADDB $0801 BCS Prepend$01 LDAA #$00 BRA SKIP Prepend$01 LDAA #$01 SKIP STAA $0802 STAB $0803 DONE BRA DONE CLRA LDAB $0800 ADDB $0801 ADCA #$00 STAA $0802 STAB $0803 DONE BRA DONE Two different programs that do the same thing Next: how to add a whole bunch of numbers? 13
14 USER RAM Given USER RAM from 0100 to 01FF (256 bytes; how did I get 256?) Constraint: program and data are to be stored in the same memory chip: USER RAM 0100 USER RAM CHIP Program Code Area Need to keep program code and data separate Why? (See next slide for example of what can go wrong) Memory allocation plan: Program code to start at 0100 Note: size of program will not be known until it has been completed Data Area Place data at other end of the USER RAM chip, as far as possible from the program, to allow for maximum size of program area and maximum size of data area 01FF 14
15 Aside: why must program code and data be separated? Ex of what can go wrong Line Address Machine Code Assembly Language Comments 1 00FE B LDAA $0107 Load contents of $0107 into Accumulator A (A=7E) BB ADDA $0108 Add the contents of $0108 to Accumulator A (A=7F) B STAA $0109 Stores the result at $0109 ($0109) = 7F E Supposed to be start of data area (variable 1) Variable Result There are two major problems here: 1 A program end was not defined 2 Data was placed in the program code area Developer mistakenly places the data 7E and 01 into locations $ 0107 and $0108, respectively, and uses $0109 to store the result Without a program end being defined, these memory locations are part of the program After executing the STAA $0109 instruction, the microprocessor fetches the next instruction, expecting an opcode, and puts the value fetched $7E in the OCR It (ie, $7E) is interpreted as the JMP EXT instruction, which is executed as such To execute this instruction, the microprocessor forms the address of where to jump to by copying the next two bytes ($01 $7F) into the THR Finally, the microprocessor jumps to location $017F, which contains undefined program instructions and the program crashes 15
16 WHAT IS THE MAXIMUM POSSIBLE SUM? 46 bytes to be added together should be stored in USER RAM USER RAM 0100 To determine the maximum possible sum, assume all data bytes are maximum value, ie, 255; then, the maximum unsigned sum would be: 46 * 255 = 11,730 Program Code Area The sum must be stored in two locations (2 Bytes are needed to represent the sum) Note: 2 Bytes can count up to 65,535 (FFFF) 01FD 01FE 01FF RESULT HB RESULT LB Data Area Let s plan to store the result at 01FE:01FF 16
17 WHAT SHOULD BE THE STARTING ADDRESS OF THE DATA? Ending address (EA) is $01FD: solve for starting address (SA): 0100 EA = SA (Why 1?) Program Code Area SA = EA 45 = 01FD 002D = 01D0 Starting Address (SA) SA = 01D0 SA = 2D 16 SUBTRACT A B C D E F Ending Address (EA) 01FD 01FE 01FF RESULT HB RESULT LB 46 numbers to be Added Result 4-bit number wheel unrolled 17
18 Now, populate the memory with 46 bytes to be added Now we have a List (Array, Block) of data to add 01D0 USE RAM CHIP 01 FF 7F AB 81 Note that data in memory may be interpreted differently: Example: AB = 171 or -85 We interpret the numbers as unsigned for this example 01FD 01FE 01FF 3F RESULT HB RESULT LB Data Area 18
19 MAIN IDEA OF HOW TO ADD THE LIST OF NUMBERS ACCUMULATOR B bit Binary Number Wheel ACCUMULATOR A bit Binary Number Wheel D0 USER RAM CHIP 01 FF 7F AB COUNTS THE CARRY OUTs OF ACCUMULATOR A ADDS ALL BYTES OF DATA IN THE LIST MOST SIGNIFICANT PART OF SUM ACCB:ACCA LEAST SIGNIFICANT PART OF SUM 01FD 01FE 01FF 3F RESULT HB RESULT LB Ex: 01 + FF = 00 with C=1 B = 01 and A = 00 ACCB:ACCA =
20 INITIAL SOLUTION ATTEMPT POOR SOLUTION: WON T WORK 01D0 USER RAM CHIP 01 FF 7F AB 81 Clear high byte of result (ACCB = 0) Load ACCA with the 1 st number: ACCA (01D0) Add the next number: ACCA ACCA + (01D1) Add the carry to ACCB: ACCB $00 + C CLRB LDAA $01D0 ADDA $01D1 ADCB #$00 ADDA $01D2 Repeat preceding two instructions 44 more times, with appropriate changes in the address (01XX) Add the 46 th number: ACCA ACCA + (01FD) ADCB #$00 ADDA $01FD Add the carry to ACCB: ACCB $00 + C ADCB #$00 01FD 01FE 01FF 3F RESULT HB RESULT LB Store the high byte of result: (01FE) ACCB Store the low byte of result: (01FF) ACCA STAB STAA $01FE $01FF Done DONE BRA DONE 20
21 PROGRAM LISTING FILE *LST Line Address Machine Code Assembly Language Comments F CLRB Make high byte of result = zero B6 01 D0 LDAA $01D0 Load contents of $01D0 into Accumulator A BB 01 D1 ADDA $01D1 Add the contents of $01D1 to Accumulator A C9 00 ADCB #$00 Add 00 and the carry to Accumulator B BB 01 D2 ADDA $01D2 Add the contents of $01D2 to Accumulator A 6 010C C9 00 ADCB #$00 Add 00 and the carry to Accumulator B 91 01E0 BB 01 FD ADDA $01FD Add the contents of $01FD to Accumulator A 92 01E3 C9 00 ADCB #$00 Add 00 and the carry to Accumulator B 93 01E5 F7 01 FE STAB $01FE Store HB of the result in location $01FE 94 01E8 B7 01 FF STAA $01FF Store LB of the result in location $01FF 95 01EB 20 FE DONE BRA DONE Infinite loop here Note: Called a listing file because it additionally lists the contents of memory for the program 21
22 ASIDE: DIFFERENT WAYS OF VIEWING MEMORY For Readability: Since each line represents one instruction Address Machine Code F 0101 B6 01 D BB 01 D C BB 01 D2 010C 01E0 BB 01 FD 01E3 C E5 F7 01 FE 01E8 B7 01 FF 01EB 20 FE BYTE Organized Address Machine Code F 0101 B D BB D C BB 010A 01 D2 01EB 20 01EC FE Actual: Each memory location holds 8 voltages (either 5 V and 0 V), but we represent the voltages by binary symbols Address Machine Code A EB EC
23 PROGRAM Address Machine Code F 0101 B6 01 D BB 01 D C BB 01 D2 010C C E0 BB 01 FD 01E3 C E5 F7 01 FE 01E8 B7 01 FF 01EB 20 FE PROGRAM SIZE 01EC = 00ED = 237 Bytes 237 Locations in Memory PROGRAM CYCLES 1x2 1x4 45x4 45x2 2x4 1x3 Total: 287 For 2 MHz Clock: 1435 μs 23
24 WHY SOLUTION 1 WON T WORK: Address Machine Code F 0101 B D BB D C BB 010A 01 D2 01EB 20 01EC FE Starting Address (SA) Ending Address (EA) D0 01EC 01FD 01FE 01FF RESULT HB RESULT LB Program Code Area Data Area NOT ENOUGH ROOM FOR PROGRAM IN GIVEN MEMORY CHIP! 24
25 SOLUTION 2 LOOP N Start A=0 B=0 X = $01D0 A=A+(X) B=B + Carry X=X+1 X==$01FE? Y X 01D0 USER RAM CHIP 01 FF 7F AB 81 CLRA CLRB LDX #$01D0 Loop ADDA $00,X ADCB #$00 INX CPX BNE STAB #$01FE Loop $01FE Store high byte of result (ie, B) at location $01FE Store low byte of result (ie, B) at location $01FF 01FD 01FE 01FF 3F RESULT HB RESULT LB STAA $01FF HERE BRA HERE End 25
26 PROGRAM Address Machine Code F F 0102 CE 01 D AB C A 8C 01 FE 010D 26 F6 010F F7 01 FE 0112 B7 01 FF FE PROGRAM SIZE = 0016 = 22 Bytes 22 Locations in Memory CLRA CLRB LDX #$01D0 Loop ADDA 00,X ADCB #$00 INX CPX #$01FE BNE Loop STAB $01FE STAA $01FF HERE BRA HERE PROGRAM CYCLES 2x2 1x3 46x4 46x2 46x2 46x4 46x3 2x4 1x3 Total: 708 For 2 MHz Clock: 354 μs 26
27 Solution 1 code (1435 μs) is faster than Solution 2 (354 μs), but Solution 1 won t fit in the given memory chip Sometimes speed is critical and the system will have enough space for a program that is otherwise size inefficient Solution 1 does not work because it does not fit in the available memory chip Solution 2 does fit in the memory chip Conclusion: Whenever working with a list of data (arrays), use a loop 27
It translates (converts) assembly language to machine code.
Assemblers 1 It translates (converts) assembly language to machine code. Example: LDAA $0180 Uses an instruction set manual: Tests/Final Exam. B6 01 80 Use software: Like the IDE in the Lab. 2 Assembler:
More informationWhat is an Addressing Mode?
Addressing Modes 1 2 What is an Addressing Mode? An addressing mode is a way in which an operand is specified in an instruction. There are different ways in which an operand may be specified in an instruction.
More informationCodeWarrior. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff
CodeWarrior 1 Assembler An assembler is a program that translates assembly language into machine code. Machine code are the numbers that the CPU recognizes as instructions. $B6 $10 $00 Assembly language
More informationUNIVERSITY OF MANITOBA DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING. Term Test #2 Solution ECE 3610 MICROPROCESSING SYSTEMS
ECE 3610 Test 2 Solution 1 of 7 PRINT LAST NAME: STUDENT NUMBER PRINT FIRST NAME: UNIVERSITY OF MANITOBA DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING DATE: Feb. 28, 11; TIME: 6:00-8:00 P.M. Term Test
More informationME4447/6405. Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics. Instructor: Professor Charles Ume LECTURE 7
ME4447/6405 Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics Instructor: Professor Charles Ume LECTURE 7 Reading Assignments Reading assignments for this week and next
More informationIntroduction to the 9S12 Microcontroller
Introduction to the 9S12 Microcontroller o Harvard architecture and Princeton architecture o Memory map for a Princeton architecture microprocessor o 68HC12 Address Space o 68HC12 ALU o 68HC12 Programming
More informationMark 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 informationRyerson University Department of Electrical and Computer Engineering ELE 538 Microprocessor Systems Final Examination December 8, 2003
Ryerson University Department of Electrical and Computer Engineering ELE 538 Microprocessor Systems Final Examination December 8, 23 Name: Student Number: Time limit: 3 hours Section: Examiners: K Clowes,
More informationEE 5340/7340 Motorola 68HC11 Microcontroler Lecture 1. Carlos E. Davila, Electrical Engineering Dept. Southern Methodist University
EE 5340/7340 Motorola 68HC11 Microcontroler Lecture 1 Carlos E. Davila, Electrical Engineering Dept. Southern Methodist University What is Assembly Language? Assembly language is a programming language
More informationLECTURE #21: G-CPU & Assembly Code EEL 3701: Digital Logic and Computer Systems Based on lecture notes by Dr. Eric M. Schwartz
LECTURE #21: G-CPU & Assembly Code EEL 3701: Digital Logic and Computer Systems Based on lecture notes by Dr. Eric M. Schwartz G-CPU Important Notes (see Schwartz s lecture for a general overview) - The
More informationEE319 K Lecture 3. Introduction to the 9S12 Lab 1 Discussion Using the TExaS simulator. University of Texas ECE
EE319 K Lecture 3 Introduction to the 9S12 Lab 1 Discussion Using the TExaS simulator University of Texas ECE Introduction (von Neumann architecture) processor Bus Memory Mapped I/O System Input Devices
More informationLecture 6 Assembly Programming: Branch & Iteration
CPE 390: Microprocessor Systems Spring 2018 Lecture 6 Assembly Programming: Branch & Iteration Bryan Ackland Department of Electrical and Computer Engineering Stevens Institute of Technology Hoboken, NJ
More informationECE 3610 MICROPROCESSING SYSTEMS AN ENCRYPTED ASCII CODE DECODER
ECE 3610 MICROPROCESSIG SYSTEMS A ECRYPTED ASCII CODE DECODER 1 PROBLEM SPECIFICATIO Design a microprocessing system to decode messages which are encrypted. Each byte of the message is an encrypted ASCII
More informationCoe538 Final Study Guide 2016 (Questions & Answers)
Coe538 Study Guide 1 of 8 Coe538 Final Study Guide 2016 (Questions & Answers) This version contains questions AND answers. This study guide is meant to help you review coe538 and prepare for the final.
More information538 Lecture Notes Week 2
538 Lecture Notes Week 2 (Sept. 13, 2017) 1/15 Announcements 538 Lecture Notes Week 2 Labs begin this week. Lab 1 is a one-week lab. Lab 2 (starting next week) is a two-week lab. 1 Answers to last week's
More informationChapter 2: HCS12 Assembly Programming. EE383: Introduction to Embedded Systems University of Kentucky. Samir Rawashdeh
Chapter 2: HCS12 Assembly Programming EE383: Introduction to Embedded Systems University of Kentucky Samir Rawashdeh With slides based on material by H. Huang Delmar Cengage Learning 1 Three Sections of
More informationECE331 Handout 3- ASM Instructions, Address Modes and Directives
ECE331 Handout 3- ASM Instructions, Address Modes and Directives ASM Instructions Functional Instruction Groups Data Transfer/Manipulation Arithmetic Logic & Bit Operations Data Test Branch Function Call
More informationMC9S12 Address Space
MC9S12 Address Space MC9S12 has 16 address lines MC9S12 can address 2 16 distinct locations For MC9S12, each location holds one byte (eight bits) MC9S12 can address 2 16 bytes 2 16 = 65536 2 16 = 2 6 2
More informationMenu Computer Organization Programming Model for the an example microprocessors (the G-CPU & Motorola 68HC11) Assembly Programming Look into my...
Menu Computer Organization Programming Model for the an example microprocessors (the G-CPU & Motorola 68HC11) Assembly Programming Look into my... See examples on web: DirAddr.asm, ExtAddr.asm, IndAddr.asm,
More informationMC9S12 Assembler Directives A Summary of MC9S12 Instructions Disassembly of MC9S12 op codes. Summary of HCS12 addressing modes ADDRESSING MODES
MC9S12 Assembler Directives A Summary of MC9S12 Instructions Disassembly of MC9S12 op codes o Review of Addressing Modes o Which branch instruction to use (signed vs unsigned) o Using X and Y registers
More informationEE 3170 Microcontroller Applications
Q. 3.9 of HW3 EE 37 Microcontroller Applications (a) (c) (b) (d) Midterm Review: Miller Chapter -3 -The Stuff That Might Be On the Exam D67 (e) (g) (h) CEC23 (i) (f) (j) (k) (l) (m) EE37/CC/Lecture-Review
More informationCross Assembly and Program Development
Cross Assembly and ENGG4640/3640; Fall 2004; Prepared by Radu Muresan 1 Introduction Text Editor Program Ex. DOS, Notepad, Word saved as ASCII Source Code Assembler or Cross-Assembler Object Code Machine
More informationECE 3610 MICROPROCESSING SYSTEMS
24.361 Lab. 4 31 ECE 3610 MICROPROCESSING SYSTEMS Laboratory 4 LAB 4: ASSEMBLER DIRECTIVES, THE STACK, SUBROUTINES, AND BUBBLE SORTING 1 INTRODUCTION This lab deals with the use of the stack and subroutines
More informationIntroduction to Microcontrollers
Motorola M68HC11 Specs Assembly Programming Language BUFFALO Topics of Discussion Microcontrollers M68HC11 Package & Pinouts Accumulators Index Registers Special Registers Memory Map I/O Registers Instruction
More informationAddition and Subtraction of Hexadecimal Numbers Simple assembly language programming
Addition and Subtraction of Hexadecimal Numbers Simple assembly language programming o A simple Assembly Language Program o Assembling an Assembly Language Program o Simple 9S12 programs o Hex code generated
More informationProgramming the Motorola MC68HC11 Microcontroller
Programming the Motorola MC68HC11 Microcontroller COMMON PROGRAM INSTRUCTIONS WITH EXAMPLES aba Add register B to register A Similar commands are abx aby aba add the value in register B to the value in
More information2) [ 2 marks] Both of the following statements cause the value $0300 to be stored in location $1000, but at different times. Explain the difference.
1) [ 9 marks] Write a sequence of directives for an HCS12 assembly language program that performs all of these tasks, in this order: a) Define an array called Measurements starting from memory location
More informationExam I Review February 2017
Exam I Review February 2017 Binary Number Representations Conversion of binary to hexadecimal and decimal. Convert binary number 1000 1101 to hexadecimal: Make groups of 4 bits to convert to hexadecimal,
More informationECE 3120 Computer Systems Arithmetic Programming
ECE 3120 Computer Systems Arithmetic Programming Manjeera Jeedigunta http://blogs.cae.tntech.edu/msjeedigun21 Email: msjeedigun21@tntech.edu Tel: 931-372-6181, Prescott Hall 120 Today: Multiplication and
More informationAddition and Subtraction of Hexadecimal Numbers Simple assembly language programming
Addition and Subtraction of Hexadecimal Numbers Simple assembly language programming o A simple Assembly Language Program o Assembling an Assembly Language Program o Simple 9S12 programs o Hex code generated
More informationMost of the HC12 s instructions access data in memory There are several ways for the HC12 to determine which address to access
HC12 Addressing Modes Instruction coding and execution o Inherent, Extended, Direct, Immediate, Indexed, and Relative Modes o Summary of MC9S12 Addressing Modes o Using X and Y registers as pointers o
More informationA Simple MC9S12 Program
A Simple MC9S12 Program All programs and data must be placed in memory between address 0x1000 and 0x3BFF. For our programs we will put the first instruction at 0x2000, and the first data byte at 0x1000
More information538 Lecture Notes Week 3
538 Lecture Notes Week 3 (Sept. 16, 2013) 1/18 538 Lecture Notes Week 3 Answers to last week's questions 1 Write code so that the least significant bit of Accumulator A is cleared, the most significant
More informationIntroduction to Microcontrollers II
Introduction to Microcontrollers II brset, brclr Indexed Addressing Example µp Laboratory #2 BUFFALO Assembling Code EECE 143 Digital Design Project Purpose: To allow students to design their own digital
More informationTotal: EEL 3701 Digital Logic & Computer Systems Final Exam Fall Semester 2007 COVER SHEET: Re-Grade Information: 1 (10) 2 (10) 3 (10) 4 (14) 5 (14)
COVER SHEET: Prob. Points: Re-Grade Information: Total: 1 (10) 2 (10) 3 (10) 4 (14) 5 (14) 6 (15) 7 (15) 8 (12) (100) 1 Remember to show ALL work here and in EVERY problem on this exam. [10%] 1. Circuit
More informationN bit is set if result of operation in negative (MSB = 1) Z bit is set if result of operation is zero (All bits = 0)
Addition and Subtraction of Hexadecimal Numbers. Setting the C (Carry), V (Overflow), N (Negative) and Z (Zero) bits How the C, V, N and Z bits of the CCR are changed Condition Code Register Bits N, Z,
More informationCE-320 Microcomputers I Winter 2010 LAB 1: MINIIDE GROUP #: NAME: PARTNER: Lab 1 Page 1
LAB 1: MINIIDE GROUP #: NAME: PARTNER: Lab 1 Page 1 LAB 1: MINIIDE GOALS Understand Wytec s Dragon12+ evaluation board Know how to use Dragon12 commands Understand an integrated development environment
More informationEE319 K Lecture 7. Address mode review Assembler, Debugging Psuedo ops 16 bit timer finite state machines. University of Texas ECE
EE319 K Lecture 7 Address mode review Assembler, Debugging Psuedo ops 16 bit timer finite state machines University of Texas ECE Texas and execution A $24 EEPROM $F800 $F801 $86 $F802 $24 $F803 }ldaa #36
More informationTEMPERATURE SENSOR. Revision Class. Instructor / Professor LICENSE
CME-11E9 EVBU LAB EXPERIMENT TEMPERATURE SENSOR Revision 04.02.11 Class Instructor / Professor LICENSE You may use, copy, modify and distribute this document freely as long as you include this license
More informationME 6405 Introduction to Mechatronics
ME 6405 Introduction to Mechatronics Fall 2005 Instructor: Professor Charles Ume LECTURE 9 Homework 1 Solution 1. Write an assembly language program to clear the usable internal RAM in the M68HC11E9. Solution:
More informationIntroduction to Mechatronics. Fall Instructor: Professor Charles Ume. Interrupts and Resets
ME645 Introduction to Mechatronics Fall 24 Instructor: Professor Charles Ume Interrupts and Resets Reason for Interrupts You might want instructions executed immediately after internal request and/or request
More informationCOE538 Lecture Notes Week 3 (Week of Sept 17, 2012)
COE538 Lecture Notes: Week 3 1 of 11 COE538 Lecture Notes Week 3 (Week of Sept 17, 2012) Announcements My lecture sections should now be on Blackboard. I've also created a discussion forum (and anonymous
More informationECE L A B 1 Introduction ASSEMBLY PROGRAMMING WITH MINIIDE
L A B 1 Introduction ASSEMBLY PROGRAMMING WITH MINIIDE The purpose of this lab is to introduce you to the layout and structure of Assembly Language programs and their format. You will write your own programs
More information538 Lecture Notes Week 1
538 Clowes Lecture Notes Week 1 (Sept. 6, 2017) 1/10 538 Lecture Notes Week 1 Announcements No labs this week. Labs begin the week of September 11, 2017. My email: kclowes@ryerson.ca Counselling hours:
More informationCOSC345 Software Engineering. Basic Computer Architecture and The Stack
COSC345 Software Engineering Basic Computer Architecture and The Stack Outline Architectural models A little about the 68HC11 Memory map Registers A little bit of assembly (never did us any harm) The program
More informationHistory of the Microprocessor. ECE/CS 5780/6780: Embedded System Design. Microcontrollers. First Microprocessors. MC9S12C32 Block Diagram
History of the Microprocessor ECE/CS 5780/6780: Embedded System Design Chris J. Myers Lecture 1: 68HC12 In 1968, Bob Noyce and Gordon Moore left Fairchild Semiconductor and formed Integrated Electronics
More informationLecture 9 Subroutines
CPE 390: Microprocessor Systems Spring 2018 Lecture 9 Subroutines Bryan Ackland Department of Electrical and Computer Engineering Stevens Institute of Technology Hoboken, NJ 07030 Adapted from HCS12/9S12
More informationECE 372 Microcontroller Design Basic Assembly Programming. ECE 372 Microcontroller Design Basic Assembly Programming
For Loop Example: for(j=0; j
More informationIntroduction to Microcontrollers III
Introduction to Microcontrollers III Timing Functions Delay5u.a11, Delay1m.a11 µp Laboratory #3 Data Entry : µp Laboratory #2 Hints Use the pushbutton routine from count.a11 or count_br.a11 (WAIT0 and
More informationLecture #4 Microcontroller Instruction Set Embedded System Engineering Philip Koopman Monday, 25-Jan-2016
Lecture #4 Microcontroller Instruction Set 2 18-348 Embedded System Engineering Philip Koopman Monday, 25-Jan-2016 Electrical& Computer ENGINEERING Copyright 2006-2016, Philip Koopman, All Rights Reserved
More informationEE 308 Spring The HCS12 has 6 addressing modes
The HCS12 has 6 addressing modes Most of the HC12 s instructions access data in memory There are several ways for the HC12 to determine which address to access Effective Address: Memory address used by
More informationIntroduction to Microcontrollers II
Introduction to Microcontrollers II brset, brclr Indexed Addressing Example µp Laboratory #2 BUFFALO Assembling Code EECE 143 Digital Design Project Purpose:To allow students to design their own digital
More informationLecture 5 Assembly Programming: Arithmetic
CPE 390: Microprocessor Systems Spring 2018 Lecture 5 Assembly Programming: Arithmetic Bryan Ackland Department of Electrical and Computer Engineering Stevens Institute of Technology Hoboken, NJ 07030
More informationDecimal, Hexadecimal and Binary Numbers Writing an assembly language program
Decimal, Hexadecimal and Binary Numbers Writing an assembly language program o Disassembly of MC9S12 op codes o Use flow charts to lay out structure of program o Use common flow structures if-then if-then-else
More informationUsing the stack and the stack pointer
Using the stack and the stack pointer o The Stack and Stack Pointer o The stack is a memory area for temporary storage o The stack pointer points to the last byte in the stack o Some instructions which
More informationLecture #3 Microcontroller Instruction Set Embedded System Engineering Philip Koopman Wednesday, 20-Jan-2015
Lecture #3 Microcontroller Instruction Set 18-348 Embedded System Engineering Philip Koopman Wednesday, 20-Jan-2015 Electrical& Computer ENGINEERING Copyright 2006-2015, Philip Koopman, All Rights Reserved
More informationGetting Started with the HCS12 IDE
Getting Started with the HCS12 IDE B. Ackland June 2015 This document provides basic instructions for installing and using the MiniIDE Integrated Development Environment and the Java based HCS12 simulator.
More informationProgramming Book for 6809 Microprocessor Kit
Programming Book for 6809 Microprocessor Kit Wichit Sirichote, wichit.sirichote@gmail.com Image By Konstantin Lanzet - CPU collection Konstantin Lanzet, CC BY-SA 3.0, Rev1.2 March 2018 1 Contents Lab 1
More informationChapter 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 informationEB301. Motorola Semiconductor Engineering Bulletin. Programming EEPROM on the MC68HC811E2 during Program Execution. Freescale Semiconductor, I
Order this document by /D Motorola Semiconductor Programming EEPROM on the MC68HC811E2 during Program Execution By Brian Scott Crow Austin, Texas Introduction The Problem The MC68HC811E2 microcontroller
More informationAN Kbyte Addressing with the M68HC11. Overview
Order this document by /D 128-Kbyte Addressing with the M68HC11 By Ross Mitchell MCU Applications Engineering Freescale Ltd. East Kilbride, Scotland Overview The maximum direct addressing capability of
More informationIntroduction 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 informationECE 331: PC Lab 3 Stack and Subroutines
ECE 331: PC Lab 3 Stack and Subroutines Professor Andrew Mason Michigan State University Rev: S11 p.1 Announcements Objectives Topics Outline Review starting and using ASM development environment Pushing
More informationCHAPTER 8. Solutions for Exercises
CHAPTER 8 Solutions for Exercises E8.1 The number of bits in the memory addresses is the same as the address bus width, which is 20. Thus the number of unique addresses is 2 20 = 1,048,576 = 1024 1024
More informationCOSC 243. Instruction Sets And Addressing Modes. Lecture 7&8 Instruction Sets and Addressing Modes. COSC 243 (Computer Architecture)
COSC 243 Instruction Sets And Addressing Modes 1 Overview This Lecture Source Chapters 12 & 13 (10 th editition) Textbook uses x86 and ARM (we use 6502) Next 2 Lectures Assembly language programming 2
More information538 Lecture Notes Week 5
538 Lecture Notes Week 5 (Sept. 30, 2013) 1/15 538 Lecture Notes Week 5 Answers to last week's questions 1. With the diagram shown for a port (single bit), what happens if the Direction Register is read?
More information538 Lecture Notes Week 5
538 Lecture Notes Week 5 (October 4, 2017) 1/18 538 Lecture Notes Week 5 Announements Midterm: Tuesday, October 25 Answers to last week's questions 1. With the diagram shown for a port (single bit), what
More informationLab 2 Part 1 Assembly Language Programming and 9S12 Ports
Lab 2 Part 1 Assembly Language Programming and 9S12 Ports In this sequence of three labs, you will learn how to write simple assembly language programs for the MC9S12 microcontroller, and how to use general
More informationCMPEN 472 Sample EXAM II
CMPEN 472 Sample EXAM II Name: Student ID number (last 4 digit): Please write your name on every page. Write your solutions clearly. You may use backside of each page for scratch but the solutions must
More informationIntroduction to Microcontrollers III
Introduction to Microcontrollers III Timing Functions Delay5u.a11, Delay1m.a11 µp Laboratory #3 Data Entry : µp Laboratory #2 Hints Use the pushbutton routine from count.a11 or count_br.a11 (WAIT0 and
More informationLab 1 MC9S12 Assembler and Monitor
Lab 1 MC9S12 Assembler and Monitor Introduction and Objectives The purpose of this lab is to help you become familiar with your Dragon12-Plus Evaluation Board (EVB), and some of the software tools which
More informationSample Problem Set #1
Sample Problem Set #1 Notes: These problems are typical exam problems; most are drawn from previous homeworks and exams. This exam is open book, open notes. It may help to have a calculator. For partial
More informationGo Gators! Relax! May the Schwartz be with you!
Page 1/12 Exam 1 Instructions: Turn off cell phones beepers and other noise making devices. Show all work on the front of the test papers. If you need more room make a clearly indicated note on the front
More informationECE 4510/5530 Microcontroller Applications Chapter 1
Microcontroller Applications Chapter 1 Dr. Bradley J. Bazuin Associate Professor Department of Electrical and Computer Engineering College of Engineering and Applied Sciences Chapter 1 Overview Basic Computer
More informationIntroduction to Programming the 9S12 in C Huang Sections 5.2 and 5.3. You will be able to use all of the Motorola data manuals on the exam.
Introduction to Programming the 9S12 in C Huang Sections 5.2 and 5.3 o Comparison of C and Assembly programs for the HC12 o How to compile a C program using the GNU-C compiler o Using pointers to access
More informationECE3120: Computer Systems Hardware & Software Development Tools
ECE3120: Computer Systems Hardware & Software Development Tools Manjeera Jeedigunta http://blogs.cae.tntech.edu/msjeedigun21 Email: msjeedigun21@tntech.edu Tel: 931-372-6181, Prescott Hall 120 Using the
More informationHomework 12 Solutions
Page 1/6 1. Here is a short program that shows all addressing modes: We are given a table of student's test scores where there are three scores in a semester per student. Unfortunately, the person who
More informationEE4390 Microprocessors
EE4390 Microprocessors Lesson 6,7 Instruction Set, Branch Instructions, Assembler Directives Revised: Aug 1, 2003 1 68HC12 Instruction Set An instruction set is defined as a set of instructions that a
More informationECE 372 Microcontroller Design Assembly Programming Arrays. ECE 372 Microcontroller Design Assembly Programming Arrays
Assembly Programming Arrays Assembly Programming Arrays Array For Loop Example: unsigned short a[]; for(j=; j
More informationThe Motorola 68HC11 Instruc5on Set
The Motorola 68HC11 Instruc5on Set Some Defini5ons A, B * accumulators A and B D * double accumulator (A + B) IX, IY * index registers X and Y SP * stack pointer M * some memory loca5on opr * an operand
More informationC SC 230 Computer Architecture and Assembly Language April 2000 Exam Sample Solutions
C SC 230 Computer Architecture and Assembly Language April 2000 Exam Sample Solutions 1. (12 marks) Circle the correct answer for each of the following: The 8-bit two's complement representation of -15
More informationMC68705P3 Bootstrap ROM
MC68705P3 Bootstrap ROM ;This is a listing of the Bootstrap ROM which resides in Motorola's MC68705P3 single chip ;micros. Its sole purpose is to program its own EPROM by copying the data from an external
More informationEE4390 Microprocessors. Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System
EE4390 Microprocessors Lessons 2, 3 68HC12 Hardware Overview, Subsystems, and memory System 1 Overview 68HC12 hardware overview Subsystems Memory System 2 68HC12 Hardware Overview "Copyright of Motorola,
More informationProgram Development. Chapter 5
Chapter 5 Program Development Expected Outcomes Distinguish between various codes in the programming language Explain the role of assembler and compiler Distinguish between different data types Use directive
More informationME 4447 / ME 6405: Introduction to Mechatronics
ME 4447 / ME 6405: Introduction to Mechatronics Interrupts and Resets Rohan Bansal Edward Chyau Anirudh Rudraraju Interrupts and Resets 1 Telephone Analogy How do we know if someone is calling? Use polling
More informationTest ROM V2 for MPU boards System 3, 4, 6, 7 and corresponding driver boards. Author: André Boot corrections in this document by coinop
Test ROM V2 for MPU boards System 3, 4, 6, 7 and corresponding driver boards Author: André Boot corrections in this document by coinop 1. INTRODUCTION... 2 2. INSTALLATION OF THE BOOT TEST ROM... 3 3.
More informationChapter 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 informationELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-470/570: Microprocessor-Based System Design Fall 2014.
c 2 =1 c 1 =1 c 0 =0 c 2 =1 c 1 =1 c 0 =0 c 4 =0 c 3 =0 c 2 =0 c 1 =0 c 0 =0 c 2 =0 c 1 =0 c 0 =1 c 2 =0 c 1 =0 c 0 =0 ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY Notes - Unit 4
More informationECE/CE 3720: Embedded System Design
Produce-Consumer Examples Slide 1 ECE/CE 3720: Embedded System Design Chris J. Myers Slide 3 Source/producer Keyboard input Program with data Sink/consumer Program that interprets Printer output Lecture
More informationHC11 Instruction Set
HC11 Instruction Set Instruction classes 1. Accumulator and Memory 2. Stack and Index Register 3. Condition Code Register 4. Program control instructions CMPE12 Summer 2009 19-2 1 Accumulator and memory
More informationECE 3120 Lab 1 Code Entry, Assembly, and Execution
ASSEMBLY PROGRAMMING WITH CODE WARRIOR The purpose of this lab is to introduce you to the layout and structure of assembly language programs and their format, as well as to the use of the Code Warrior
More informationComputer Organization and Programming
Sep 2006 Prof. Antônio Augusto Fröhlich (http://www.lisha.ufsc.br) 8 Computer Organization and Programming Prof. Dr. Antônio Augusto Fröhlich guto@lisha.ufsc.br http://www.lisha.ufsc.br/~guto Sep 2006
More informationLab 1 MC9S12 Assembler and Monitor
Lab 1 MC9S12 Assembler and Monitor Introduction and Objectives The purpose of this lab is to help you become familiar with your Dragon12-Plus Evaluation Board (EVB), and some of the software tools which
More informationExam 1 Feb. 23, 25, 27?
Exam 1 Feb. 23, 25, 27? You will be able to use all of the Motorola data manuals on the exam. No calculators will be allowed for the exam. Numbers Decimal to Hex (signed and unsigned) Hex to Decimal (signed
More informationUNIVERSITY OF MANITOBA DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING. Term Test #1 ECE 3610 MICROPROCESSING SYSTEMS
ECE 3610 Test 1 1 of 8 PRINT LAST NAME: STUDENT NUMBER PRINT FIRST NAME: UNIVERSITY OF MANITOBA DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING DATE: Feb. 2015; TIME: 6:00-8:00 P.M. Term Test #1 ECE
More informationIntroduction to CPU architecture using the M6800 microprocessor
Introduction to CPU architecture using the M6800 microprocessor Basics Programs are written in binary object codes which could be understood (after the decoding process) by the designated target CPU. The
More informationTiming Generation and Measurements
Timing Generation and Measurements Lab #7 Robert McManus & Junsang Cho April 2, 2004 Timing Generation and Measurements 1. Objective To gain experience using input capture to measure pulse width. To gain
More informationELECTRICAL ENGINEERING
Serial : 1. JP_EE_Microprocessor_130618 CLASS TEST Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: E-mail: info@madeeasy.in Ph: 011-45124612 ELECTRICAL ENGINEERING
More information0b) [2] Can you name 2 people form technical support services (stockroom)?
ECE 372 1 st Midterm ECE 372 Midterm Exam Fall 2004 In this exam only pencil/pen are allowed. Please write your name on the front page. If you unstaple the papers write your name on the loose papers also.
More informationMC68705U3 Bootstrap ROM
MC68705U3 Bootstrap ROM ;This is a listing of the Bootstrap ROM which resides in Motorola's MC68705U3 single chip ;micros. Its sole purpose is to program its own EPROM by copying the data from an external
More information