Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell 68HC12 Arithmetic Chapter 3.

Slides:



Advertisements
Similar presentations
Ch.3 Representation and Manipulation of Information From Introduction to Embedded Systems: Interfacing to the Freescale 9s12 by Valvano, published by CENGAGE.
Advertisements

WHYP Test Files Lab 9. y1 The WC16 WHYP Core Modifications for Multiplication and Division.
Revised: Aug 1, EE4390 Microprocessors Lesson 6,7 Instruction Set, Branch Instructions, Assembler Directives.
HCS12 Arithmetic Lecture HC12 Arithmetic Addition and Subtraction Shift and Rotate Instructions Multiplication Division.
© 2010 Kettering University, All rights reserved..
1 Arithmetic and Logical Operations - Part I. Boolean Operations A boolean variable can only have one of the two values, i.e, can either be 1 or 0. Given.
Logical, Shift, and Rotate Operations CS208. Logical, Shift and Rotate Operations  A particular bit, or set of bits, within the byte can be set to 1.
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Introducing the 68HC12 Chapter 1.
Chapter 2 HCS12 Assembly Programming
Programming the HC12 in C. Some Key Differences – Note that in C, the starting location of the program is defined when you compile the program, not in.
1 SPIRIT Silicon Prairie Initiative on Robotics in Information Technology MicroprocessorsMicrocomputers &Microcontrollers.
Finite Arithmetics of Integers FORTRAN codes: INTEGER*2INTEGER HTML HTML version.
Binary Operations Math/Logical. Binary Math Decimal Addition Example ) Add = 15 Write down 5, carry ) Add 3 +
Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Subroutine and Stacks Chapter 2.
Datapath Functional Units Adapted from David Harris of Harvey Mudd College.
Introduction to Computer Engineering by Richard E. Haskell Shift and Rotate Instructions Module M16.2 Section 10.3.
Microcontroller Fundamentals & Programming
Princess Sumaya Univ. Computer Engineering Dept. Chapter 7:
ECE 265 – LECTURE 7 The M68HC11 Basic Instruction Set Logical, Shift and Rotate, Data Testing 8/14/ ECE265.
The M68HC11 Basic Instruction Set Basic Arithmetic Instructions
Chapter 2: 68HC11 Assembly Programming
H. Huang Transparency No.2-1 The 68HC11 Microcontroller Chapter 2: 68HC11 Assembly Programming The 68HC11 Microcontroller.
ECE Lecture 13 Motorola 68HC11. Resources 68HC11 E-series Reference Guide and if necessary 68HC11 E-series Technical Data 68HC11 Reference Manual.
BITWISE OPERATIONS – Microprocessor Asst. Prof. Dr. Choopan Rattanapoka and Asst. Prof. Dr. Suphot Chunwiphat.
ECE 447: Lecture 12 Logic, Arithmetic, Data Test and Control Instructions of MC68HC11.
Lecture 4 Chap 5 Types Instructors: Fu-Chiung Cheng ( 鄭福炯 ) Associate Professor Computer Science & Engineering Tatung University.
A four function ALU A 00 ADD B MUX SUB 11 Result AND OR
Lecture 2: Advanced Instructions, Control, and Branching EEN 312: Processors: Hardware, Software, and Interfacing Department of Electrical and Computer.
Microcontroller Fundamentals & Programming Arithmetic Instructions.
Advanced Assembly Language Programming
Arithmetic and Logic Chapter 5
COMP3221: Microprocessors and Embedded Systems--Lecture 10 1 COMP3221: Microprocessors and Embedded Systems Lecture 10: Shift and Bit-set Instructions.
Chapter 7 Bit Manipulation. 7.1 Logical Operations.
By: Tameicka James Addition Subtraction Division Multiplication
Chapter 2 Data Manipulation © 2007 Pearson Addison-Wesley. All rights reserved.
Embedded Systems Lecture 5 January 25 th, 2016.
Arithmetic Chapter 4 Subject: Digital System Year: 2009.
Chapter four – The 80x86 Instruction Set Principles of Microcomputers 2016年3月17日 2016年3月17日 2016年3月17日 2016年3月17日 2016年3月17日 2016年3月17日 1 Chapter Four.
ARM Shifts, Multiplies & Divide??. MVN Pseudo Instructions Pseudo Intruction: Supported by assembler, not be hardware.
David Kauchak CS 52 – Spring 2017
The 68HC11 Microcontroller Minnesota State University, Mankato
CPU12 Instruction Set Overview
HC11 Programming.
Negative Numbers.
ECE 3430 – Intro to Microcomputer Systems
Microprocessor Systems Design I
Arithmetic and Logic Chapter 5
68000 Arithmetic Instructions
King Fahd University of Petroleum and Minerals
1 Step Equation Practice + - x ÷
Topic 6: Bitwise Instructions
Year 1 Number – number and place value
Logical Operations In some applications it is necessary to manipulate other sizes of data, or perhaps only individual bits. There are instructions that.
Multiplication by small constants (pp. 139 – 140)
Year 5 Number – number and place value
Logical Operations bitwise logical operations AND, OR, EOR, NOT
October 15 Chapter 4 – Multiplication/Division Go to the State Fair!
Arithmetic and Logic Chapter 5
Table 3‑1: Unsigned Data Range Summary in ARM
The ARM Instruction Set
Branching instructions
Number Lines.
October 5 Register to vote! Go to the State Fair! (15-24 October)
Year 2 Number – number and place value
Year 4 Number – number and place value
Immediate data Immediate operands : ADD r3, r3, #1 valid ADD r3, #1,#2 invalid ADD #3, r1,r2 invalid ADD r3, r2, #&FF ( to represent hexadecimal immediate.
Shift and Rotate Instructions.
2018 Arithmetic.
CS-401 Computer Architecture & Assembly Language Programming
Arithmetic and Logic Chapter 3
Presentation transcript:

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell 68HC12 Arithmetic Chapter 3

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell 68HC12 Arithmetic Addition and Subtraction –Double Numbers Multiplication Division Shift and Rotate Instructions

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Addition and Subtraction

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell

68HC12 code for 1+, 2+ ; 1+ ( n -- n+1 ) ONEP LDD 0,X ADDD #1 STD 0,X RTS ; 2+ ( n -- n+2 ) TWOP LDD 0,X ADDD #2 STD 0,X RTS

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell 68HC12 code for 1-, 2- ; 1- ( n -- n-1 ) ONEP LDD 0,X SUBD #1 STD 0,X RTS ; 2- ( n -- n-2 ) TWOP LDD 0,X SUBD #2 STD 0,X RTS

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell 68HC12 Arithmetic Addition and Subtraction –Double Numbers Multiplication Division Shift and Rotate Instructions

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Double Numbers

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Adding Double Numbers

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Subtracting Double Numbers

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell

68HC12 Arithmetic Addition and Subtraction –Double Numbers Multiplication Division Shift and Rotate Instructions

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Multiplication

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Multiplication

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Multiplication

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell 68HC11: A, B, C, D are 8 bits 16 x 16 => 32-bit product 68HC12: A, B, C, D could be 16 bits 32 x 32 => 64-bit product

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Multiplication - DUM*

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell WHYP Multiplication Examples

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell 68HC12 Arithmetic Addition and Subtraction –Double Numbers Multiplication Division Shift and Rotate Instructions

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Division

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell

WHYP uses symetric (not floored) division

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell

Examples of using / and MOD

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell

Examples of using UM/MOD

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell MU/MOD

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Examples of using MU/MOD

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell M/MOD

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Examples of using M/MOD

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell */

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Examples of using */

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell IDIV

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell U/

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Examples of using IDIV and U/

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell FDIV

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Examples of using FDIV

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell 68HC11 version of UM/MOD

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell 68HC12 Arithmetic Addition and Subtraction –Double Numbers Multiplication Division Shift and Rotate Instructions

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell

Logic Shift Left LSL, LSLA, LSLB C Bit C Bit AB LSLD

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Logic Shift Right LSR, LSRA, LSRB C Bit C Bit AB LSRD

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Arithmetic Shift Right ASR, ASRA, ASRB C

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Rotate Left ROL, ROLA, ROLB C Bit

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell Rotate Right ROR, RORA, RORB C Bit

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell 2*, 2/, and U2/

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell LSHIFT and RSHIFT

Design of Embedded Systems Using 68HC12(11) Microcontrollers - R. E. Haskell