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
496
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
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
344
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 ...
1
vote
1
answer
137
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 ...
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 ...
2
votes
2
answers
715
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
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 ...
3
votes
1
answer
303
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 ...
0
votes
1
answer
90
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 ...
0
votes
1
answer
67
views
Software debouncing a button when released
I'm having some trouble with software debouncing on Arduino UNO. There is a condition in my code where an unwanted debounce registers as a button push.
I'm using an interrupt for my button press, ...
1
vote
0
answers
148
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 ...
2
votes
1
answer
723
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
221
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 ...
1
vote
0
answers
66
views
Combining esp_wakeup_timer with external interrupt ext0
I'm working with ESP32-Dev-Kit1 and MMA8452Q accelerometer. I want the ESP to read the accelerometer for 10s, then go to sleep for 10s. If within the sleep period, the accelerometer magnitude reading ...
1
vote
1
answer
147
views
Fixing a pedestrian traffic light sequence pattern in a cycle using millis and without delay
I was emulating the pedestrian traffic light cyclic pattern (red, green, green flashing) in the next Arduino code. But when I run this code with my ESP8266 Wemos D1 mini controller, it appears the ...