Questions tagged [interrupts]

A mechanism for the control of program flow in a computer. When interrupted a computer saves it's present operational state and changes to execution of code that is dependent upon which interrupt was generated. Interrupts can be either hardware-sourced or software-sourced; software-sourced interrupts are called traps. It is an alternate mechanism to polling and is the basis around which most I/O, multitasking and control is implemented.

Filter by
Sorted by
Tagged with
11
votes
5answers
16k views

What is the difference between Interrupt on Change and External Interrupt on PICs

What is the difference in function between IOC and EXT Interrupt on a PIC? I am currently using a PIC12F1822, and apart from the extra layer of checking you have to do with IOC (i.e. which pin caused ...
0
votes
2answers
2k views

Arduino UNO Timer issue

i seem to be facing a weird issue here. First time working with AVR timers. Basically what I am trying to achieve is to set timer2 (with prescaler val @ 1024) and use CTC mode (with val 78) to get 5ms ...
4
votes
4answers
2k views

Does an external interrupt interrupt ADC or does ADC stall interrupt?

I'm working on an RTC application with a 1Hz clock attached to the external interrupt pin on a PIC16f887. I also have continuous ADC operations happening along with the 1Hz clock. My question is ...
2
votes
1answer
3k views

STM32 NVIC interrupts after a reset / power-on

I have a few active-low signals that I want to interrupt on. During normal operation, the interrupts work just fine. However, on reset / power-on only rising edge is detected. In other words, on ...
-4
votes
1answer
190 views

Internal circuits in 8051 to handle an External interrupts0 and External interrupts1 [closed]

Can you explain me the internal circuits in 8051 to handle interrupts in 8051 external interrupt0 external interrrupt1 timer0 timer1 serial interrupt and also for reset with respect to 8051. hope, i ...
4
votes
1answer
5k views

How to use interrupts in micro C

I am making a robot which can follow lines, avoid obstacles and follow arrows. I wrote code for line following and arrow following but I don't know how to implement interrupts with more than two ...
-1
votes
1answer
261 views

Unusual behavior of external interrupts when switching other appliances on or off

I am using external interrupt on my microcontroller to interrupt on any level change. When I switch a lamp on an interrupt occurs which is not supposed to because it is not connected to my circuit. ...
7
votes
4answers
4k views

Good solution for more interrupts on an arduino?

I'm building a circuit with an Arduino Mega and simple IC chips (e.g. 7432) but I have many lines to monitor for interrupt conditions and not enough pins on the Atmel so I'm looking for a way to ...
2
votes
4answers
1k views

What can be the cause of an exceptionally large latency for the UART receive interrupt?

I receive data on the UART, using an 8-bit atmega, usually around 5 bytes connected, then a long pause. The total time for one byte (with start+stop bits, I don't use parity) is 160 us. However, the ...
2
votes
1answer
2k views

image distortion generating VGA signal on STM32 f4 using DMA

I'm trying to build a video generator using the STM32f4 (168MHz, using discovery board) + R ladder DAC to the VGA signal. The idea is not to be based on a framebuffer (this would limit the resolution ...
-2
votes
3answers
439 views

How to reverse the effect of an alarm?

I am wondering if it is possible to make an alarm that normally operates/sounds when electricity is flowing through a wire to do the complete opposite. The alarm sounds when there is a constant flow ...
7
votes
2answers
7k views

Define callbacks for interrupts

I am working with an STM32 and I am a bit confused about interrupts, specifically the Nested Vectored Interrupts (NVI). As I understand there is a NVI vector (called NVIC) where each interrupt has a ...
-2
votes
2answers
533 views

configuring UART as FIQ

I am working on LPC2468 and using UART0 of the controller for communication with sim300 gprs module. Sometimes if i send a command for reading the signal strength of the sim the input I receive is not ...
1
vote
1answer
1k views

Timer1 not running on PIC16F628

I have this little project that requires exact clock so I'm using 32768 Hz quartz on RB6 & RB7 on my PIC16F628. Both pins are grounded using 33 pF capacitors. My code that configures the timer1 ...
4
votes
4answers
1k views

Cleanest method for measuring the reported speed of multiple computer fans?

This question builds upon this previous one How to interpret output of 3-pin computer fan speed sensor? which was asking about the 'sense' wire output from computer fans. I am designing a fan ...
5
votes
1answer
4k views

PORTB Interrupt On Change changes state unintentionally

I am running below code in a PIC16F887 that runs at 20 MHz. I feed PORTB.0 a signal of 1 KHz from my signal generator. However, whenever the signal is low, ...
4
votes
1answer
3k views

Modifying Interrupt Vector Table of Atmega32

A project that I'm working on involves a cycle accurate interrupt service routine. This routine is written in AVR Assembly where I just wrote: ...
9
votes
4answers
34k views

How do I create a timer interrupt with Arduino?

I am trying to create a time delay interrupt with Arduino. I would like to use the interrupts() function, because it is an internal interrupt. Example: Let's say, I would like to make a light blink ...
4
votes
2answers
1k views

Moving the code and interrupt locations in Arduino

I need to be able to choose between two Arduino apps running on an atmega 1280 (megaavr) at boot time. Therefore I need to move one of those apps to a different location in program memory, and I need ...
10
votes
3answers
10k views

Critical sections on Cortex-M3

I'm wondering a bit about implementing critical code sections on a Cortex-M3 where exceptions are not allowed due to timing constraints or concurrency issues. In my case, I'm running an LPC1758 and I ...
5
votes
1answer
3k views

Overflow interrupt firing only once

I've run into an issue where, it appears, my interrupt only fires once, then simply refuses to fire again on my ATMega32U2. I have the following (stripped down) code: ...
2
votes
1answer
1k views

How to implement a synchronization signal with AVR (attiny45)?

In pseudocode I want to do following: ...
1
vote
2answers
2k views

Arduino - interrupt based decoding of serial data, race between ISR and loop()

Trying to decode serial data (encoded using proprietary method) from a RF module. Having switched back and forth between the fast-sampling (4x the fastest freq) and of late an interrupt based method, ...
1
vote
4answers
6k views

Interrupts with 16f887 and MPLAB

need some help with interrupts and the 16f887. I'm using MPLAB and writing my code in C. I am using the 44-pin demo board from Microchip. There is a push button wired to RBO/INTO which is normally ...
3
votes
2answers
204 views

PowerPC Interrupt Vector 0xfff00800

This is a long shot, and may come under fire as not being EE-enough of a question for this site, but what conditions will result in a PowerPC processor (e.g. Freescale 7448) taking a jump to address ...
3
votes
4answers
4k views

Arduino interrupts for button input

I have 6 buttons on my printed board, and I'd like to use interrupts on them all, but they don't correspond to the interrupts listed on the specs. Is it true that you cannot choose arbitrary pins to ...
3
votes
2answers
201 views

Making mesh sensor networks energy efficient

SCENARIO: Say you have a mesh network of sensors that measure something like ambient temperature. The nodes are out of range of the base station; however, there happens to be one intermediate node ...
8
votes
3answers
1k views

Measuring cpu load of interrupt routine

I have an isr that is updating a display at a fixed frequency. I would like to tune my routine to minimize overhead and keep as much cpu time as possible open for other processing, but I don't have ...
35
votes
4answers
120k views

What does edge triggered and level triggered mean?

I am studying 8085 microprocessor architecture and the word edge triggered and level triggered confusing me really very much. Can anyone explain me it in layman's words ? While studying the ...
2
votes
1answer
8k views

Interrupt handling for a UART on PIC32 with C32 v2.00 compiler

I am very new to PIC32 chips (or any PIC chips) and I am trying to create an interrupts handler for the UART to be called when the UART receive a byte. I am using the PIC32MX695F512L PIC32 processor ...
3
votes
1answer
1k views

What does granularity mean?

I was wondering what granularity means? It is used in the context of: A background task that performs a simple operation. The granularity of the background task, specifying the number of ...
4
votes
1answer
2k views

dsPIC33, SPI slave, and Timer1 interrupts. What happens?

I have an interesting problem with the dsPIC33FJ128GP802. I have it configured as a slave SPI device connected to an Arduino acting as the master. Timer1 is set up to trigger an interrupt at ...
2
votes
1answer
8k views

When Arduino catch interrupt, is noInterrupts() called?

I read the documentation about interrupts in Arduino and there is this example code: ...
11
votes
1answer
7k views

Arduino and Interrupts: Fast way to get pin values

I use an Arduino Uno and already set it up to work with interrupts on digital pins 2, 3, 4 and 5 according to an explanation1 I found. void setup() contains the ...
3
votes
1answer
719 views

MSP430 Illegal Instruction

A few questions here along the same lines, I'm looking at the datasheet for the MSP430x2xx family (I'm using the MSP430F235 FWIW). It says there in section 2.2.4 that "illegal instruction fetch" is an ...
1
vote
1answer
521 views

I having troubling understand what other interrupt firing besides TMR2 on PIC18f4550

I having troubling understand what other interrupt firing high_isr besides TMR2 on PIC18f4550. Way I detect it I set pin MY_DBG_PIN toggling everytime high_isr is activated, and from what I try to do,...
6
votes
1answer
6k views

Handling timer overflow and compare interrupts in ATMega328 (Arduino)

I'm trying to simulate PMW mode on multiple pins in software by controlling a Timer2. I'm using maximum prescaler value to get approximately 60 pulses per second when timer counts to its maximum ...
3
votes
5answers
538 views

ISR - Scope vs. Counter

I have a simple program basically increment the counter every time I get an interrupt. The code is something like this: ...
5
votes
3answers
1k views

What would be the best way to design a real time clock for the MSP430?

Basically that. The way I am doing it now is with the TimerA set to 1 second interrupts. But I think that it's very annoying. Are there any other ways to do it? I want to basically set timers on that ...
0
votes
3answers
3k views

PIC interrupt delay_ms

I'm using MikroC Pro, PIC16F1824 with XTAL 4Mhz. Basically I have 2 mode of LEDs. I use serial cable to send which mode to play. Mode 1 = On for 3 seconds and Off for 3 seconds. Mode 2 = On for 1 ...
9
votes
3answers
19k views

How are interrupt handlers implemented in CMSIS of Cortex M0?

I have a LPC1114 kit. Last few days I have been digging up CMSIS implementation of Cortex M0 to find how things are done in it. So far I understood how each registers are mapped and how I can access ...
2
votes
1answer
821 views

Writing to timer counter while timer is running

I'm using PIC16F1947 for a project. The project requires real time tracking so a stable 32768 Hz crystal is connected with the Timer1 oscillator. The Timer1 oscillator circuit and the crystal will ...
1
vote
1answer
499 views

Learning about the Interrupt system of the 8085 processor

I am trying to investigate the RST5.5, RST6.5, and RST7.5 interrupts on the 8085 microprocessor. I want to find information about the to the type of interrupting signal used and the built in ...
6
votes
2answers
2k views

Teensy USB Interrupts

I'm trying to learn about interrupts using one of the Teensy USB boards. It's got an AVR AT90USB1286 chip on it. I'm using the code below, and I'm expecting my ISR block to get called and periodically ...
5
votes
3answers
2k views

Stepper Motor Control Timing

I have a question regarding stepper motor control while using the TCP/IP stack. In the past I have used a timer for my stepper motor control. I set the period of a timer to the required time between ...
8
votes
1answer
5k views

Bug in Keil ARM compiler with interrupt handlers and C++?

I have a problem with writing interrupt handlers in Keil ARM compiler for LPC1114. When I write program in C++ and specify --cpp compiler option all code from interrupt handlers disappears, it is ...
3
votes
2answers
5k views

Does anyone have any examples or suggestions utilizing Atmel's ATMEGA2560 and external interrupt's?

I am trying to utilize an ATMEGA2560 and it's interrupt. I have some code that must execute until a button is pressed at which time I need the code to stop and wait for another button press to ...
2
votes
4answers
2k views

What is the ISR for the comparator change interrupt on a dsPIC33F?

I'm asking for the ISR name for the comparator interrupt for a dsPIC33F. I've tried _CompInterrupt, _CMInterrupt and _CMPInterrupt. All three bring up warnings about non-existent ISR names. I can't ...
2
votes
1answer
1k views

Increasing the delay using 'option' register in Pic16f877a

I have learned that the maximum 'delay' possible in pic16f877a running with a source of 11.0592MHz (11059200 / 4 actually) is 23 ms.. without using software delays (delay_ms( )).. the calculation was ...
4
votes
5answers
5k views

USART transmit problems on a PIC

I'm trying to send data to an SD card from a PIC18f4580, but the PIC is not sending what it should be. related global variables: ...