MICRO-CONTROLLER MOTOROLA HCS12 Interrupts Mechatronics Department Faculty of Engineering Ain Shams University.

Slides:



Advertisements
Similar presentations
Microprocessor and Microcontroller Based Systems Instructor: Eng.Moayed N. EL Mobaied The Islamic University of Gaza Faculty of Engineering Electrical.
Advertisements

Interrupts, Low Power Modes and Timer A (Chapters 6 & 8)
External Interrupt Module MTT EXTERNAL INTERRUPT REQUEST MODULE (IRQ)
I/O Unit.
ECE 447 Fall 2009 Lecture 9: TI MSP430 Interrupts & Low Power Modes.
68HC11 Polling and Interrupts
Introduction to Interrupts
EET 2261 Unit 9 Interrupts  Read Almy, Chapters 17 – 19.  Homework #9 and Lab #9 due next week.  Quiz next week.
ECE 372 – Microcontroller Design Parallel IO Ports - Interrupts
COMP3221: Microprocessors and Embedded Systems Lecture 15: Interrupts I Lecturer: Hui Wu Session 1, 2005.
Chapter 6 Interrupts and Resets
Computer System Structures memory memory controller disk controller disk controller printer controller printer controller tape-drive controller tape-drive.
MICRO-CONTROLLER MOTOROLA HCS12 Instruction Set Mechatronics Department Faculty of Engineering Ain Shams Univeristy.
1 Reset and Interrupts Advanced Programming. 2 Resets and Interrupts See the Reset and Interrupts Section in the 68HC11E Family Technical Data Sheet (pp.79-96)
INTERRUPTS PROGRAMMING
MICRO-CONTROLLER MOTOROLA HCS12 Addressing Modes Mechatronics Department Faculty of Engineering Ain Shams Univeristy.
ECE 265 – LECTURE 12 The Hardware Interface 8/22/ ECE265.
Interrupts. 2 Definition: An electrical signal sent to the CPU (at any time) to alert it to the occurrence of some event that needs its attention Purpose:
Interrupts. What Are Interrupts? Interrupts alter a program’s flow of control  Behavior is similar to a procedure call »Some significant differences.
UNIT 8 Keypad Interface Contact Closure Counter Exceptions (Interrupts and Reset)
Ch. 9 Interrupt Programming and Real-Time Sysstems From Valvano’s Introduction to Embedded Systems.
Week #5 General Interfacing Techniques
Chapter 6: Interrupts and Resets
MSP430 Mixed Signal Microcontroller – Parte 2 Afonso Ferreira Miguel Source: slau056d – Texas instruments.
Revised: Aug 1, ECE 263 Embedded System Design Lessons 23, 24 - Exceptions - Resets and Interrupts.
Nurudeen Olayiwola Thomas Gutierrez
ME 4447/6405 Interrupts and Resets Suzanne Price Scott Gilliliand Greg Graf.
Interrupts and reset operations. Overview  Introduction to interrupts – What are they – How are they used  68HC11 interrupt mechanisms – Types of interrupts.
Interrupt.
1 © Unitec New Zealand Interrupt Lecture 6 Date: - 20 Sept, 2011 Embedded Hardware ETEC 6416.
George W. Woodruff School of Mechanical Engineering, Georgia Tech ME4447/6405 ME 4447/6405 Microprocessor Control of Manufacturing Systems and Introduction.
1 Interrupts, Resets Today: First Hour: Interrupts –Section 5.2 of Huang’s Textbook –In-class Activity #1 Second Hour: More Interrupts Section 5.2 of Huang’s.
AT91 Interrupt Handling. 2 Stops the execution of main software Redirects the program flow, based on an event, to execute a different software subroutine.
System Integration Module MTT Motoola SYSTEM INTEGRATION MODULE (SIM)
Execution Architecture MTT CPU08 Core M CPU08 INTRODUCTION.
Resets & Interrupts MTT CPU08 Core Motorola CPU08 RESETS & INTERRUPTS.
Razvan Bogdan Embedded Systems
George W. Woodruff School of Mechanical Engineering, Georgia Tech ME4447/6405 ME 4447/6405 Microprocessor Control of Manufacturing Systems and Introduction.
Interrupt-Driven I/O There are different types of interrupts –Hardware Generated by the 8259 PIC – signals the CPU to suspend execution of the current.
CS-280 Dr. Mark L. Hornick 1 Sequential Execution Normally, CPU sequentially executes instructions in a program Subroutine calls are synchronous to the.
Computer Operating Properly Module MTT COMPUTER OPERATING PROPERLY MODULE (COP)
Interrupts ELEC 330 Digital Systems Engineering Dr. Ron Hayne
Interrupts ELEC 330 Digital Systems Engineering Dr. Ron Hayne Images Courtesy of Ramesh Gaonkar and Delmar Learning.
The 8051 Microcontroller Chapter 6 INTERRUPTS. 2/29 Interrupt is the occurrence of a condition an event that causes a temporary suspension of a program.
George W. Woodruff School of Mechanical Engineering, Georgia Tech ME4447/6405 ME 4447/6405 Microprocessor Control of Manufacturing Systems and Introduction.
Introduction to Exceptions 1 Introduction to Exceptions ARM Advanced RISC Machines.
INTV1 & MMCV4 By: Prof. Mahendra B. Salunke Asst. Prof., Department of Computer Engg., SITS, Pune-41 URL: microsig.webs.com.
Lecture – 8 Interrupt 1. Outline Introduction Handling interrupt Interrupt sources Switching interrupt Peripheral interrupts Using two interrupts Conclusions.
INSTITUTE: INSTITUTE:PARUL INSTITUTE OF TECHNOLOGY BRANCH : BRANCH :B.E. E.C.5 TH SEM. SUBJECT:MICROCONTROLLER & INTERFACING TOPIC:AVR INTTRUPT TOPIC:AVR.
Chapter 10 Interrupts. Basic Concepts in Interrupts  An interrupt is a communication process set up in a microprocessor or microcontroller in which:
ELE22MIC Lecture 6 Continuation of Lecture 5 Instruction Set Overview, Part 4 –HC-COM - Lab notes –Stack Pointer, Push, Pull Call/return Data –Conditional.
HCS12 Exceptions Maskable Interrupts
ECE 3430 – Intro to Microcomputer Systems
68HC11 Interrupts & Resets.
Mon. Oct 2 Announcements Quiz Postponed to Wednesday – still only on 2.a + 2.b Video lecture for 2.a posted Lab 6 experiment extension You must come to.
Timer and Interrupts.
Interrupts In 8085 and 8086.
BVM Engineering College Electrical Engineering Department : Microprocessor and Microcontroller Interfacing Interrupts of 8051 Prepared by:
Interrupt Source: under
YOVI 2008 Core Interrupt Controller (INTC)
Subject Name: Microprocessors Subject Code:10EC46 Department: Electronics and Communication Date: /20/2018.
Resets & Interrupts.
Lecture 9: TI MSP430 Interrupts & Low Power Modes
Interrupts.
Interrupt handling Explain how interrupts are used to obtain processor time and how processing of interrupted jobs may later be resumed, (typical.
Computer System Overview
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
COMP3221: Microprocessors and Embedded Systems
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
Presentation transcript:

MICRO-CONTROLLER MOTOROLA HCS12 Interrupts Mechatronics Department Faculty of Engineering Ain Shams University

Interrupts Handling Sources of interrupts Interrupt service routines Interruption mechanism Interrupt control registers Real-time interrupts

Interrupts Sources of interrupts  Maskable and non-maskable external interrupt pins.  Reset.  Real-Time Interrupt (RTI).  A 16-channel 10-bit A/D converter.  Enhanced Capture Timer (ECT) I/O on PortT.  A watchdog timer (COP).  A clock monitor.  Software interrupts

Interrupts Interrupt Service Routines  The script to be executed when an interrupt occurs.  It can be labeled by any label.  Never forget to write RTI at the end of interrupt service routine to pull back the CPU status and return address from the stack.

Interrupts Interruption mechanism 1. Saving the program counter value. 2. Saving the CPU status in the stack. 3. Identifying the source of the interrupt. 4. Fetch the starting address of the corresponding interrupt service routine. 5. Executing the interrupt service routine. 6. Restoring the CPU status from the stack. 7. Restoring the program counter from the stack. 8. Resuming the interrupted program.

Interrupts Interruption mechanism Masking interrupts:  The I and X bits in the CCR act globally. (setting the I bit disables external IRQ and other maskable internal interrupt sources).  CLI is the instruction used to clear the interrupt flag.  ANDCC#% – is also used to clear the interrupt flag.  ORCC#% – is used to enable interrupts by setting the interrupt flag.  If the ISR resets the I bit - not recommended - because it may cause nested interrupts.

Interrupts Interruption Priorities Six sources are not maskable: (listed according to priority) 1. Power-on reset (POR) or RESET pin 2. Clock monitor reset 3. Computer operating properly (COP) watchdog reset 4. Unimplemented instruction trap 5. Software interrupt instruction (SWI) 6. XIRQ signal if X bit in CCR = 0 The remaining sources are maskable, and any one of them can be given priority over other maskable interrupts.

Interrupts Interrupt control registers Interrupt Control Register (INTCR) Highest Priority Control Register (HPRIO)

Interrupts Interrupt control registers Interrupt Control Register (INTCR)

Interrupts Interrupt control registers Highest Priority Control Register (HPRIO) We distinct between interrupt sources with their Vectors This byte includes the vector of the interrupt with highest priority. We distinct between interrupt sources with their Vectors This byte includes the vector of the interrupt with highest priority.

Interrupts Interrupts vectors

Interrupts Interrupts vectors definition

Eng. Mohamed Mahmoud Hamdy Eng. Mostafa Ahmed Arafa Eng. Abd Allah Mahmoud Selim Prepared by: