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 ...
2
votes
1answer
43 views
AVR Interrupt “Interference”
I'm currently working on receiving signals from an RC remote. I have used pins A8 to A15 on my Arduino Mega board.
The ports and interrupts are setup with the help of this code:
...
4
votes
1answer
43 views
ATtiny45 pin change interrupt PB5?
On the ATTiny45 data sheets it states that PB5 can be used as a digital IO pin and I want to use it to trigger a pin change interrupt, my only issue is that it is also the reset pin and the moment I ...
0
votes
1answer
60 views
MikroC Hardware Interrupt
I am trying to program a PIC 16F876A using mikroC. I need the program to run when I push a button to a certain point, stop and wait till the button is pushed again before finishing.
...
3
votes
2answers
86 views
Sending a rapidly changing variable through SPI
I am trying to send the value of a counter running in timer1(32bit) to another chip, ideally through SPI. The timer triggers an interrupt every 1ms to increment the counter. Overall, the variable ...
0
votes
1answer
37 views
AVR Timer for PWM and interrupt?
I am developing a system that needs to drive 4 stepper motors through 4 dual H-bridges, for each phase of movement the AVR will receive SPI messages stating how many steps each motor should do and ...
0
votes
1answer
32 views
Atmega169PA interrupt source
Is there a simple way of determining which module causes an interrupt on an ATmega169PA? I have 3,000 units executing the same code and there were 10 units that executed my ISR(BADISR_vect) handler ...
1
vote
2answers
80 views
Why vectored interrupts are not possible?
vectored interrupts are not possible if a cpu has single interrupt request line and single interrupt grant line while multiple interrupting devices are possible .
Is the above statement is correct ...
2
votes
1answer
130 views
Migrated from C18 to Hi-Tech C 18.. Interrupt not working
Here is my source code. This code is working perfectly fine in C18 Compiler. Not until I migrated to Hi Tech C. It does not enter the interrupt service routine. Moreover, it somehow corrupted sid ...
3
votes
1answer
229 views
PIC: how to set timer0 to give an interrupt at every 1 sec?
I am programming a PIC18F67K22 and I've set it to use a 16X4Mhz Internal RC oscillator with PLL enabled.
-High level interrupt on TIMER0 overflow
-I am using ...
0
votes
0answers
22 views
Trigger button press via mspdebug
I am experimenting with a MSP430 (inside a eZ430 Chronos), and I’d like to debug my code while the device is attached to the USB debug board. It seems that the buttons do not work while the device in ...
0
votes
1answer
279 views
AVR Atmega8 USART and ADC and PWM
I have created 2 different PWMs using timer 1 and 2 on ATmega8, that is used to control a linear motor. I'm using a hall effect sensor to detect changes in voltage as the linear motor moves left and ...
3
votes
1answer
106 views
Handling multiple interrupts dsPIC
I have been thinking about my design for a while but couldn't figure out a better way to deal with buffer overrun in multiple interrupts.
A dsPIC33EP chip is connected to a TFT display, a UART ...
1
vote
1answer
83 views
Is USB a switched network?
I recently explained to someone why USB before 3.0 must use polling as opposed to interrupts here. Basically, from my understanding of I2C, USB is also a master slave architecture sharing a cheap 1 ...
5
votes
1answer
193 views
Correct usage of a pin change interrupt
I'm trying to use pin change interrupts to detect pressed buttons. Until now I have never worked with these kind of interrupts and there are some problems, so I want to make sure if this is the ...
1
vote
1answer
209 views
How do I detect 1-Wire peripherals without constant polling?
I'm looking to bit bang 1-Wire from an Atmega uC. My design calls for the Atmega (acting as Host) to detect the presence of a single 1-wire eeprom when it's physically connected to the uC.
I don't ...
3
votes
1answer
160 views
Why UART Interrupts are not working properly in dsPIC?
Hello I am working with the UART1 module in a dsPIC33FJ128GP802 but it is not working as expected using XC16 compiler. Here is my initialization code and interrupt routine, the ...
2
votes
1answer
73 views
Why does DSPIC33F restarts when timer interrupt flag is addressed?
I have a peculiar problem with the timer on the DSPIC33F. I need to create a delay function and I have decided to use Timer 2 to count the number of instruction cycles. The function would enable the ...
3
votes
4answers
294 views
Is it possible to have multiple ISR routines for a single timer in micro controller?
I have doubt that micro controller will support multiple interrupt routines for a single timer.
For example, single timer which interrupts at 5ms, 10ms, 1s etc. In my design I am using 3 timers: one ...
1
vote
3answers
88 views
What's The fundamental difference between interrupts and delay in embedded programming?
I'm new in embedded programming in C, just getting to understand coding.
Is there a fundamental difference between an interrupt function and a delay function?
I would greatly appreciate answers with ...
1
vote
1answer
236 views
What do the different interrupts in PCIe do? I referring to MSI, MSI-X and INTx
We have the following interrupts: MSI, MSI-X and INTx. What do these different type of interrupts do in PCIe? I only need a short description. I only know that in PCIe interrupts are generated as ...
2
votes
1answer
663 views
STM32 Interrupt Priority (preemption) Problems
I have another problem (High resolution system timer in STM32) which I have tracked down (mostly) to this issue, and have created a test case here for the simplest STM32 processor I could find (on the ...
2
votes
2answers
575 views
How many external interrupts has attiny85?
The title is quite self descriptive. I ask this question because I found contradicting information in the atmel web page. I need two external interrupts to control one rotary encoder. One interrupt ...
0
votes
3answers
155 views
5V Arduino interrupt from a 3.3V device
I m trying to trigger an Arduino Mega interrupt pin from a 3.3V sensor.
This voltage doesn't seem to be enough, since Arduino recognizes the interrupt only when I move the wire (probably since it ...
0
votes
1answer
48 views
Value of the link register when interrupt occurs
and reading the exception and interrupt handling chapter
of the ARM system design book.
I have noted that link register is not always pointed to the next resume
instruction. So it should be added or ...
3
votes
1answer
557 views
Using ADC interrupts and TIMER interrupts at the same time
I'm a programmer and not jet experienced with arduino or any microcontrollers. Especially the technical side.
I soldered a 6x8 RGB Led Matrix and use binary coded modulation ...
0
votes
1answer
264 views
STM32 I2S Interupt Usage
I was trying out a sound experiment, starting off with sample code which sent data to the Discovery F4's audio codec using I2S. The sample code used polling in the main loop and sent data when the ...
3
votes
1answer
256 views
Calculate exact timer frequency for ATTiny
Trying to wrap my head around these overflow timers for the ATTinyx5 (45 in this particular case). I seemed to have a great handle on it with the ATMega328 but I cannot get it to work the way I want ...
3
votes
3answers
318 views
AVR ADC performance: interrupts vs. manual conversion
I have a device on ATMega16 microcontroller that is supposed to constantly send ADC measurement results over USART. The controller is operating at 16MHz with an external crystal and ADC prescaler is ...
1
vote
1answer
84 views
Cortex-M0 interrupt nesting
Question 1: When one interrupt handler is executed, will it be interrupted if another interrupt with the same priority occurs?
Question 2: When one interrupt handler is executed, will it be ...
0
votes
4answers
205 views
Timer on PIC18 not getting close to desired interrupt period time
I tried to setup Timer0 on a Microchip PIC18F46K22 so that it will trigger an interrupt and toggle an LED. However, it takes at least 42 µs for the LED to toggle.
At an increment rate of Fosc/4 (= 8 ...
1
vote
2answers
315 views
Multiplexing AVR (ATMega328) PWM within Interrupts
I'm trying to take 3 common anode RGB LEDs and hook up the cathodes of each to three of the PWM outputs on an ATMega328p and then in an ISR, multiplex between them all. The problem I'm running into ...
3
votes
1answer
98 views
8051 interrupt priority level significance
I am working with P89V51RD2 which is a 80C51 micro-controller. It has Eight Interrupt Sources and Four Priority Levels.
In the above table, there is a column Service Priority which sounds like ...
1
vote
3answers
150 views
Interrupt being called before complete execution of ISR
What happens when an interrupt is called again before the execution of the ISR is completed?
4
votes
3answers
403 views
How to cut interrupt code to minimum?
I have some interrupt let's say from UART to make a real example:
...
0
votes
1answer
120 views
Implementing interrupts on a PIC16
We are trying to build an RC interface to transform a PPM signal from the RC (remote control) into a PWM signal for motor controls. The idea is to build a 2-channel robot that goes forward % back, ...
3
votes
1answer
285 views
PIC interrupt based soft UART timing trouble
I've tried to implement a software UART on a PIC18F452 using TIMER0 interrupts and I can't get the timing working.
I'm using MPLAB ASM for compilation and the PICkit2 for programming.
...
3
votes
2answers
324 views
Use PWM and ISR at same time on AVR
Is it possible to use AVR PWM outputs and ISR interrupts at the same time?
I've got a project I'm trying to do on an ATMega328P and I need 3 PWM outputs but ALSO need to be able to use ISR interrupts ...
2
votes
2answers
174 views
How to use electrically isolated weak signal for Arduino interrupt?
I'm trying to use the signal generator from a DSO Nano v2 to drive an Arduino interrupt for testing purposes. I have measured the output of the signal generator at approximately 13mA @ 2V DC.
I have ...
1
vote
0answers
283 views
Msp430 I2C Single Byte Read Write
I have this code I've been working on that connects an ITG-3200 gyroscope slave and MSP430G2553 master via I2C bus. It was working fine yesterday but somehow today it is not working. I tried to debug ...
3
votes
3answers
1k views
PIC18 USART Interrupt for reception, doesn't trigger
I have set up the Enhanced USART module for a PIC18F4331 and have been trying to do a loop test. I am using MPLABX, programming in XC8, using Pickit3 for debugging and monitoring serial pins with an ...
2
votes
2answers
302 views
Understanding volatile class fields in AVR C++ programs
I'm having some confusion about what members to declare volatile in a program I'm writing in C++ for an AVR microcontroller, with interrupts. When it's plain C it makes sense - the compiler doesn't ...
3
votes
1answer
35 views
5
votes
2answers
98 views
How can I control things without using delay?
I have always hated that you couldn't do other things while you used the delay(); function. However, I want to blink a LED or do whatever while using serial, but ...
4
votes
4answers
543 views
Implementing an I2C buffer in C
I'm implementing a read-only I2C slave on a PIC18F4620. I have made a -working- ISR handler for the MSSP module:
...
3
votes
1answer
298 views
Would a high priority interrupt interrupt another high priority interrupt?
In the datasheet of the 18F4620 and others, section 9.0 (page 91), I read:
The PIC18F2525/2620/4525/4620 devices have multiple interrupt sources and an interrupt priority feature that allows most ...
1
vote
2answers
180 views
Function called in ISR and Overlay Directive -Keil / 8051 core
My C code has an ISR, where a decision has to be made to execute a particular function "A". Now I know that its not good to run a function in an ISR. But in this case of my application, I do not see ...
3
votes
1answer
429 views
AVR Measuring frequency using external interrupt - where are my cycles going?
I'm using an external interrupt to measure the frequency of a signal, the AVR clock is at 8MHz. I'm essentially counting the ticks between pin toggles using a 16 bit timer (with some handling for ...
0
votes
3answers
173 views
Interrupt when a variable passes a threshold
I am programming the code for a LM4F120 Stellaris Launchpad, and I need a method to activate a software interrupt when the value of a particular variable exceeds a predefined threshold value. When the ...
5
votes
2answers
749 views
AVR interrupt service routine not executing as fast as expected (instruction overhead?)
I'm developing a small logic analyzer with 7 inputs. My target device is an ATmega168 with a 20MHz clock rate. To detect logic changes I use pin change interrupts. ...
0
votes
0answers
180 views
Simple PIC18 USART Interrupt not working
Edit
So talking to the duck and some more searching here seems to have solved it. On power on and reset, ports are set to be analog. I now disable this in my setup. It was a problem between this ...