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 dependant upon which interrupt was generated. Interrupts can be either Hardware sourced or software sourced. It is an alternate ...

learn more… | top users | synonyms (1)

2
votes
2answers
61 views

Using bit fields in interrupt-driven applications

When implementing interrupt-driven applications I usually create a bitfield to keep track of different interrupts. For example: ...
0
votes
0answers
33 views

How can I measure RPM without interrupts (or a secondary I/C)?

I have an arduino project that is precisely controlling the ignition of a sparkplug in my exhaust to shoot flames (Flameduino). I'm using the arduino's microcontroller to very precisely control ...
0
votes
0answers
28 views

Cannot read PORTB from ISR [duplicate]

I am trying to interface an ultrasonic sensor to Atmega328P (arduino uno). I have connected ECHO pin of the sensor to PORTB and used pin change interrupt on this pin. Inside the ISR I try to read ...
5
votes
3answers
176 views

Is disabling time sensitive interrupts in C a bad idea?

I sometimes see code that disables interrupts, for example to perform a non-atomic read/write to a global variable used in an ISR. On AVR with gcc, this may look like: ...
0
votes
2answers
48 views

Difference between priority and vector table

Is their any difference between interrupt vector table and priority table. Does the vector node simply tells its priority? Here is the vector table:
0
votes
1answer
72 views

Systick in interrupt using FreeRTOS

I need to count how many miliseconds does it take my interrupt to finish its service. Before I started using FreeRTOS, I just did something like this: ...
0
votes
0answers
61 views

What's the benefits between different interrupts on Arduino [migrated]

On an Arduino you can have several different interrupt types, two of them being RISING and FALLING. Looking past that RISING is from LOW to HIGH, and FALLING is the opposite, what are the benefits of ...
-2
votes
0answers
55 views

level vs edge sensitive interrupts

I have several questions (this is for x86 architecture, but feel free to tell me how it's done in other architectures): Are the interrupts latched? If for example an edge sensitive interrupt can't ...
0
votes
1answer
15 views

sam3x8e gpio interrupt not working as expeced

I working on sam3x8e processor with atmel studio 6.2. I have configured two gpios for interrupt on falling edge as follows: ...
0
votes
1answer
30 views

PIC24F: RPINR0 register

Im new to PIC. Im working on PIC24FJ64GA002 PIC. Can any one pls explain how below code says "set RP10 to external interrupt"? ...
-1
votes
1answer
60 views

Is it possible to set interrupt priorities to software interrupts in ARM?

Is it possible to for example give SWI 0x1 a priority of 15 and SWI 0x2 a priority of 16? If yes, is this useful? I understand why giving hardware interrupts a different priority is useful, but is it ...
0
votes
1answer
37 views

8259A End of Interrupt (EOI) signal question

In the x86 architecture, when a hardware interrupt's ISR finishes you need to tell the 8259A chip that it is done and you send an EOI signal to the chip. After that you can return from the ISR using ...
-1
votes
0answers
22 views

How I can include interrupt for the unipolar stepper motor?

I use limit switch to control my stepper motor. ...
4
votes
1answer
148 views

Interrupt never fires

I'm new to embedded and I've been struggling with this for days. I just don't understand why this doesn't work. I'm using an ATxMega128A1. I want to use a timer overflow interrupt to left shift a bit ...
0
votes
1answer
43 views

Problem with XC8, RX interrupt [PIC18F4550]

I have a problem with my interrupt and I don't know why. I want to use an interruption each time I receive a data from my RX port. So, I used the interrupt on the port RX of my microcontroller. My ...
0
votes
1answer
37 views

What is a good strategy to read many button inputs while still doing USB?

I am trying to design a USB joystick with many different buttons. The board I am using right now has an ATmega32U4, USB port, and 16 I/O pins. I am using LUFA for a USB stack. I know that I can get ...
0
votes
0answers
13 views

EINT ( Ext interrupt ) of LPC2138 is not getting low

I am using interrupt for touch sense TFT LCD application, where touching on LCD makes transition (on EINT pin) from high to low ( 3V to 0V ) and touch sense controller is through SPI interface to ...
0
votes
2answers
37 views

Tm4c nested uart interrupts- does each com finishes it's run before the next one executed?

Board: Tiva™ C Series TM4C1294 EK-TM4C1294XL My program is listening to 2 UART ports (UART 3 and 7) I've encounter a problem that I'm losing some bytes received and I'm suspecting that this issue ...
1
vote
1answer
43 views

AVR: Interrupt build error

I am trying to learn how to use interrupts for a project using an Attiny85. I have written a simple program from what I have learned from tutorials. However when I try to build the program in Atmel ...
3
votes
2answers
136 views

Race condition in AVR timers

I'm trying to implement a global timer, so that I can call time_us() anywhere in program and the function will return microseconds since program start. I've done this using TIMER2 (8-bit clock) and ...
1
vote
1answer
100 views

Can't get AVR pin change interrupt to work

I'm trying to get a pin change interrupt on an Attiny2313 to work but i'm stuck, the interrupt is not triggering. I'm using the following code in main(): ...
1
vote
2answers
80 views

CCS PIC C: What is the difference between #INT_TIMER0 and #INT_RTCC?

In CCS PIC C Compiler, there are two interrupts and both are tied to Timer0 overflowing. These are called #INT_TIMER0 and #INT_RTCC. What does RTCC mean and is #INT_TIMER0 not sufficient?
3
votes
2answers
333 views

NVIC on ARM CPUs

Can we look at NVIC peripheral on ARM CPUs like some sort of thread? Main application is executing, and at the same time NVIC peripheral doing her own work? Or all of that is single thread ...
0
votes
0answers
106 views

Arduino UNO R3 (clone), ESP8266, false interrupts from opto-interrupter

simulate this circuit – Schematic created using CircuitLab i'm facing false interrupts from opto-interrupter scavenged from old mice, when wifi module ESP8266-01 is connected to arduino. ...
0
votes
0answers
43 views

Timer Interrupt for Case Statement

I have 3 states for a motion control system in a case: Accelerate, Steady, Decelerate. We start in the the accelerate case and when certain conditions are met, we move to the next state, etc. How can ...
0
votes
2answers
77 views

I2C on atmega168/328 using interrupts

I have the following I2C configuration with an ATmega168 (1 MHz) as the master and an Arduino Uno (16 MHz) as the slave. The command for the LED connected to the slave comes from the master and ...
0
votes
3answers
67 views

Appropriate Method of Counting counts from a Quadrature Encoder

I'm using an Mbed to drive a DC motor which will follow a trapezoidal trajectory. What is the most appropriate way to determine position from the quadrature encoder? Should I use interrupts, or is ...
0
votes
2answers
107 views

How to correctly wire an interrupt pin, clock pin, PWM pin, SPI pin

I've a question about how to correctly wire some microcontrollers pins. In particular: Interrupt pin on microcontroller (pull up/pull down resistor and with which value) Output clock pin from a ...
0
votes
1answer
91 views

Atmega Microcontroller interrupt delay function on button press

I am using Atmega32A and I have 2 LEDs. Here's step by step what I want to do When the MCU is powered, I have one LED lit (PC0) When click on a button (PD6) the second LED at (PC1) is lit and the ...
0
votes
2answers
50 views

Two limit switch signals affecting each other

I'm trying to make circuit which will allow me to sense some platform presence at the ends of some rail. I'm using the limit switches, here is schematic: SENS-* signals connected to MCU pins, that ...
4
votes
3answers
518 views

What's the actual difference between Edge sensitive and Level sensitive interrupts

Currently I'm working on a C8051F120 MCU where External Interrupts can be defined in two ways: Edge sensitive (Falling) Level sensitive (low-level) In level-sensitive interrupts as soon as the MCU ...
0
votes
2answers
129 views

Determine input frequency of square wave w/ ICR in Atmega328p

I'm trying to obtain the input frequency of a square wave using the input capture register of an Atmega328p. So far, it works sporadically -- which is to say, when I input a 75 kHz square wave, the ...
2
votes
1answer
79 views

PIC16 I2C interrupt does not occur if serial port enabled

I'm using a PIC16F1825 mid range PIC and I've used it with a UART and SPI for a good while without issues. When I added code to handle I2C (instead of SPI - it's either one or the other on this PIC) I ...
1
vote
3answers
139 views

Computer peripherals to immediately (<5ms) detect digital input state change in C# programs

The C# application I'm working on needs to be able to be able to call a function within 5 milliseconds of a digital input signal's state change (0V = off, 5V = on). Rather than using software to ...
0
votes
1answer
18 views

ATtiny861 pin change interrupt on PA.2: error in datasheet?

I faced with some confusion in subject datasheet: In one section PA.2 should be masking by PCIE1 bit as PA.2 is PCINT2 input and it should be within PCINT[7:0] and PCINT[15:12] range: On the other ...
1
vote
1answer
49 views

Configuring the rate of Timer interrupts for the STM32F4xx Discovery Board

I'm working on a project with the STM32F407 board and Keil, and as part of a larger project I'm working on I need to configure a timer interrupt. Eventually it will run at around 46 kHz, but for now ...
0
votes
1answer
61 views

Simple Interrupt Handling program?

I'm new to Embedded programming and I'm trying to understand how Interrupt handlers work in different contexts/scenarios. I just want to know how a interrupt handler would work in the following ...
0
votes
0answers
35 views

Systick Timer problem

I am trying to use the systick timer to update a variable which stores millisecond elapsed on a STM32F051 in Coocox ide 1.7.8 . I also want I2C and UART communication in my project. I managed to get ...
1
vote
0answers
68 views

STM32F051 TIMER2 INTERRUPT PROBLEM

I would like to get TIMER 2 working for stm32f051 microcontroller in coocox IDE(1.7.8) . The problem i am facing is that as soon as I enable the intrrupt for TIMER 2 using NVIC_EnableIRQ(TIM2_IRQn) ...
0
votes
1answer
69 views

AVR global variable modified by interrupt not persistant

Using an ATmega328p, I'm running into a problem when I make an interrupt (INT0 or INT1) active, the code will execute just fine (MusicOnLed and FadeOnLed functions will execute), however as soon as I ...
0
votes
0answers
93 views

PIC18: I2C with external triggered interrupt stuck in ISR

I am trying to implement a simple, external, pushbutton trigerred I2C communication between a PIC18F46K22 and a ST LSM330D MEMS sensor. I tried to find straightforward libraries for the easy ...
1
vote
2answers
167 views

Arduino analog interrupt LDR

I am using an LDR on an Arduino Pro Mini with an analog interrupt. The Arduino goes to deep sleep when there is no light or it's not busy: Sleepy::powerDown(); ...
0
votes
1answer
86 views

Atmega2560 Usart Interrupt problem

When I send any data from serial port, RX pins are flashing but ISR is not running. Here is my code. ...
4
votes
2answers
203 views

Interrupt fails to change variable, how so?

Problem was virtually undebuggable, the interrupt that was changing a variable would randomly fail to do so, with no apparent pattern; within interrupt code variable would change but outside of it the ...
3
votes
1answer
176 views

PIC18 High Priority Interrupt doesn't Interrupt the Low one (xc8)

I was trying to learn and implement the priority property of interrupts on PIC18F46K22 uC. I use MPLABX and XC8 compiler. In my code (transformed from a sample code), I have one external interrupt ...
0
votes
1answer
47 views

PIC18 IO polling

I just recently decided to migrate an existing design which was based on Interrupt on change pins to standard IO polling due to some constraints in the part that I was using. I am trying to figure out ...
0
votes
0answers
41 views

PIC18 Interrupt on change vs polling

I am currently using a PIC16 part whose entire PORTB ports have the Interrupt on Change feature. I am forced to migrate to the PIC18 part as I gain more GPIOs but only the upper 4 bits of the PORT B ...
1
vote
1answer
63 views

Interrupt on the XMEGA

I have 3 buttons connected to PIN1, PIN3, PIN5 of PORTA of an XMEGA. If pushed they deliver a falling edge. I'm try to generate interrupt using those buttons, I started with one, here is what I ...
0
votes
1answer
217 views

AVR Timer1 OCR1A controls TIMER1_COMPB_vect interrupt!

I was struggling with timer interrupts in my project. I couldn't make it work properly. So I decided writing a simple code and I saw a very interesting case. ...
1
vote
3answers
197 views

PIC32, XC32, timer interrupt vector not entered

I have the below timer 5 interrupt vector that is not entered, even when both the corresponding Interrupt enable bit for timer 5 is set, and the corresponding interrupt flag for timer 5 is set. Here ...