• Home
  • About Us
  • Contact Us
Semiconductor for You
  • Home
  • Semiconductor News
  • Technology
    • Automotive
    • Consumer Electronics
    • IoT
    • Lighting
    • Power Management
    • Wireless
    • Personal Electronics
    • Hardware & Software
    • Research
    • Medical Electronics
    • Embedded Design
    • Aerospace & Defence
    • Artificial Intelligence
  • DIY Projects
  • Market
  • Industries
    • Renesas Electronics
  • Knowledge Base
  • Events
  • Tools
    • Resistor Color Code Calculator
No Result
View All Result
  • Home
  • Semiconductor News
  • Technology
    • Automotive
    • Consumer Electronics
    • IoT
    • Lighting
    • Power Management
    • Wireless
    • Personal Electronics
    • Hardware & Software
    • Research
    • Medical Electronics
    • Embedded Design
    • Aerospace & Defence
    • Artificial Intelligence
  • DIY Projects
  • Market
  • Industries
    • Renesas Electronics
  • Knowledge Base
  • Events
  • Tools
    • Resistor Color Code Calculator
No Result
View All Result
Semiconductor for You
No Result
View All Result
Home Knowledge Base

Basic of Interrupts

Mrinali Sharma by Mrinali Sharma
October 18, 2022
in Knowledge Base
0
ADVERTISEMENT
  • An interrupt is a signal to the processor emitted by hardware or software indicating an event that needs immediate attention. Whenever an interrupt occurs, the controller completes the execution of the current instruction and starts the execution of an Interrupt Service Routine (ISR) or Interrupt Handler.
    1. Hardware Interrupts
    2. Software Interrupts
  • A hardware interrupt is an electronic alerting signal sent to the processor from an external device, like a disk controller or an external peripheral.
  • For example, when we press a key on the keyboard or move the mouse, they trigger hardware interrupts which cause the processor to read the keystroke or mouse position.
  • A software interrupt is caused either by an exceptional condition or a special instruction in the instruction set which causes an interrupt when it is executed by the processor.
  • For example, if the processor’s arithmetic logic unit runs a command to divide a number by zero, it causes a divide-by-zero exception, thus causing the computer to abandon the calculation or display an error message.

Execution of Interrupt:

Steps to Execute an Interrupt

  • The microcontroller closes the currently executing instruction and saves the address of the next instruction (PC) on the stack.
  • It also saves the current status of all the interrupts internally (i.e., not on the stack).
  • It jumps to the memory location of the interrupt vector table that holds the address of the interrupts service routine.
  • The microcontroller gets the address of the ISR from the interrupt vector table and jumps to it. It starts to execute the interrupt service subroutine, which is RETI (return from interrupt).
  • Upon executing the RETI instruction, the microcontroller returns to the location where it was interrupted.
  • First, it gets the program counter (PC) address from the stack by popping the top bytes of the stack into the PC. Then, it starts to execute from that address.

TRIGGERING:

Level-Triggered:

  • A level-triggered interrupt module always generates an interrupt whenever the level of the interrupt source is asserted.
  • Level-triggered interrupts force firmware engineers to take into account what is generating the interrupt source. If the interrupt source is just a pulse from a state machine, then the device drivers do not need to do any additional work.

Edge-Triggered:

  • An edge-triggered interrupt module generates an interrupt only when it detects an asserting edge of the interrupt source.
  • The edge may be detected when the interrupt source level changes, or it may be detected by periodic sampling and detecting an asserted level when the previous sample was deserted.


Interrupts can be generated from several sources:

  • The timer interrupts one of the Arduino timers.
  • External Interrupts from a change in the state of one of the external interrupt pins.
  • Pin-change interrupts a change in the state of any one of a group of pins.
Content Protection by DMCA.com
Mrinali Sharma

Mrinali Sharma

Browse by Category

  • Aerospace and Defence
  • Articles
  • Automotive
  • Consumer-Electronics
  • Hardware & Software
  • Interview
  • IoT
  • Knowledge Base
  • Lighting
  • Market
  • personal-electronics
  • Power Management
  • Research
  • Semiconductor Events
  • Semiconductor News
  • Technology
  • Wireless
Semiconductor for You

Semiconductor For You is a resource hub for electronics engineers and industrialist. With its blend of
technology features, news and new product information, Semiconductor For You keeps designers and
managers up to date with the fastest moving industry in the world.

Follow Us

Browse by Category

  • Aerospace and Defence
  • Articles
  • Automotive
  • Consumer-Electronics
  • Hardware & Software
  • Interview
  • IoT
  • Knowledge Base
  • Lighting
  • Market
  • personal-electronics
  • Power Management
  • Research
  • Semiconductor Events
  • Semiconductor News
  • Technology
  • Wireless

Recent News

New SPI Absolute Encoder Supports 9 mm to 15.875 mm Motor Shafts

New SPI Absolute Encoder Supports 9 mm to 15.875 mm Motor Shafts

June 11, 2025
Infineon Secures the Future with 10 Billion Integrity Guard Chips Delivered

Infineon Secures the Future with 10 Billion Integrity Guard Chips Delivered

June 11, 2025
  • About
  • Advertise
  • Privacy & Policy
  • Contact

© 2022 Semiconductor For You

No Result
View All Result
  • Home
  • Semiconductor News
  • Technology
    • IoT
    • Wireless
    • Power Management
    • Automotive
    • Hardware & Software
  • Market
  • Knowledge Base
  • Tools
    • Resistor Color Code Calculator

© 2022 Semiconductor For You