Homework 3 Aid Understanding Homework 2/3 Program
|
|
- Ethel Wiggins
- 6 years ago
- Views:
Transcription
1 Homework 3 Aid Understanding Homework 2/3 Program
2
3 Adjust this number for 1 sec. blink on your computer. $0040 will increase delay by twice long.
4
5 Delay Subroutine Timing: $ > $0010 twice faster blinking $4FFF ---> $ times faster blinking (20479) (20)
6 Blinking ---> Dimming Pulse Width Modulation
7 50% Dimming Loop BSET PORTB,% ; Turn OFF LED 4 at PORTB7 JSR delay1ms ; Wait for 1 msecond BCLR PORTB,% ; Turn ON LED 4 at PORTB7 JSR delay1ms ; Wait for 1 msecond BRA Loop ; loop forever!
8 50% Dimming Loop BSET PORTB,% ; Turn OFF LED 4 at PORTB7 JSR delay1ms ; Wait for 1 msecond BCLR PORTB,% ; Turn ON LED 4 at PORTB7 JSR delay1ms ; Wait for 1 msecond BRA Loop ; loop forever! Total blinking in 1 sec?
9 10% Dimming Loop BSET PORTB,% ; Turn OFF LED 4 at PORTB7 JSR delay1ms ; Wait for 1 msecond JSR delay1ms ; Wait for 1 msecond JSR delay1ms ; Wait for 1 msecond JSR delay1ms ; Wait for 1 msecond JSR delay1ms ; Wait for 1 msecond JSR delay1ms ; Wait for 1 msecond JSR delay1ms ; Wait for 1 msecond JSR delay1ms ; Wait for 1 msecond JSR delay1ms ; Wait for 1 msecond BCLR PORTB,% ; Turn ON LED 4 at PORTB7 JSR delay1ms ; Wait for 1 msecond BRA Loop ; loop forever! Total blinking in 1 sec?
10 6% Dimming Loop BSET PORTB,% ; Turn OFF LED 4 at PORTB7 JSR delay1ms ; Wait for 1 msecond JSR delay1ms ; Wait for 1 msecond ; X 94 JSR delay1ms ; Wait for 1 msecond BCLR PORTB,% ; Turn ON LED 4 at PORTB7 JSR delay1ms ; Wait for 1 msecond JSR delay1ms ; Wait for 1 msecond ; X 6 JSR delay1ms ; Wait for 1 msecond BRA Loop ; loop forever! Total blinking in 1 sec?
11 No Dimming, only blinking 10 times/sec Revised: 6% Dimming Loop BSET PORTB,% ; Turn OFF LED 4 at PORTB7 JSR delay10us ; Wait for 10 usecond JSR delay10us ; Wait for 10 usecond ; X 94 JSR delay10us ; Wait for 10 usecond BCLR PORTB,% ; Turn ON LED 4 at PORTB7 JSR delay10us ; Wait for 10 usecond JSR delay10us ; Wait for 10 usecond ; X 6 JSR delay10us ; Wait for 10 usecond BRA Loop ; loop forever! Total blinking in 1 sec?
12 True Dimming, 100 times/sec
13 Determine how many times the instruction SUBA in the program below is executed if NUM=200. NUM: EQU 200 DLY: LDAA #NUM : SUBA #$01 times How long will it take to run the above subroutine DLY, running on the CSM- 12C128 board with 24MHz clock? Show your work.
14 JSR DLY
15 DLY: LDAA #1 : SUBA #1
16 DLY: LDAA #2 : SUBA #1
17 DLY: LDAA #3 : SUBA #1
18 DLY: LDAA #200 1 times : SUBA #1 200 times 200 times 1 times
19 OpCode and cycle look up: Table A-2, page 395 DLY: LDAA #200 1 cyc X 1 times, $86 : SUBA #$01 1 cyc X 200 times, $80 3 cyc X 199 times, $26 1 cyc X 1 times, $26 5 cyc X 1 times, $3D
20 OpCode and cycle look up: Table A-2, page 395 DLY: LDAA #200 1 cyc X 1 times, $86 : SUBA #$01 1 cyc X 200 times, $80 3 cyc X 199 times, $26 1 cyc X 1 times, $26 5 cyc X 1 times, $3D Total cycles: (1 X 1) + (1 X 200) + (3 X 199) + (1 X 1) + (5 X 1)
21 DLY: LDAA #N 1 cyc X 1 times : SUBA #$01 1 cyc X N times 3 cyc X (N-1) times 1 cyc X 1 times 5 cyc X 1 times Total cycles: (1 X 1) + (1 X N) + (3 X (N - 1)) + (1 X 1) + (5 X 1)
22 DLY: LDAA #N 1 cyc X 1 times : SUBA #$01 1 cyc X N times 3 cyc X (N-1) times 1 cyc X 1 times 5 cyc X 1 times Total cycles: (1 X 1) + (1 X N) + (3 X (N - 1)) + (1 X 1) + (5 X 1) = 1 + N + (3N - 3) = 7 + 4N - 3 = 4 + 4N
23 DLY: LDAA #200 : SUBA #$01
24 DLY: LDAA #200 : SUBA #$01 Total Cycles = 4 + 4N = * 200 = 804 cycles
25 How long will it take to run the following subroutine? Convert cycles to Second. DLY: LDAA #200 : SUBA #$01 Total Cycles = 804 cycles
26 How long will it take to run the following subroutine? Convert cycles to Second. DLY: LDAA #200 : SUBA #$01 CSM-12C128 board with 24MHz clock: 1 cycle = 1/24,000,000 Second
27 How long will it take to run the following subroutine? Convert cycles to Second. DLY: LDAA #200 : SUBA #$01 CSM-12C128 board with 24MHz clock: 1 cycle = 1/24,000,000 Second 804 cycles => 804/24,000,000 Second
28 How long will it take to run the following subroutine? Convert cycles to Second. DLY: LDAA #200 : SUBA #$01 CSM-12C128 board with 24MHz clock: 1 cycle = 1/24,000,000 Second 804 cycles => 804/24,000,000 Second = 33.5 usec.
29 Find N to create 10uSec delay: DLY: LDAA #N : SUBA #$01
30 Find N to create 10uSec delay: DLY: LDAA #N : SUBA #$01 1 cycle = 1/24,000,000 Second
31 Find N to create 10uSec delay: DLY: LDAA #N : SUBA #$01 1 cycle = 1/24,000,000 Second? cycles X 1/24,000,000 Second = 10.0 usec.
32 Find N to create 10uSec delay: DLY: LDAA #N : SUBA #$01 1 cycle = 1/24,000,000 Second 240 cycles X 1/24,000,000 Second = 10.0 usec.
33 Find N to create 10uSec delay: DLY: LDAA #N : SUBA #$01 1 cycle = 1/24,000,000 Second 240 cycles X 1/24,000,000 Second = 10.0 usec. Total Cycles = 4 + 4N
34 Find N to create 10uSec delay: DLY: LDAA #N : SUBA #$01 1 cycle = 1/24,000,000 Second 240 cycles X 1/24,000,000 Second = 10.0 usec. 240 = 4 + 4N
35 Find N to create 10uSec delay: DLY: LDAA #N : SUBA #$01 1 cycle = 1/24,000,000 Second 240 cycles X 1/24,000,000 Second = 10.0 usec = 4N
36 Find N to create 10uSec delay: DLY: LDAA #N : SUBA #$01 1 cycle = 1/24,000,000 Second 240 cycles X 1/24,000,000 Second = 10.0 usec. 236 = 4N
37 Find N to create 10uSec delay: DLY: LDAA #N : SUBA #$01 1 cycle = 1/24,000,000 Second 240 cycles X 1/24,000,000 Second = 10.0 usec. 59 = N
38 Find N to create 10uSec delay: DLY: LDAA #59 : SUBA #$01
39 Find N to create 10uSec delay: DLY: LDAA #$3B : SUBA #$01
40 Find N to create 10uSec delay: DLY: PSHA LDAA #N : SUBA #$01 PULA
CMPEN 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 informationECE 367 -Experiment #1 Fall 2012
Due at the beginning of lab during week 3 (9/1/2012) Introduction ECE 367 -Experiment #1 Fall 2012 The goal of this experiment is the acquaint you with the Technological Arts nanocore12 microcontroller
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 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 informationUniversity of Florida EEL 4744 Fall 1998 Dr. Eric M. Schwartz
Department of Electrical & Computer Engineering 15 October 199 Professor in ECE 31-Dec-9 12:22 PM Page 1/ Instructions: Show all work on the front of the test papers. If you need more room, make a clearly
More informationCET335 Microprocessor Interfacing Lab 5: LCD Interface (Bus Attached Peripheral)
CET335 Microprocessor Interfacing Lab 5: LCD Interface (Bus Attached Peripheral) Introduction: In this lab, you will learn the interface and operation of a bus-attached peripheral; in other words, a controller
More information; export symbols ; export 'Entry' symbol. ; include derivative specific macros PORTA EQU $0000 PORTB EQU $0001 DDRA EQU $0002 DDRB EQU $0003
******************************************************* * This program for CSE472, Flash Memory Writing * * By Kyusun Choi, ID=0000 * * Date: 11/14/2009 * * Freescale CodeWarrior, for the MC9S12C32 Program
More informationExam 2 E2-1 Fall Name: Exam 2
Exam 2 E2-1 Fall 2004 1. Short Answer [20 pts] Exam 2 a. [4 points] Show the contents of registers A, B, SP, and X after the following code executes: lds #$a00 ldab #$23 A = ldaa #$87 ldx #$2543 B = pshd
More informationIntroduction to Programming the 9S12 in C Huang Sections 5.2 and 5.3
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 informationEEL 4744C: Microprocessor Applications. Lecture 7. Part 2. M68HC12 Interrupt. Dr. Tao Li 1
EEL 4744C: Microprocessor Applications Lecture 7 Part 2 M68HC12 Interrupt Dr. Tao Li 1 Reading Assignment Software and Hardware Engineering (New version): Chapter 12 or SHE (old version) Chapter 8 And
More informationAN1745. Interfacing the HC705C8A to an LCD Module By Mark Glenewinkel Consumer Systems Group Austin, Texas. Introduction
Order this document by /D Interfacing the HC705C8A to an LCD Module By Mark Glenewinkel Consumer Systems Group Austin, Texas Introduction More and more applications are requiring liquid crystal displays
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 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 informationLecture 20: Interrupt Devices
Lecture 20: Interrupt Devices Today s Goals Use an edged-triggered interrupt capable device to cause interrupts. Use a time-based interrupt capable device to cause periodic interrupts. Edge-triggered Device
More informationHC12 Built-In Hardware
HC12 Built-In Hardware The HC12 has a number of useful pieces of hardware built into the chip. Different versions of the HC12 have slightly different pieces of hardware. We are using the MC68HC912B32 chip
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 informationLAB 7: INTERRUPT-DRIVEN CLOCK
LAB 7: INTERRUPT-DRIVEN CLOCK GROUP #: NAME: PARTNER: Lab 7 Page 1 LAB 7: INTERRUPT-DRIVEN CLOCK GOALS Understand interrupts Know how to use interrupts to monitor inputs and generate outputs Know how to
More informationEE 308 Spring A software delay. To enter a software delay, put in a nested loop, just like in assembly.
More on Programming the 9S12 in C Huang Sections 5.2 through 5.4 Introduction to the MC9S12 Hardware Subsystems Huang Sections 8.2-8.6 ECT_16B8C Block User Guide A summary of MC9S12 hardware subsystems
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 informationTable 1: Mnemonics Operations Dictionary. Add Accumulators Add B to Y. Add with carry to B. Add Memory to B. Add 16-bit to D And B with Memory
Table 1: Mnemonics s Dictionary ABA ABX ABY ADCA ADCB ADDA ADDB ADDD ANDA ANDB ASL ASLA ASLB ASLD ASR ASRA ASRB BCC BCLR BCS BEQ BGE BGT BHI BHS BITA BITB BLE BLO BLS BLT Add Accumulators Add B to X Add
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 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 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 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 informationECE3120: Computer Systems Chapter 7: Interfacing I/O Devices Lab-Class
ECE32: Computer Systems Chapter 7: Interfacing I/O Devices Lab-Class Manjeera Jeedigunta http://blogscaetntechedu/msjeedigun2 Email: msjeedigun2@tntechedu Tel: 93-372-68, Prescott Hall 2 Today Interfacing
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 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 informationExam 2 E2-1 Fall Name: Exam 2
Exam 2 E2-1 Fall 2002 1. Short Answer [10 pts] Exam 2 a.[2 pts] Briefly describe what each of the following instructions do so that it is clear what the differences between them are: STAA -2,X STAA 2,-X
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 information; export symbols XDEF Entry ; export 'Entry' symbol ABSENTRY Entry ; for assembly entry point
**************************************************************** * This program for CMPEN 472, Flash Memory Writing * * By Kyusun Choi, ID=0000 * * Date: 11/15/2017 * * Freescale CodeWarrior, for the HCS12C128
More informationReading Assignment. 68HC12 Instruction Set. M68HC12 Instruction Set Categories. Some Tips. Endianness (Byte Order) Load and Store Instructions
Reading Assignment EEL 4744C: Microprocessor Applications Lecture 5 68HC12 Instruction Set Software and Hardware Engineering (Old version) Chapter 4 Or Software and Hardware Engineering (New version) Chapter
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 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 informationECE/CE 3720: Embedded System Design
Basic Components of Input Capture Slide 1 ECE/CE 3720: Embedded System Design Chris J. Myers Lecture 12: Input Capture Slide 3 Basic Principles of Input Capture Basic Principles of Input Capture (cont)
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 informationIntroduction to Embedded Microcomputer Systems Lecture 10.1
Introduction to Embedded Microcomputer Systems Lecture 10.1 Recap Switch, LED interface Real board debugging if-then statements Overview Successive refinement Modular programming Subroutines, parameter
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 informationMC68HC12 Parallel I/O
EEL 4744C: Microprocessor Applications Lecture 6 Part 2 MC68HC12 Parallel I/O Dr. Tao Li 1 Software and Hardware Engineering (new version): Chapter 11 Or SHE (old version): Chapter 7 And Reading Assignment
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 informationLab 7: Asynchronous Serial I/O
CpE 390 Microprocessor Systems Lab 7: Asynchronous Serial I/O 1. Introduction Serial communications is the transfer of data, one bit at a time, over a communications channel. Serial communications can
More informationCapstone Design Course. Lecture-2: The Timer
Capstone Design Course Lecture-2: The Timer By Syed Masud Mahmud, Ph.D. Copyright 2002 by Syed Masud Mahmud 1 The Timer The 68HC11 has a 16-Bit Free Running Timer. The count value of the timer is available
More informationLab 2 Part 3 Assembly Language Programming and 9S12 Ports
Lab 2 Part 3 Assembly Language Programming and 9S12 Ports Introduction and Objectives In this week s lab you will write an assembly language program to display various patterns on the eight individual
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 informationAN1742. Programming the 68HC705J1A In-Circuit By Chris Falk CSG Product Engineering Austin, Texas. Introduction. Overview
Order this document by /D Programming the 68HC705J1A In-Circuit By Chris Falk CSG Product Engineering Austin, Texas Introduction Overview This application note describes how a user can program the 68HC705J1A
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 informationSEVEN SEGMENT DISPLAY LAB EXPERIMENT
SEVEN SEGMENT DISPLAY LAB EXPERIMENT Class Instructor / Professor xiom anufacturing 1999 2813 Industrial Ln. Garland, TX 75041 (972) 926-9303 FAX (972) 926-6063 support@axman.com Rev 1.01 web: http://www.axman.com
More informationLecture 10 I/O and Interrupts
CPE 390: Microprocessor Systems Spring 2018 Lecture 10 I/O and Interrupts Bryan Ackland Department of Electrical and Computer Engineering Stevens Institute of Technology Hoboken, NJ 07030 Adapted from
More information68HC11 Opera,ng Modes
68HC11 Opera,ng Modes Modes Single- Chip Expanded Mul,plexed Special Bootstrap Special Test Minimal Circuit Layout: Single Chip Timing Diagrams Timing Laboratory 2 Debrief Exercise 1: Serial TX Generally
More informationChapter 4: Advanced Assembly Programming. EE383: Introduction to Embedded Systems University of Kentucky. Samir Rawashdeh
Chapter 4: Advanced Assembly Programming EE383: Introduction to Embedded Systems University of Kentucky Samir Rawashdeh With slides based on material by H Huang Delmar Cengage Learning Chapter Summery
More informationIt 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 informationFreescale Semiconductor, Inc.
Order this document by /D Software I 2 C Communications By Brad Bierschenk MMD Applications Engineering Austin, Texas Introduction I 2 C Overview The I 2 C (inter-integrated circuit) protocol is a 2-wire
More informationIntroduction to the MC9S12 Hardware Subsystems
Setting and clearing bits in C Using pointers in C o Program to count the number of negative numbers in an area of memory Introduction to the MC9S12 Hardware Subsystems o The MC9S12 timer subsystem Operators
More informationFreescale Semiconductor, I
nc. Application ote 03/2004 Low Frequency EEPROM Emulation on the MC68HLC908Q4 By Alan Devine 8/16-Bit Division East Kilbride, Scotland Introduction To avoid the cost of using external EEPROM devices,
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 informationWhat Happens When You Reset the MC9S12?
What Happens When You Reset the MC9S12? What happens to the MC9S12 when you turn on power or push the reset button? How does the MC9S12 know which instruction to execute first? On reset the MC9S12 loads
More informationImmediate vs. Extended mode: Immediate values are marked with a # symbol. They also are different instructions when assembled.
So, you basically didn t study and now you re in the final and you hope to pass this test and save your miserable grade... And you expect this cheat sheet to save you? Well, I sincerely hope it does. Slacker.
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 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 informationOutline. 2.8 Stack. 2.9 Subroutines
Outline 21 Assembly language program structure 22 Data transfer instructions 23 Arithmetic instructions 24 Branch and loop instructions 25 Shift and rotate instructions 26 Boolean logic instructions 27
More informationEE 308 Spring A software delay
A software delay To enter a software delay, put in a nested loop, just like in assembly. Write a function delay(num) which will delay for num milliseconds void delay(unsigned int num) volatile unsigned
More information68000 Instruction Set (2) 9/20/6 Lecture 3 - Instruction Set - Al 1
68000 Instruction Set (2) 9/20/6 Lecture 3 - Instruction Set - Al 1 Lecture Overview The 68000 Instruction Set continued The understand and effectively use an architecture must understand the register
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 informationRoberto Muscedere Images and Text Portions 2003 Prentice Hall 1
Microcomputer Structure and Operation Chapter 5 A Microprocessor ( P) contains the controller, ALU and internal registers A Microcomputer ( C) contains a microprocessor, memory (RAM, ROM, etc), input and
More informationAddressing Mode Description Addressing Mode Source Format Abbrev. Description
Addressing Mode Description Addressing Mode Source Format Abbrev. Description Inherent INST (no operands) INH Operands (if any) are in CPU registers Immediate INST #opr8i or INST #opr16i IMM Operand is
More informationECE 372 Microcontroller Design Basic Assembly Programming. ECE 372 Microcontroller Design Basic Assembly Programming
For Loop Example: for(j=0; j
More informationPIC PROGRAMMING START. The next stage is always the setting up of the PORTS, the symbol used to indicate this and all Processes is a Rectangle.
PIC PROGRAMMING You have been introduced to PIC chips and the assembly language used to program them in the past number of lectures. The following is a revision of the ideas and concepts covered to date.
More informationUNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING. Principles of Computer Operation
UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING Experiment PCO: Principles of Computer Operation Location: Part I Lab., CYC 102. Objective: The objective is to learn the basic
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 information1. Memory Mapped Systems 2. Adding Unsigned Numbers
1 Memory Mapped Systems 2 Adding Unsigned Numbers 1 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 Our system uses
More informationINTRODUCTION HARDWARE INTERFACE
Order this document by AN1241 Interfacing the MC68HC705J1A to 9356/9366 EEPROMs By Mark Glenewinkel CSIC Applications INTRODUCTION This application note describes the hardware and software interface used
More informationPage 1 of 7. Samtron/Samsung 20S204DA2
Page 1 of 7 Samtron/Samsung 20S204DA2 Disclaimer This documentation based on try & error and should never be treated as official documentation. There is no guarantee that information listed in this document
More informationAN1286. MC68HC05C0 Bus Structure Design. Introduction
Order this document by /D MC68HC05C0 Bus Structure Design By David Yoder and Mark Thompson CSIC Applications Austin, Texas Introduction This application note explains the basics of designing a system with
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 informationProfessor E. Ambikairajah UNSW Sydney
ELEC2117 Chapter 3a: PIC16F886 Instruction set Professor Eliathamby Ambikairajah Head of School of Electrical Engineering and Telecommunications, UNSW, Sydney 06 March 2017 Prof E Ambikairajah Instruction
More informationPOTENTIOMETER. Revision Class. Instructor / Professor LICENSE
CME-11E9 EVBU LAB EXPERIMENT POTENTIOMETER Revision 03.11.13 Class Instructor / Professor LICENSE You may use, copy, modify and distribute this document freely as long as you include this license and the
More informationFri. Aug 25 Announcements
Fri. Aug 25 Announcements HW 1 / Lab 1 next week Tools and fundamentals of instructions Remember no in-lab quiz but HWs still marked Slides online Complete class for last year This year s slides available
More informationChapter 2 HCS12 Assembly Language
Chapter 2 HCS12 Assembly Language ECE 3120 Dr. Mohamed Mahmoud http://iweb.tntech.edu/mmahmoud/ mmahmoud@tntech.edu Outline 2.1 Assembly language program structure 2.2 Data transfer instructions 2.3 Arithmetic
More informationR1, R2, R3 3 R4, R5, R6 3. Maxim Integrated Products 1
19-2163; Rev 0; 9/01 MAX7428 Evaluation Kit General Description The MAX7428 evaluation kit (EV kit) is an assembled and tested circuit board that demonstrates the MAX7428 standard-definition video reconstruction
More informationSECTION 6 CENTRAL PROCESSING UNIT
SECTION 6 CENTRAL PROCESSING UNIT This section discusses the M68HC11 central processing unit (CPU), which is responsible for executing all software instructions in their programmed sequence. The M68HC11
More informationUNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING
UNIVERSITY OF HONG KONG DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING Experiment PCO: Principles of Computer Operation Location: Part I Lab., CYC 102. Objective: The objective is to learn the basic
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 informationEE 3170 Microcontroller Applications
EE 3170 Microcontroller Applications Lecture 12: Advanced Assembly Language Programming Part II- Stacks Calling Conventions & Base Pointer Usage & Subroutine Examples - Miller 5.5-5.7 Based on slides for
More informationHow to use CodeWarrior ASM with Adapt9S12 and Serial Monitor.doc
How to use CodeWarrior ASM with Adapt9S12 and Serial Monitor.doc This document assumes that CW is already been installed. It further assumes that the user has all the necessary hardware and just need assistance
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 informationINTERFACING THE ADS7870 AND THE MC68HC11E9 ANALOG TO MICROCOMPUTER MADE EASY
INTERFACING THE ADS787 AND THE MC68HC11E9 ANALOG TO MICROCOMPUTER MADE EASY By Ed Rojas INTRODUCTION Assembly of a data-acquisition system with its many parts (multiplexed, amplifiers, ADC, voltage reference,
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 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 3120: Computer Systems Chapter 8: ECE-3120-A Musical
ECE 3120: Computer Systems Chapter 8: ECE-3120-A Musical Manjeera Jeedigunta http://blogs.cae.tntech.edu/msjeedigun21 Email: msjeedigun21@tntech.edu Tel: 931-372-6181, Prescott Hall 120 Output Compare
More informationDEV-1 HamStack Development Board
Sierra Radio Systems DEV-1 HamStack Development Board Reference Manual Version 1.0 Contents Introduction Hardware Compiler overview Program structure Code examples Sample projects For more information,
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 informationModule 1-G. Marcos and Structured Programming
Module 1-G Marcos and Structured Programming 1 Learning Outcome #1 An ability to program a microcontroller to perform various tasks How? A. Architecture and Programming Model B. Instruction Set Overview
More informationFOX11 68HC11 Trainer Board
FOX11 68HC11 Trainer Board Getting Started Manual Version 1.58 for Rev. F board Table of Contents GETTING STARTED with BUFFALO Monitor.... 2 GETTING STARTED with Wytec Phantom Monitor and WBUG11.... 6
More informationAn ASIP Design Methodology for Embedded Systems
An ASIP Design Methodology for Embedded Systems Abstract A well-known challenge during processor design is to obtain the best possible results for a typical target application domain that is generally
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 informationAN1064. Motorola Semiconductor Application Note. Use of Stack Simplifies M68HC11 Programming By Gordon Doughman. Introduction
Order this document by /D Motorola Semiconductor Application Note Use of Stack Simplifies M68HC11 Programming By Gordon Doughman Introduction The architectural extensions of the M6800 incorporated into
More informationIntroduction to Microcontroller. Systems. Embedded system. Assembler or C? Datatypes 2. Datatypes 1
Introduction to Microcontroller Sven Knutsson 031-772 57 27 svenk@chl.chalmers.se www.chl.chalmers.se/~svenk/it_university 1 2 Embedded system Assembler or C? Real time Size Price Power consumption User
More informationIntroduction. ECE/CS 5780/6780: Embedded System Design. Golden Rule of Software Development. Software Maintenance. Assembly Language Style Issues
Introduction ECE/CS 5780/6780: Embedded System Design Chris J. Myers Lecture 4: Software Design Success of an embedded system project depends on both hardware and software. Real-time embedded systems are
More informationAdministrivia. ECE/CS 5780/6780: Embedded System Design. Assembly Language Syntax. Assembly Language Development Process
Administrivia ECE/CS 5780/6780: Embedded System Design Scott R. Little Lecture 3: Assembly Language Programming 2 versions of CodeWarrior are on the lab machines. You should use the 4.5 version (CW for
More informationAssembly Language Development Process. ECE/CS 5780/6780: Embedded System Design. Assembly Language Listing. Assembly Language Syntax
Assembly Language Development Process ECE/CS 5780/6780: Embedded System Design Chris J. Myers Lecture 3: Assembly Language Programming Chris J. Myers (Lecture 3: Assembly Language) ECE/CS 5780/6780: Embedded
More informationECE/CS 5780/6780: Embedded System Design
ECE/CS 5780/6780: Embedded System Design Scott R. Little Lecture 3: Assembly Language Programming Scott R. Little (Lecture 3: Assembly) ECE/CS 5780/6780 1 / 59 Administrivia 2 versions of CodeWarrior are
More information