INTERRUPTS. There are 2 methods for communicating between the microcontroller and the external system: POLLING INTERRUPTS



Similar documents
Chapter 13. PIC Family Microcontroller

Lesson-16: Real time clock DEVICES AND COMMUNICATION BUSES FOR DEVICES NETWORK

Microcontroller Code Example Explanation and Words of Wisdom For Senior Design

Interrupts. 1.Maskable interrupt request can be ignored or delayed by the microprocessor and used in telephone

An Introduction to MPLAB Integrated Development Environment

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING Question Bank Subject Name: EC Microprocessor & Microcontroller Year/Sem : II/IV

Byte code Interpreter for 8051 Microcontroller

(Refer Slide Time: 00:01:16 min)

1. Computer System Structure and Components

AVR151: Setup and Use of the SPI. Introduction. Features. Atmel AVR 8-bit Microcontroller APPLICATION NOTE

SPRING SEMESTER. Turhan DOAN from Computer Engineering Department: Software Development Process

Microtronics technologies Mobile:

8-Bit Flash Microcontroller for Smart Cards. AT89SCXXXXA Summary. Features. Description. Complete datasheet available under NDA

I2C PRESSURE MONITORING THROUGH USB PROTOCOL.

Allows the user to protect against inadvertent write operations. Device select and address bytes are Acknowledged Data Bytes are not Acknowledged

Tutorial for MPLAB Starter Kit for PIC18F

SPI. Overview and Use of the PICmicro Serial Peripheral Interface. Getting Started: SPI

PIC Programming in Assembly. (

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

Serial Communications

AN141 SMBUS COMMUNICATION FOR SMALL FORM FACTOR DEVICE FAMILIES. 1. Introduction. 2. Overview of the SMBus Specification. 2.1.

8051 MICROCONTROLLER COURSE

- 35mA Standby, mA Speaking pre-defined phrases with up to 1925 total characters.

Using Altera MAX Series as Microcontroller I/O Expanders

Production Flash Programming Best Practices for Kinetis K- and L-series MCUs

Date Rev. Details Author

Section 8. Interrupts

EXERCISE 3: String Variables and ASCII Code

FAULT TOLERANCE FOR MULTIPROCESSOR SYSTEMS VIA TIME REDUNDANT TASK SCHEDULING

DeviceNet Bus Software Help for Programming an Allen Bradley Control System

Handout 17. by Dr Sheikh Sharif Iqbal. Memory Unit and Read Only Memories

Computer and Set of Robots

ET-BASE AVR ATmega64/128

8051 Serial Port. Crystal TXD. I/O Device RXD. Embedded Systems Peripherals

2.0 Command and Data Handling Subsystem

Real-Time Application Surveillance Security System Based on LabVIEW

Interrupts and the Timer Overflow Interrupts Huang Sections What Happens When You Reset the HCS12?

Exception and Interrupt Handling in ARM

Microcomputer Based Electronics: Using the C Stamp in Pre- Engineering, Technology, and Engineering Programs

Implementing SPI Master and Slave Functionality Using the Z8 Encore! F083A

Chapter 02: Computer Organization. Lesson 04: Functional units and components in a computer organization Part 3 Bus Structures

Evo Laser Firmware Developer s Manual

PICNet 1. PICNet 1 PIC18 Network & SD/MMC Development Board. Features. Applications. Description

Fondamenti su strumenti di sviluppo per microcontrollori PIC

Chapter 11: Input/Output Organisation. Lesson 06: Programmed IO

Chapter 1 Computer System Overview

Computer Organization and Components

4 Character 5x7 LED Matrix Display

Freescale Semiconductor, Inc. Product Brief Integrated Portable System Processor DragonBall ΤΜ

Voltage Measurement with A PIC Microcontroller

ETEC Digital Controls PIC Lab 10 Pulse Width Modulation

Lecture 6: Interrupts. CSC 469H1F Fall 2006 Angela Demke Brown

The I2C Bus. NXP Semiconductors: UM10204 I2C-bus specification and user manual HAW - Arduino 1

How to design and implement firmware for embedded systems

Microprocessor & Assembly Language

COMPUTERS ORGANIZATION 2ND YEAR COMPUTE SCIENCE MANAGEMENT ENGINEERING UNIT 5 INPUT/OUTPUT UNIT JOSÉ GARCÍA RODRÍGUEZ JOSÉ ANTONIO SERRA PÉREZ

A Co-operative First Approach to Software Development for Reliable Embedded Systems

Flash Corruption: Software Bug or Supply Voltage Fault?

Below is a diagram explaining the data packet and the timing related to the mouse clock while receiving a byte from the PS-2 mouse:

The PC Boot Process - Windows XP.

Lecture N -1- PHYS Microcontrollers

Hello and welcome to this presentation of the STM32L4 Firewall. It covers the main features of this system IP used to secure sensitive code and data.

VOICE RECOGNITION KIT USING HM2007. Speech Recognition System. Features. Specification. Applications

Event counters in NOVA

ADVANCED PROCESSOR ARCHITECTURES AND MEMORY ORGANISATION Lesson-17: Memory organisation, and types of memory

MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

An Introduction to the ARM 7 Architecture

8-bit Microcontroller. Application Note. AVR134: Real-Time Clock (RTC) using the Asynchronous Timer. Features. Theory of Operation.

Getting Started with PIC24F/PIC24H Programming and Interfacing in C

CSE2102 Digital Design II - Topics CSE Digital Design II

Using The PIC I/O Ports

I 2 C Master Mode Overview and Use of the PICmicro MSSP I 2 C Interface with a 24xx01x EEPROM

Computer-System Architecture

SpW-10X Network Performance Testing. Peter Mendham, Jon Bowyer, Stuart Mills, Steve Parkes. Space Technology Centre University of Dundee

Design and Implementation of an Accidental Fall Detection System for Elderly

Invisible EYE for Security System

APPLICATION NOTE. Atmel AVR134: Real Time Clock (RTC) Using the Asynchronous Timer. Atmel AVR 8-bit Microcontroller. Introduction.

Single channel data transceiver module WIZ2-434

3. Identification of water pumps through RFID technology. 4. Wireless control of remote water pump using RF technology.

Technical Note. Micron NAND Flash Controller via Xilinx Spartan -3 FPGA. Overview. TN-29-06: NAND Flash Controller on Spartan-3 Overview

MF Digital 5000 USB SD Platform Series Operating Manual

Secondary Storage. Any modern computer system will incorporate (at least) two levels of storage: magnetic disk/optical devices/tape systems

Welcome to the Introduction to Controller Area Network web seminar My name is William Stuart, and I am a Applications Engineer for the Automotive

INTERNATIONAL JOURNAL OF ELECTRONICS AND COMMUNICATION ENGINEERING & TECHNOLOGY (IJECET)

Alber Training and Education Product Tutorial. Battery Monitor Data Manager Software (BMDM)

Fastboot Techniques for x86 Architectures. Marcus Bortel Field Application Engineer QNX Software Systems

Keil Debugger Tutorial

VisorALARM-Manager Application Quick Guide. (Ver. 1.3) Dm 380-I. V:3.0

Accurate Measurement of the Mains Electricity Frequency

HANDLING SUSPEND MODE ON A USB MOUSE

The Real-Time Operating System ucos-ii

8051 hardware summary

ALARM SYSTEM USING BODY DETECTOR UMMI KALSOM BINTI NOOR DIN

LADDER LOGIC/ FLOWCHART PROGRAMMING DIFFERENCES AND EXAMPLES

Programming Flash Microcontrollers through the Controller Area Network (CAN) Interface

Bidirectional wireless communication using EmbedRF

Chapter 1 Lesson 3 Hardware Elements in the Embedded Systems Chapter-1L03: "Embedded Systems - ", Raj Kamal, Publs.: McGraw-Hill Education

ELEC 5260/6260/6266 Embedded Computing Systems

Introduction to Microcontrollers

8-bit Microcontroller. Application Note. AVR105: Power Efficient High Endurance Parameter Storage in Flash Memory

Transcription:

INTERRUPTS There are 2 methods for communicating between the microcontroller and the external system: POLLING INTERRUPTS

POLLING In this method, microcontroller accesses at the exact time interval the external device, and gets the required information. The time periods is determined by user. In fact, you can say that, when using the method - polling, the processor must access the device itself and request the desired information that is needed to be processed. In fact we see that in this method, there is no independence for the external systems themselves. They depend on the microcontroller. The processor may only access the external device and get from it the information needed. The main drawback writing program that uses this method is a waste of time. The micro needs to wait and review whether a new information arrived.

INTERRUPTS Interrupt is the signal sent to the micro to mark the event that requires immediate attention. Interrupt is asking" the processor to stop to perform the current program and to make time to execute a special code. In fact, the method of interrupt defines the option to transfer the information generated by internal or external systems inside the micro by them self! Once the system has finished the task imposed on it, the processor will be notified that it can access and receive the information and use it.

Interrupt Sources External hardware devices are sending interrupts to microcontroller in order to receive the treatment. The micro can send to itself an interrupt as a result of executing the code to report the failure in the process. In the multi-processor system, processors can send interrupts to each other as communication between them, for example for the division of work between them. There are two types of interrupts: software interrupts and hardware interrupts.

Software Interrupts Software interrupts come from a program that runs by the processor and request the processor to stop running the program, go to make a interrupt and then to return to continue to execute the program. Example: Procedure - when there is a procedure call, the processor stops the execution of the program, jumps to the place in memory that reserved for a procedure executes the procedure and only then returns back to the program and continues to execute.

Hardware Interrupts The hardware interrupts are sent to the microcontroller by external hardware devices. Some of the interrupts can be blocked = (masking) by Interrupt Enable bit (IE). When the interrupt is blocked the micro does not see the request for an interrupt, therefore won t be available to execute it. The blocked interrupt won t be executed till the block is removed. There are interrupts that can not be blocked. These are used to report on critical hardware issues, such as the drop of voltage. We want an immediate response from the microcontroller to these kind interrupts, without the ability to ignore them.

PIC16F877 Interrupts Interrupts with high priority Interrupts with low priority

PIC16F877 Interrupts cont The microcontroller has 14 interrupt sources XXIF is an interrupt flag that shows the result that we are getting from an interrupt. XXIE is an interrupt enable bit that is used to enable or block the interrupt. The interrupts on the left side of the figure (previous slide) are low priority and all of them together can be blocked by enabling bit interrupt PEIE = 0. We can determine whether or not to allow the system to address the interrupts. This is done by using Global Interrupt Enable bit GIE.

PIC16F877 Interrupts cont EEIF - Write Complete Flag Bit. This flag bit appears in the memory components such Data EEPROM and Flash Program Memory located inside the PIC. In order to begin writing again into memory the flag should be reset first - EEIF=0. EEIF must be cleared by software. PSPIF This interrupt flag appears when we are utilizing PORTD. PORTD operates as an 8-bit wide Parallel Slave Port (PSP), or microprocessor port, when control bit PSPMODE (TRISE<4>) is set. Interrupt flag PSPIF is designed to inform that the operation of reading/writing from/to PORTD is ended.

To be continued