Questions tagged [interrupt]
Interrupts allow the processor to suspend normal operation temporarily so that a high-priority software or hardware event can be handled instead.
614 questions
0
votes
1
answer
513
views
Can an Arduino wake from deep sleep exactly on an analog voltage threshold crossing (not a digital interrupt)?
I’m exploring ultra–low-power sensing designs where the Arduino should remain in deep sleep until a specific analog voltage threshold is reached — for example, when a sensor output rises above 1.2 V.
...
1
vote
1
answer
351
views
How to implement a pulse counter for two clocks on Nano Every?
For clock synchronization I want to implement a pulse counter on the Arduino Nano Every. There are two clock signals at 40-100 kHz, the Nano runs on 20 MHz. Nyquist says we need at least 2 times the ...
4
votes
2
answers
1k
views
Arduino Mega: is there a way to have additional interrupt pins?
I have an Arduino Mega, and I run out of interrupt pins. I have only pin 18 available, but I need 2 of them. What can I do?
pin
INTx
digitalPinToInterrupt(pin)
3
INT5
1
2
INT4
0
18
TX1 INT3
5
19
RX1 ...
1
vote
1
answer
36
views
How can I achieve <50 ppm timing with a Sparkfun Artemis ATP?
I want to sample an ADC at very regular intervals. Right now, using millis/micros (which are driven by the internal RC oscillator), I'm off by around 3000 ppm, and it drifts.
Here are some things that ...
1
vote
1
answer
139
views
Problem with ATTiny85 sketch to start and stop firing a camera on a PWM signal from RC receiver
I am trying to start a camera firing at a fixed interval on a long servo pulse, stop it firing on the next long pulse, start it again on the next long pulse, etc. I use an interrupt to detect if the ...
2
votes
2
answers
737
views
Arduino Uno Serial.write() how many bits are actually transmitted at once by UART and effect of baudrate on other interrupts
With Arduino Uno Rev3, I am trying to maintain a delicate timing while handling data transmission. I want to send 6 bytes at a time, which takes around ~44 us when I time Serial.write(). The time it ...
-1
votes
1
answer
225
views
Use class object inside an ISR
I have to simulate an ADC that behaves as an I2C slave. The simulated values that the ADC shall expose are sent over serial, saved on an attribute and are requested by a master device over I2C.
A ...
3
votes
1
answer
304
views
Interrupt routine has unexpected execution
An interrupt routine is executing unexpectedly, and I can't figure out why. Can you please have a look?
Hardware is a generic (knock off) Arduino Mega, with an unused Ethernet shield, and a touch ...
2
votes
2
answers
2k
views
Alternative to polling interrupt flag from main loop?
I am using an ISR, which is written to be as minimal as possible:
volatile bool interrupt1{};
void ISR1() {
interrupt1 = true;
}
The interrupt is handled by polling the interrupt1 variable in ...
2
votes
1
answer
752
views
Emulating Arduino Uno with QEMU: interrupts do not work
So I wrote this code for Arduino Uno:
// file qemu.ino
void setup() {
Serial.begin(9600);
}
void loop() {
Serial.println(millis());
}
And then compiled and uploaded it to the real ...
2
votes
2
answers
223
views
interrupt from a button and wait until serial port 1 has a message
I'm a little bit loss because I'm learning how to use the interruptions on Arduino.
I'm creating a program to read an RFID code that arrives if an RFID transmitter is close to the antenna (a little ...
2
votes
2
answers
6k
views
How to use Interrupt in Arduino to receive the data from Serial Input
Currently i have a project that forced me to make a program that receives several data from Serial Input using Interrupt in Arduino. I use Arduino as the receiver and ESP32 as the sender through ...
0
votes
1
answer
100
views
Arduino Mega 2560 time delays counting between events on different pins
I am wondering how I can precisely count time delays between rise events happening on 4 different lines/pins using Input Capture of Arduino Mega 2560. How can I synchronize timer/counters? Appreciate ...
1
vote
2
answers
60
views
PinChange Interrupts proplem with DRO scales
I am trying to read values from 2 separate DRO scales ( Digital Read Out ), most commonly used on lathe and milling equipment, CNC, or any X,Y,Z table.
These scales need to use 2 interrupt pins per ...
1
vote
0
answers
152
views
Interrupt protection in ESP32 from interference signals
When my ESP32 is powered with an external 5V adapter or 12V power (2596 DC-DC to 5V), and my water meter (reed switch) is connected with the ESP32, the pulse start running wild and keeps increasing at ...