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 ...
3
votes
1answer
70 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
86 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 ...
-8
votes
0answers
51 views
Assembly language programme Intrupts, INT 21H and INT 10H [closed]
Write a programme (assembly language 8086) that it will read some numbers from the keyboard, if we input a random number then corresponding message should be the output The messages are
If the number ...
1
vote
2answers
71 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
48 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 ...
2
votes
2answers
118 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
137 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
9 views
4
votes
2answers
14 views
How can I control things without using delay?
I have always hated that you couldn't do other things unless you used the delay(); function. However, I want to blink a LED or do whatever while using serial, but ...
3
votes
4answers
263 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:
...
2
votes
1answer
79 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
65 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
161 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
142 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
325 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
109 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 ...
0
votes
0answers
471 views
Understanding Timers, Counters and Prescaler Registers on the STM32
So I'm trying to set up a very simple periodic interrupt on my STM32VL-Discovery board using the libopencm3 libraries on linux. I've looked at the documentation and I just want to verify with ...
7
votes
2answers
263 views
Any reason not to use Timer0 on AVR?
Just a basic question... For arduino/avr/ATMega328 I find lots of examples using Timer1 (there's even a whole library for it) but rarely any that utilize Timer0 (or Timer2).
Now, I know that using ...
1
vote
3answers
259 views
Dimming multiplexed LEDs
I'm multiplexing 32 LEDs in a 4:8 configuration on an ATMega328 and am trying to dim them with what is probably a completely naive understanding of PWM. Note: I'm multiplexing them directly with 12 ...
3
votes
3answers
170 views
PIC - Time to enter the interrupt
I am using the PIC18F2550 and I wanted to know how much time takes between an event happens (e.g. ADIF)and the interrupt routine starts. In other words, how much time the "interrupt system" takes to ...
5
votes
1answer
417 views
Interrupt Service Routine in C - function at specific address
I need to add an Interrupt Service Routine (ISR) to existing code in C for a PIC18F4620 and a PIC18F46K22. As you can see in section 9 (of both datasheets), these devices have multiple interrupt ...
1
vote
1answer
39 views
DSPIC30f timer1 not trigger everytime on POR
I am using timer1 on DSPIC30f4011 to generate an interrupt every one millisecond. However, the timer1 ISR is not executed every time on POR (2 out of 10 times). If I turn on the power for the chip and ...
13
votes
2answers
254 views
Is SPI safe to be interrupted?
I'm writing to a microSD card from within my firmware, but it's the lowest priority task, so it can be interrupted by other tasks while it's in the middle of reading/writing.
Now suppose I ...
2
votes
1answer
186 views
Timer overflow on MSP430
I'm using an interrupt to wake the microcontroller once the value has been reached. I see that in the Capture/Compare Control Register there is a Capture Overflow bit. I can't seem to find an example ...
5
votes
2answers
677 views
Using multiple external interrupts in PIC
I've used PIC16F877 (datasheet) for several projects. For a single external pin change interrupts, you can use PORTB0 interrupt. ...
5
votes
2answers
230 views
Need help understanding Ultra Low Power Wakeup on PIC16F887
I am trying to implement the "Ultra Low Power Wake Up" feature on a small PIC project. The idea is the chip will go to sleep, and then be woken up in the future by the ULPWU interrupt.
The idea ...
2
votes
1answer
222 views
How does writing to output pins on PORTB affect RBIF interrupt on PIC16F877
I have a PIC16f877 with PORTB configured as follows:
RB0 Output
RB1 Output
RB2 Output
RB3 Output
RB4 Input
RB5 Input
RB6 Output
RB7 Output
RB4..5 are used for ...
0
votes
2answers
577 views
PIC: Global variable not modified inside interrupt handler
I have an interrupt handler for my PIC 16 that should modify a global variable. The global variable is then read by main() in an infinite loop.
For some reason, it ...
2
votes
2answers
119 views
Handling interrupts during device communication
I have the following situation:
I was given a AVR32UC3 (pretty neat thing) and a measurement device. These two communicate via SPI, which works as expected (after fiddling with SPI params and so on).
...
6
votes
1answer
260 views
Time Base ISR Concurrency
This is sort of a "classic" problem, and I think I have a solution, but I want to vet it with this community. I am building a project using the ATtiny88 microcontroller, and I'm programming in ...
3
votes
1answer
564 views
Determining which pin triggered a PCINTn interrupt?
Am I correct in thinking that if you have two pins causing the same AVR PCINT interrupt, (e.g. PCINT0 vector caused by either PCINT0 or PCINT1 pins -- I think the naming overlap of vectors and pins is ...
3
votes
2answers
326 views
Can't set to Fast PWM OCRA mode
Trying to have Fast PWM mode when TOP == ORCA.
Works fine with OCA toggle (measuring correct frequency), but doesn't work in ...
1
vote
1answer
257 views
Arduino low power consumption and multiplexer
I've got a project that uses an Arduino with the LadyAda audio shield and a multiplexer to play sounds in response to button presses. I'm planning on using a MAX667 voltage regulator which has a low ...
0
votes
2answers
130 views
Repeating the same interrupt in AVR
Suppose, AVR microcontroller is handling an interrupt. Interrupts disabled. At this time the same interrupt occurs. Will microcontroller handle the interrupt again after return from the first handler?
...
3
votes
3answers
209 views
Detecting which IR detector was triggered using one pin
I have a project that has 6 IR led's and detectors.
The project needs to detect when any of the 6 beams get broken, and exactly which one got broken. I would like to be able to use only one input pin ...
0
votes
1answer
159 views
Arduino stop RGB fading (3rd party library) at interrupt
Using the following code, the fading process only stops after a full cycle has been run (as predicted). What would be the optimal way to stop the color cycling when the interrupt is called (so I can ...
4
votes
3answers
995 views
(Bad) counting digital pulses with Arduino using interrupts and a 4 pin switch
I have to write an Arduino sketch to accomplish some tasks with the number of digital pulses detected by a pin. For this purpose I chose to use interrupts in order not to miss any pulse and perform ...
5
votes
1answer
576 views
How is this Pushbutton Debounce code?
I am monitoring a pushbutton with a microcontroller where I am trying to take care of four things together:
50-msec debounce upon push-begin and 25-msec debounce upon push-release
identify a ...
2
votes
2answers
641 views
Arduino EthernetServer with interrupt
I have an arduino application doing two things in the loop:
A webserver that waits for a connection and renders some html forms to change configuration values.
...
4
votes
5answers
679 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 ...
1
vote
2answers
612 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
426 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
626 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
135 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 ...
2
votes
1answer
810 views
How to use interrupts in micro C
I am making a robot which can follow lines, avoid obsercals 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
131 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. ...
6
votes
4answers
329 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
322 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
742 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 ...
0
votes
3answers
187 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 ...

