인터럽트의 개요 Interrupt의 처리 과정

Slides:



Advertisements
Similar presentations
UNIT 13 Interrupt 로봇 SW 교육원 조용수.
Advertisements

More fun with Timer/Counters
Analog to Digital Conversion
Kuliah Mikrokontroler AVR Comparator AVR Eru©September 2009 PENS.
Introduction of Holtek HT-46 series MCU
COMP3221: Microprocessors and Embedded Systems Lecture 16: Interrupts II Lecturer: Hui Wu Session 2, 2005.
Atmega128 Timer/Counter의 이용 분야
Serial I/O Communication
Mark Neil - Microprocessor Course 1 Timers and Interrupts.
Intro to AVR ATtiny2313 CS423 Dick Steflik. AVR ATtiny2313.
Butterfly I/O Ports CS-212 Dick Steflik. I/O for our labs To get data into and out of our Butterfly its a little trickier than using printf and scanf.
HT46 A/D Type MCU Series Data Memory (Byte) Program Memory HT46R22 (OTP) HT46C22 (Mask) 2Kx Kx16 4Kx HT46R23 (OTP) HT46C23 (Mask) HT46R24.
External & internal Interrupts. Interrupt Sources There are 21 different interrupts and each one has its own vector located in a predefined location at.
The 8051 Microcontroller and Embedded Systems
Microprocessor based Design for Biomedical Applications MBE 3 – MDBA II : The ATmega8 Basic Features (1)
Slides created by: Professor Ian G. Harris Interrupts  Embedded systems often perform some tasks which are infrequent and possibly unpredictable Hang.
A Few Words From Dilbert
Embedded System Design Laboratory October 11, 2002Stanford University - EE281 Lecture #4#1 Lecture #4 Outline Announcements Project Proposal AVR Processor.
ELE2MIC Lecture 21 The AVR Sleep Modes ATMEGA128’s Analog to Digital Converter –Features –Block Diagram –Clock Source –Input Sources –Interrupts –BandGap.
1 Lab 1: Introduction. 2 Configure ATMEL AVR Starter Kit 500 (STK500), a prototyping/development board for Lab1. ATmega16 ( V) is the chip used.
بسمه تعالي AVR Microcontrollers. The ATmega8 Basic Features -1.
Robotics Research Laboratory Louisiana State University.
Counter/Timer/PWM. incoming Lab. Counter counter is a device which stores the number of times a particular event or process has occurred synchronous/asynchronous.
MICROCONTROLLER SYSTEMS Part 1. Figure 1.1Elements of a digital controller CPU Central Processing Unit Input Peripherals Output Peripherals ROM Read Only.
Atmel Atmega128 Overview ALU Particulars RISC Architecture 133, Mostly single cycle instructions 2 Address instructions (opcode, Rs, Rd, offset) 32x8 Register.
Robotics Research Laboratory Louisiana State University.
AVR Programming: Interrupts September 17, What are interrupts? An asynchronous signal indicating the need for an event to be handled A synchronous.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
Chapter 7 Larger Systems and the PIC 16F873A The aims of this chapter are to introduce: The architecture of the 16F873A microcontroller; The 16F873A memory.
5-6 Memory Ref. Instruction
Interrupt. incoming Lab. Interrupt an asynchronous signal indicating the need for attention hardware interrupt/software interrupt call “interrupt service.
Teachers Name : Suman Sarker Telecommunication Technology Subject Name : Microcontroller & Embedded System Subject Code : 6871 Semester : 7th Department.
Computer System Architecture © Korea Univ. of Tech. & Edu. Dept. of Info. & Comm. Chap. 11 Input-Output Organization Input-Output Organization.
ECE 447 Fall 2009 Lecture 7: MSP430 Polling and Interrupts.
Interrupts  An interrupt is any service request that causes the CPU to stop its current execution stream and to execute an instruction stream that services.
Timers and Interrupts Mark Neil - Microprocessor Course.
Timers and Scheduled Interrupts
Chapter 5 - Interrupts.
KyungHee Univ. 1-0 Parallel Input/Output Controller (PIO)
Features of the PIC18 microcontroller - 8-bit CPU - 2 MB program memory space (internal 32KB to 128KB) bytes to 1KB of data EEPROM - Up to 4096 bytes.
EE/CS-352: Embedded Microcontroller Systems Part V The 8051 Assembly Language Interrupts.
Mark Neil - Microprocessor Course 1 Timers and Interrupts.
CS-280 Dr. Mark L. Hornick 1 Sequential Execution Normally, CPU sequentially executes instructions in a program Subroutine calls are synchronous to the.
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.
AVR Architecture Prepared By: Avdhesh Soni ( ) Sarthak Patel ( ) Akshay Parekh ( ) Fenil Sachla ( ) Guided.
80C51 Block Diagram 1. 80C51 Memory Memory The data width is 8 bits Registers are 8 bits Addresses are 8 bits – i.e. addresses for only 256.
INSTITUTE: INSTITUTE:PARUL INSTITUTE OF TECHNOLOGY BRANCH : BRANCH :B.E. E.C.5 TH SEM. SUBJECT:MICROCONTROLLER & INTERFACING TOPIC:AVR INTTRUPT TOPIC:AVR.
Chapter 11 INTERRUPTS PROGRAMMING
Embedded Systems Programming
UNIT – Microcontroller.
BITS EDU. CAMPUS , VARNAMA
Table 2. Microcontroller pin description[5]
Hardware Source: ttp:// under
AVR Addressing Modes Subject: Microcontoller & Interfacing
BVM Engineering College Electrical Engineering Department : Microprocessor and Microcontroller Interfacing Interrupts of 8051 Prepared by:
Interrupt Source: under
COMP2121: Microprocessors and Interfacing
The Arduino Microcontroller: Atmel AVR Atmega 328
Timer/Counter Modified from Dr. Lam Phung’s Slides.
ATmega103 Timer0 and Interrupts
Interrupt.
8259 PROGRAMMABLE INTERRUPT CONTROLLER
8-bit Timer/Counter2 with PWM and Asynchronous Operation
Lecturer: Reza Arjmandi Autumn 2015
Interrupt Source: under
8259 PROGRAMMABLE INTERRUPT CONTROLLER
Interrupt Source: under
Interrupt Chapter 10.
COMP3221: Microprocessors and Embedded Systems
Presentation transcript:

ATMega128 External Interrupt KyungHee Univ.

인터럽트의 개요 Interrupt의 처리 과정 Interrupt : 외부 장치의 요구에 의해서 현재 실행 중인 프로그램을 잠시 멈추고, Interrupt에 의하여 요구된 작업을 먼저 수행한 후에 다시 원래의 프로그램으로 복귀하여 실행 한다. 주변장치의 서비스 요청에 맞추어(동기 하여) 서비스를 실행 한다. Embedded System의 Program은 대부분 Interrupt Drive 방식으로 작성 한다. Interrupt의 처리 과정 Main Routine Interrupt Routine KyungHee Univ.

인터럽트의 처리 순서 2. Vector Table 참조 3. ISR으로 Jump 1. Interrupt 발생 Program Memory ISR 1 ISR 2 Empty 3. ISR으로 Jump 1. Interrupt 발생 4. ISR 종료후 원래 처리중인 Program 으로 복귀 KyungHee Univ.

ATMega128 Interrupt KyungHee Univ.

ATMega128 Interrupt KyungHee Univ.

PORTD 의 부가 기능 Port Pin Alternate Function(부가 기능) PD7 T2 (Timer/Counter2 Clock Input) PD6 T1 (Timer/Counter1 Clock Input) PD5 XCK1 (USART1 External Clock Input/Output) PD4 IC1 (Timer/Counter1 Input Capture Trigger) PD3 INT3/TXD1 (External Interrupt3 Input or USART1 Transmit Pin) PD2 INT2/RXD1 (External Interrupt2 Input or USART1 Receive Pin) PD1 INT1/SDA (External Interrupt1 Input or TWI Serial Data) PD0 INT0/SCL (External Interrupt0 Input or TWI Serial Clock) KyungHee Univ.

PORTE 의 부가 기능 Port Pin Alternate Function(부가 기능) PE7 INT7/IC3 (External Interrupt 7 Input or Timer/Counter3 Input Capture Trigger) PE6 INT6/T3 (External Interrupt 6 Input or Timer/Counter3 Clock Input) PE5 INT5/OC3C (External Interrupt 5 Input or Output Compare and PWM Output C for Timer/Counter3) PE4 INT4/OC3B (External Interrupt 4 Input or Output Compare and PWM Output B for PE3 AIN1/OC3B (Analog Compare Negative Input or Output Compare and PWM Output A for Timer/Counter3) PE2 AIN1/OC3A (Analog Compare Positive Input or USART0 external clock input/output) PE1 PDO/TXD0 (Programming Data Output or USRT0 Transmit Pin) PE0 PDI/RXD0 (Programming Data Input or USRT0 Receive Pin) KyungHee Univ.

External Interrupts를 사용 하기 위한 설정 INTn(n: 0-7) PD : PD0(INT0), PD1(INT1), PD2(INT2), PD3(INT3) PE : PE4(INT4), PE5(INT5), PE6(INT6), PE7(INT7), External Interrupt을 사용하기 위한 설정 사용하고자 하는 Port를 입력으로 설정 External Interrupt의 mode 설정 External Interrupt의 mask 설정 External Interrupt Mask Register 에서 사용하고자 하는 INT를 Set Interrupt를 Enable Status Register (SREG)의 I-bit를 Set 함 KyungHee Univ.

EICRA - External Interrupt Control Register A KyungHee Univ.

EICRB - External Interrupt Control Register B KyungHee Univ.

EIMSK - External Interrupt Mask Register INT7~0 Interrupt를 개별적으로 허용하는데 사용 허용 : 1 , 금지 : 0 INT7~0 Interrupt를 개별적으로 허용하고, 동시에 Status Register (SREG)의 I를 1로 Set 하여야 한다. EIMSK - External Interrupt Mask Register KyungHee Univ.

EIFR - External Interrupt Flag Register INT7 ~ 0 Pin에 Interrupt 신호가 입력되어 해당 Interrupt가 Trigger 되었음 표시 MCU이 Interrupt Vector 로 Jump하면 0으로 Cleared 됨 EIFR - External Interrupt Flag Register KyungHee Univ.

External Interrupt Program 예 cho_key_debounce cho_keypad_basic_ext_int cho_command_exec_real_time KyungHee Univ.