Chapter 4: Advanced Assembly Programming. EE383: Introduction to Embedded Systems University of Kentucky. Samir Rawashdeh

Size: px
Start display at page:

Download "Chapter 4: Advanced Assembly Programming. EE383: Introduction to Embedded Systems University of Kentucky. Samir Rawashdeh"

Transcription

1 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

2 Chapter Summery The same sequence of instructions often need to be executed in several places of the program The subroutine mechanism enables the programmer to group the common instruction sequence into a subroutine A subroutine can be called from many places The processor saves the return address in the stack during a subroutine call The subroutine restores the return address from the stack before it returns to the caller The subroutine can receive parameters from the caller to perform operations and may return result to the caller

3 The HCS2 CPU Registers 7 A 7 B 5 D 8-bit accumulator A and B or 6-bit double accumulator D 5 X Index register X Stack Pointer 5 Y 5 SP Index register Y Stack pointer 5 PC Program counter S X H I N Z V C Condition code register Carry Overflow Zero Negative I Interrupt mask Half-Carry (from bit 3) X Interrupt Mask Stop Disable Figure HCS2 CPU registers 3

4 The Stack Low address Top element SP High address Bottom element Figure 4 Diagram of the HCS2 stack

5 HCS2 Support for the Stack Data Structure - A 6-bit stack pointer (SP) - Instructions and addressing mode Table 4 HCS2 push and pull instructions and their equivalent load and store instructions Mnemonic pshb pshc pshd pshx pshy pulb pulc puld pulx puly Function push A into the stack push B into the stack push CCR into the stack push D into stack push X into the stack push Y into the stack pull A from the stack pull B from the stack pull CCR from the stack pull D from the stack pull X from the stack pull Y from the stack Equivalent instruction staa, -SP stab, -SP none std 2, -SP stx 2, -SP sty 2, -SP ldaa, SP+ ldab, SP+ none ldd 2, SP+ ldx 2, SP+ ldy 2, SP+

6 Example 4 Derive the stack contents after the execution of the following instruction Sequence: lds #$5 ldaa #$2 ldab #4 pshb ldx # pshx Solution: $28 $2 SP (= $4FC) Figure 42 The contents of the HCS 2 stack

7 What is a Subroutine? A sequence of instructions that can be called from many places of the program The program flow during a subroutine call is shown in Figure 43 Saving and restoring return address is the key for the subroutine mechanism to work caller subroutine _x <call> subroutine _x Figure 43 Program flow during a subroutine call <return >

8 Instructions that Support Subroutine Call bsr <sub>: branch subroutine <sub> is specified in relative addressing mode and is in the range of -28 to +27 bytes from the instruction immediately after the bsr <sub> instruction The return address is pushed into the stack jsr <sub>: jump subroutine <sub> is specified in direct, extended, indexed, and indexed indirect mode The subroutine being called can be within the range of 64 kb The return address is pushed into the stack call <sub>: call subroutine The <sub> field specifies the page number and the address of the subroutine within the page to be called The page number is to be loaded into the PPAGE register rts: return from subroutine restrieve the return address from the stack and return to the caller rtc: return from call This instruction retrieve the page number and the return address from the stack

9 Issues related to Subroutine Calls Parameter Passing Use CPU registers Use stack Use global memory 2 Result Returning Use CPU registers Use stack Use global memory 3 Local Variable Allocation Allocated in the stack Use the instruction leas -n,sp to allocate n bytes of space in stack Use the instruction leas n, SP to deallocate n bytes from stack

10 Saving CPU Registers in Stack The subroutine may use some CPU registers that were used by its caller The subroutine must save these registers in order to make sure the caller program can obtain correct result The subroutine must restore the saved registers before returning to the caller The order of register restoration must be reversed to that to which registers are saved if the saving order is pshx pshy pshd then the restoring order is puld puly pulx

11

12 Stack Frame - The region in the stack that holds incoming parameters, the subroutine return address, local variables, and saved registers is referred to as stack frame - The stack frame is also called activation record Local variables SP Saved registers Return address Incoming parameters Figure 49 Structure of the 68HC2 stack frame

13 Using the D-Bug2 Functions to Perform I/O Operations Table 42 D-Bug2 monitor (version 4xx) routines Subroutine far main ( ) getchar ( ) putchar ( ) printf ( ) far GetCmdLine ( ) far sscanhex ( ) isxdigit ( ) toupper ( ) isalpha ( ) strlen ( ) strcpy ( ) far out 2hex ( ) far out 4hex ( ) SetUserVector ( ) far WriteEEByte ( ) far EraseEE ( ) far ReadMem ( ) far WriteMem ( ) Function Start of D -Bug2 Get a character from SCI or SCI Send a character out to SCI or SCI Formatted string output -translates binary values to string Get a line of input from the user Convert ASCII hex string to a binary integer Check if a character (in B) is a hex digit Convert lowercase characters to uppercase Check if a character is alphabetic Returns the length of a NULL -terminated string Copy a NULL-terminated string Output 8-bit number as two ASCII hex characters Output a 6-bit number as four ASCII hex characters Set up a vector to a user 's interrupt service routine Write a byte to the on -chip EEPROM memory Bulk erase the on -chip EEPROM memory Read data from the HCS 2 memory map Write data to the HCS 2 memory map pointer address $EE8 $EE84 $EE86 $EE88 $EE8A $EE8E $EE92 $EE94 $EE96 $EE98 $EE9A $EE9C $EEA $EEA4 $EEA6 $EEAA $EEAE $EEB2

14 Subroutines for Creating Time Delays Example 4 Write a subroutine that can create a time delay of ms Solution: Delayms pshx ldx #6 ; 2 E cycles iloop ; 2 E cycles ; 2 E cycles ; 2 E cycles ; 2 E cycles ; 2 E cycles ; 2 E cycles ; 2 E cycles nop ; E cycle nop ; E cycle dbne x,iloop pulx rts

15 The previous subroutine can be modified to create a time delay that is a multiple of ms as follows (the multiple is passed in Y): delaybyms pshx eloop3 ldx #6 ; 2 E cycles iloop3 ; 2 E cycles ; 2 E cycles ; 2 E cycles ; 2 E cycles ; 2 E cycles ; 2 E cycles ; 2 E cycles nop ; E cycle nop ; E cycle dbne x,iloop3 dbne y,eloop3 pulx rts

16 Introduction to Parallel I/O Port and Simple I/O Devices A HCS2 device may have from 48 to 44 pins arranged in 3 to 2 I/O Ports An I/O port consists of a set of I/O pins and the registers required to control its operation An I/O pin can be configured for input or output An I/O pin usually serves multiple functions When it is not used as a peripheral function, it can be used as a general-purpose I/O pin Addressing the I/O Port Data Register When inputting or outputting data from or to an I/O port, the user read from or write to the port data register Each I/O port register is assigned to an address in the HCS2 memory space For example, Port A data register is assigned to address, the next instruction output $35 to Port A: movb #$35, ; address is Port A data register A name is also assigned to each register so that we can access a register by referring to its name: PTA equ movb #$35,PTA ; output $35 to Port A The name and address association is established by including the HCS2inc file to your program using the #include c:\\hcs2inc statement

17 Configuring I/O Pin Direction Each I/O port has a data direction register DDRx (x is the port name) that configures the direction of each pin By setting a bit of the DDRx register to, the corresponding I/O pin is configured for output By setting a bit of the DDRx register to, the corresponding I/O pin is configured for input Input and Output Operations movb #$FF,DDRB ; configure Port B for output staa PTB ; output the contents of A to port B movb #$67,PTB ; output the value $67 to Port B movb movb #,DDRC ; configure Port C for input PTC,ibuf ; read the contents of Port C and save it at the memory ; location represented by ibuf

18 The HCS2 I/O ports and Pin Names Table 45 Number of pins available in each paralle port Port Name No of Pins Pin Name A B E H J K M P S T PAD, PAD L U V W PA7~PA PB7~PB PE7~PE PH7~PH PJ7~PJ PK4~PK PM7~PM PP7~PP PS3~PS PT7~PT PAD 5~PAD PL7~PL PU7~PU PV7~PV PW 7~PW

19 Interfacing with LEDs An LED has an anode and cathode terminal The anode terminal must at a voltage at least 6 V above that of the cathode terminal (forward biased) in order for the LED to be lighted The forward current required to light an LED is from a few to more than ma The I/O pin can drive an LED using one of the circuits shown in Figure 45 The resistors R, R2, are R3 are called current-limiting resistors VCC VCC Port pin R (a) Positive direct drive Port pin R2 (b) Inverse direct drive Port pin 74HC4 (c) Buffered drive R3 Figure 45 An LED connected to a CMOS inverter through a current -limiting resistor

20 Interfacing with Seven-Segment Displays Seven-segment displays are mainly used to display decimal digits and a small set of letters The HCS2 I/O port can drive a seven-segment display directly Buffer chips are used mainly to save excessive current draw from the HCS2 A example circuit for interfacing with seven-segment display is shown in Figure 47 Some people may use PB to PB6 to drive segment a to g instead The microcontroller must send an appropriate value to the output in order to display a certain value HCS2 PB6 PB5 PB4 PB3 PB2 PB PB 74HC each a b c f a g b d e e c f d g com m on cathode Figure 47 D riving a single seven -segm ent display

21 Table 47 Decimal to seven-segment decoder Decim al digit Segm ents a b c d e f g Corresponding Hex Number Figure 47 circuit $7E $3 $6D $79 $33 $5B $5F $7 $7F $7B Dragon2 demo board $3F $6 $5B $4F $66 $6D $7D $7 $7F $67 Displaying Multiple Seven-Segment Displays A time-multiplexing technique is often used to display multiple digits The circuit in Figure 48 can display up to six digits simultaneous using the timemultiplexing technique The HCS2 lights one digit for a short period of time and then switches to the next digit Within one second, each digit is lighted in turn many times Due to the persistence of vision, all six digits appear to be lighted at the same time

22 8 a b 8 g # a b g # a b g #5 PB 74HC244 PB PB6 74HC367 common cathode common cathode common cathode PP A Y PP A Y HCS2 PP2 PP3 PP4 A2 A3 A4 Y2 Y3 Y4 PP5 A5 Y5 Figure 48 Port B and Port P together drive six seven -segment displays (MC9S2DG256) To display 7 on the display #5 movb #$FF,DDRB ; configure Port B for output movb #$3F,DDRP ; configure Port P for output movb #$F,PTP ; enable display #5 to be lighted movb #$7,PTB ; send out the segment pattern of 7

23 Example 45 Write a program to generate a -khz periodic square wave from the PT5 pin Solution: #include "c:\miniide\hcs2inc" org $5 start lds #$5 bset DDRT,BIT5 ; configure PT5 pin for output forever bset PTT,BIT5 ; pull PT5 pin to high ldy # ; wait for 5 ms jsr delayby5us ; bclr PTT,BIT5 ; pull PT5 pin to low ldy # ; wait for 5 ms jsr delayby5us ; bra forever #include "c:\miniide\delayasm" ; org $FFFE ; dcw start end

24 Example 46 Write a program to generate a two-tone siren that alternates between 25 Hz and 5 Hz with each tone lasting for half of a second #include "c:\miniide\hcs2inc" org $5 start lds #$5 bset DDRT,BIT5 ; configure PT5 pin for output forever ldx #25 ; repeat 5 Hz waveform 25 times tone bset PTT,BIT5 ; pull PT5 pin to high ldy # jsr delaybyms bclr PTT,BIT5 ldy # jsr delaybyms dbne x,tone ldx #25 ; repeat 25 Hz waveform for 25 times tone2 bset PTT,BIT5 ldy #2 jsr delaybyms bclr PTT,BIT5 ldy #2 jsr delaybyms dbne x,tone2 bra forever #include "c:\miniide\delayasm" end

25 Interfacing with DIP Switches A dual-in-line package can be connected any port with 8 pins A set of pull-up resistors are needed to pull the voltage to high on one side of the DIP V CC SW DIP-8 K PA PA PA2 PA3 PA4 PA5 PA6 PA7 HCS2 Figure 49 Connecting a set of eight DIP switches to Port A of the HCS 2 To read data into accumulator A movb #,DDRA ; configure port A for input ldaa PTA ; read into accumulator A

26 Tips for Program Debugging Involving Subroutine Calls What to do when the program gets stuck? Step Find out which subroutine gets stuck by setting a breakpoint immediately after the jsr or bsr instruction Step 2 Find out why the subroutine gets stuck - Forgetting to restore registers pushed onto the stack before return - Forgetting to deallocate local variables before return - There are some infinite loops in the subroutine - Calling other subroutines that do not return

Sample Problem Set #1

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

Lecture 9 Subroutines

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

Using the stack and the stack pointer

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

Programming the Motorola MC68HC11 Microcontroller

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

Outline. 2.8 Stack. 2.9 Subroutines

Outline. 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 information

Chapter 4: Advanced Assembly Programming. The HCS12 Microcontroller. Han-Way Huang Minnesota State University, Mankato.

Chapter 4: Advanced Assembly Programming. The HCS12 Microcontroller. Han-Way Huang Minnesota State University, Mankato. Chapter 4: Advanced Assembly Programming The HCS2 Microcontroller Han-Way Huang Minnesota State University, Mankato September 2009 H. Huang Transparency No.4- Chapter Summery The same sequence of instructions

More information

Exam 1 Feb. 23, 25, 27?

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

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

CMPEN 472 Sample EXAM II

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 information

CHAPTER 8. Solutions for Exercises

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

EE319K Final Fall 2005 Solution C. (3) Question 1. (3) Question 2. short function(const short in){ return in+5; } const

EE319K Final Fall 2005 Solution C. (3) Question 1. (3) Question 2. short function(const short in){ return in+5; } const EE319K Final Fall 2005 Solution C. Jonathan Valvano (3) Question 1. Consider a matrix with 4 rows and 6 columns, stored in column-major zero-index format. Each element is 16 bits. Which equation correctly

More information

Exam 2 E2-1 Fall Name: Exam 2

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

Exam I Review February 2017

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

ECE3120: Computer Systems Chapter 7: Interfacing I/O Devices Lab-Class

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

HC12 Microprocessor. D-Bug12 Functions: Stepping Through Programs & Performing I/O. Dr. Bradley J. Bazuin

HC12 Microprocessor. D-Bug12 Functions: Stepping Through Programs & Performing I/O. Dr. Bradley J. Bazuin ECE 2510/4510/5530 HC12 Microprocessor D-Bug12 Functions: Stepping Through Programs & Performing I/O Dr. Bradley J. Bazuin Associate Professor Department of Electrical and Computer Engineering College

More information

ECE 3120: Computer Systems Chapter 8: ECE-3120-A Musical

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

538 Lecture Notes Week 5

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

538 Lecture Notes Week 5

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

Lecture #4 Microcontroller Instruction Set Embedded System Engineering Philip Koopman Monday, 25-Jan-2016

Lecture #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 information

Lecture 10 I/O and Interrupts

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

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

Chapter 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 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 ; export 'Entry' symbol. ; include derivative specific macros PORTA EQU $0000 PORTB EQU $0001 DDRA EQU $0002 DDRB EQU $0003

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

538 Lecture Notes Week 3

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

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

m 1 se 7 m 23 Introduction to Embedded Microcomputer Systems Lecture 16.1 Recap Finite State Machines Pointer implementation

m 1 se 7 m 23 Introduction to Embedded Microcomputer Systems Lecture 16.1 Recap Finite State Machines Pointer implementation Introduction to Embedded Microcomputer Systems Lecture 16.1 Recap Finite State Machines Pointer implementation Overview Fixed-point: why, when, how Local variables: scope and allocation How these concepts

More information

COSC345 Software Engineering. Basic Computer Architecture and The Stack

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

Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers

Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers o How to disassemble an MC9S12 instruction sequence o Binary numbers are a code and represent what the programmer intends for the

More information

Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers

Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers Disassembly of MC9S12 op codes Decimal, Hexadecimal and Binary Numbers o How to disassemble an MC9S12 instruction sequence o Binary numbers are a code and represent what the programmer intends for the

More information

MC9S12 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. 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 information

Microcontrollers. Microcontroller

Microcontrollers. Microcontroller Microcontrollers Microcontroller A microprocessor on a single integrated circuit intended to operate as an embedded system. As well as a CPU, a microcontroller typically includes small amounts of RAM and

More information

ME 4447/6405. Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics. Instructor: Professor Charles Ume LECTURE 6

ME 4447/6405. Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics. Instructor: Professor Charles Ume LECTURE 6 ME 4447/6405 Microprocessor Control of Manufacturing Systems and Introduction to Mechatronics Instructor: Professor Charles Ume LECTURE 6 MC9S12C Microcontroller Covered in Lecture 5: Quick Introduction

More information

2. Arithmetic Instructions addition, subtraction, multiplication, divison (HCS12 Core Users Guide, Sections 4.3.4, and ).

2. Arithmetic Instructions addition, subtraction, multiplication, divison (HCS12 Core Users Guide, Sections 4.3.4, and ). AS12 Assembler Directives A Summary of 9S12 instructions Disassembly of 9S12 op codes Huang Section 1.8, Chapter 2 MC9S12 V1.5 Core User Guide Version 1.2, Section 12 o A labels is a name assigned the

More information

ECE331 Handout 3- ASM Instructions, Address Modes and Directives

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

Exam 2 E2-1 Fall Name: Exam 2

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

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

ME 6405 Introduction to Mechatronics

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

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

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

Module 1-D. Control Structure Applications. Tim Rogers 2017 [1.D]-1

Module 1-D. Control Structure Applications. Tim Rogers 2017 [1.D]-1 Module 1-D Control Structure Applications Tim Rogers 2017 [1.D]-1 Learning Outcome #1 An ability to program a microcontroller to perform various tasks How? A. Architecture and Programming Model B. Instruction

More information

Coe538 Final Study Guide 2016 (Questions & Answers)

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

EB301. Motorola Semiconductor Engineering Bulletin. Programming EEPROM on the MC68HC811E2 during Program Execution. Freescale Semiconductor, I

EB301. 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 information

The Motorola 68HC11 Instruc5on Set

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

; export symbols XDEF Entry ; export 'Entry' symbol ABSENTRY Entry ; for assembly entry point

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

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-470/570: Microprocessor-Based System Design Fall 2014.

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

Programming Book for 6809 Microprocessor Kit

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

Introduction to Embedded Microcomputer Systems Lecture 10.1

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

Reading Assignment. 68HC12 Instruction Set. M68HC12 Instruction Set Categories. Some Tips. Endianness (Byte Order) Load and Store Instructions

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

ECE3120: Computer Systems Hardware & Software Development Tools

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

ECE 367 -Experiment #1 Fall 2012

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

Ryerson 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, 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 information

CET335 Microprocessor Interfacing Lab 5: LCD Interface (Bus Attached Peripheral)

CET335 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

ECE 4510/5530 Microcontroller Applications Chapter 7

ECE 4510/5530 Microcontroller Applications Chapter 7 ECE 450/5530 Microcontroller Applications Chapter 7 Dr. Bradley J. Bazuin Associate Professor Department of Electrical and Computer Engineering College of Engineering and Applied Sciences Chapter 7: Parallel

More information

Module 1-G. Marcos and Structured Programming

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

Addressing Mode Description Addressing Mode Source Format Abbrev. Description

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

ME4447/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 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 information

0b) [2] Can you name 2 people form technical support services (stockroom)?

0b) [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 information

Motorola HC11. Fun with Microcontrollers and Embedded Systems

Motorola HC11. Fun with Microcontrollers and Embedded Systems Motorola HC11 Fun with Microcontrollers and Embedded Systems Original Source: http://www.soe.ucsc.edu/classes/cmpe012c/winter04/notes/12_microcontrollers.ppt Microcontrollers What is a microcontroller?

More information

COE538 Lecture Notes Week 3 (Week of Sept 17, 2012)

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

COSC 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. 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 information

Chapter 1. Solutions Solution 1.1. Most RAMs are volatile, meaning the information is lost if power is removed then restored.

Chapter 1. Solutions Solution 1.1. Most RAMs are volatile, meaning the information is lost if power is removed then restored. Chapter 1. Solutions Solution 1.1. Most RAMs are volatile, meaning the information is lost if power is removed then restored. Solution 1.2. The bus signals of the MC9S12C32 are AD15-0, R/W, LSTRB and E.

More information

Lab 7: Asynchronous Serial I/O

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

EE345L Spring 2006 May 10, 2006, 2-5pm Page 1 of 8

EE345L Spring 2006 May 10, 2006, 2-5pm Page 1 of 8 EE345L Spring 2006 May 10, 2006, 2-5pm Page 1 of 8 Jonathan W. Valvano You can use the textbook, but no other materials. You must put your answers in the boxes on the answer pages. You have 3 hours, so

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

Microcontrollers and the Freescale/Motorola HC11

Microcontrollers and the Freescale/Motorola HC11 Microcontrollers and the Freescale/Motorola HC11 What is a microcontroller? A computer on a chip used to control electronic devices A microprocessor Usually not cutting edge (4-bit to 32-bit) Dependable

More information

Example Programs for 6502 Microprocessor Kit

Example Programs for 6502 Microprocessor Kit Example Programs for 6502 Microprocessor Kit 0001 0000 0002 0000 GPIO1.EQU $8000 0003 0000 0004 0000 0005 0200.ORG $200 0006 0200 0007 0200 A5 00 LDA $0 0008 0202 8D 00 80 STA $GPIO1 0009 0205 00 BRK 0010

More information

538 Lecture Notes Week 2

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

68HC12 Training Lab Student Exercise Book

68HC12 Training Lab Student Exercise Book 68HC12 Training Lab Student Exercise Book Date: 13 September, 2000 Document Revision:1.01 BiPOM Electronics 16301 Blue Ridge Road, Missouri City, Texas 77489 USA Telephone: (713) 661-4214 Fax: (281) 416-2806

More information

CodeWarrior. Microcomputer Architecture and Interfacing Colorado School of Mines Professor William Hoff

CodeWarrior. 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 information

Lab 2 Part 3 Assembly Language Programming and 9S12 Ports

Lab 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 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

Decimal, Hexadecimal and Binary Numbers Writing an assembly language program

Decimal, 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 information

TEMPERATURE SENSOR. Revision Class. Instructor / Professor LICENSE

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

AN1064. Motorola Semiconductor Application Note. Use of Stack Simplifies M68HC11 Programming By Gordon Doughman. Introduction

AN1064. 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 information

History 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. 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 information

MIGRATING TO THE 68HC12 IN C

MIGRATING TO THE 68HC12 IN C MIGRATING TO THE 68HC12 IN C by Jean-Pierre Lavandier (Cosmic Software) and Greg Viot (Motorola) INTRODUCTION An important design goal of the 68HC12 was to maintain software compatibility with the 68HC11

More information

AN Kbyte Addressing with the M68HC11. Overview

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

Module 8: Atmega32 Stack & Subroutine. Stack Pointer Subroutine Call function

Module 8: Atmega32 Stack & Subroutine. Stack Pointer Subroutine Call function Module 8: Atmega32 Stack & Subroutine Stack Pointer Subroutine Call function Stack Stack o Stack is a section of RAM used by the CPU to store information temporarily (i.e. data or address). o The CPU needs

More information

Cmpt 150 The Freescale CPU12 March, The Freescale HC12

Cmpt 150 The Freescale CPU12 March, The Freescale HC12 The Freescale HC12 The instruction set architecture that we will use for assembly language programming is the HC12 ISA. Most recently, Freescale Semiconductor manufactured many System on Chip (SoC) implementations

More information

Introduction to the MC9S12 Hardware Subsystems

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

Microcontrollers. 2IN60: Real-time Architectures (for automotive systems) Mike Holenderski,

Microcontrollers. 2IN60: Real-time Architectures (for automotive systems) Mike Holenderski, Microcontrollers 2IN60: Real-time Architectures (for automotive systems) Goals for this slide set Describe the architecture of a microcontroller Explain the purpose of an Instruction Set Architecture and

More information

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

538 Lecture Notes Week 1

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

Cross Assembly and Program Development

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

EE 308 Spring A software delay. To enter a software delay, put in a nested loop, just like in assembly.

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

Comparison of C and Assembly How to compile a C program using CodeWarrior

Comparison of C and Assembly How to compile a C program using CodeWarrior Comparison of C and Assembly How to compile a C program using CodeWarrior o Using pointers to access contents of specific addresses in C o Including and using derivative.h or hcs12.h to use in MC9S12 port

More information

Chapter 3: HCS12 Hardware and Software Development Tools. The HCS12 Microcontroller. Han-Way Huang. Minnesota State University, Mankato

Chapter 3: HCS12 Hardware and Software Development Tools. The HCS12 Microcontroller. Han-Way Huang. Minnesota State University, Mankato Chapter 3: HCS12 Hardware and Software Development Tools The HCS12 Microcontroller Han-Way Huang Minnesota State University, Mankato September 2009 H. Huang Transparency No.3-1 Development Tools Software

More information

Lab 2 Part 1 Assembly Language Programming and 9S12 Ports

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

LECTURE #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 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 information

Input and Output Ports. How do you get data into a computer from the outside?

Input and Output Ports. How do you get data into a computer from the outside? Input and Output Ports How do you get data into a computer from the outside? SIMPLIFIED INPUT PORT D 7 Any read from address $0000 gets signals from outside H C 2 D a t a D D D4 D3 S i g n a l s F r o

More information

ECE 331: PC Lab 3 Stack and Subroutines

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

Linking Assembly Subroutine with a C Program

Linking Assembly Subroutine with a C Program Linking Assembly Subroutine with a C Program To link an assembly subroutine to a C program, you have to understand how parameters are passed. For the CodeWarrior C compiler, one parameter is passed in

More information

ECET Chapter 2, Part 2 of 3

ECET Chapter 2, Part 2 of 3 ECET 310-001 Chapter 2, Part 2 of 3 W. Barnes, 9/2006, rev d. 10/07 Ref. Huang, Han-Way, The HCS12/9S12: An Introduction to Software and Hardware Interfacing, Thomson/Delmar. In This Set of Slides: 1.

More information

SEVEN SEGMENT DISPLAY LAB EXPERIMENT

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

AN1239. HC05 MCU Keypad Decoding Techniques Using the MC68HC705J1A. Introduction

AN1239. HC05 MCU Keypad Decoding Techniques Using the MC68HC705J1A. Introduction Order this document by /D Rev. 1.0 HC05 MCU Keypad Decoding Techniques Using the MC68HC705J1A By David Yoder CSIC Applications Introduction This application note demonstrates the use of a matrix keypad

More information

Lecture 5 Assembly Programming: Arithmetic

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

Introduction to Microcontrollers

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

Module 2.F. Buffered, Interrupt-Driven Printer Design Example. Tim Rogers 2017

Module 2.F. Buffered, Interrupt-Driven Printer Design Example. Tim Rogers 2017 Module 2.F Buffered, Interrupt-Driven Printer Design Example Tim Rogers 2017 Learning Outcome #2 An ability to interface a microcontroller to various devices How? A. Bus Timing Analysis B. 9S12C Multiplexed

More information

Lecture 6 Assembly Programming: Branch & Iteration

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