Questions tagged [performance]
The performance tag has no summary.
34 questions
0
votes
1
answer
260
views
ESP-IDF logging library slows down ISR processing
I'm hacking a project with ESP32-WROOM module. I'm running some timers with alarms along with some peripherals triggering ISRs. In the ISR routine I'm sending events to a queue, and receiving them in ...
0
votes
2
answers
471
views
best practice for performance: empty loop() when using interrupt?
I'm working on a little midi hardware project and I'm using attachInterrupt() to assign a callback function to an interrupt pin.
Nothing gets done in the loop function, so it looks like this:
void ...
0
votes
1
answer
364
views
Hardware implementation of trigonometric functions? [closed]
Is anybody aware as to whether there are any modern microcontrollers that have hardware implementations of trigonometric functions? According to my understanding, modern CPUs have basic maths ...
1
vote
1
answer
363
views
Asymmetric encryption on a Teensy?
I want to monitor an input and then send the information in an encrypted way that can't be easily unlocked even if a malicious actor gets access to the device itself. I'm new to using the Teensy ...
2
votes
0
answers
96
views
Reliably using analogRead as a compact digitalRead
My goal is to reduce pins being used for micro-controllers with limited pins, or projects requiring a few different digital input values.
How I intend to do so is by using ADC pins to gather four ...
1
vote
0
answers
1k
views
Reduce time between two consecutive SPI transfers on ESP32
I'm trying to drive an external DAC via SPI interface using ESP32 chip. But I cannot achieve the desired speed (>1M transfers/sec, each transfer consists of 16bits). The reason is not the SPI speed ...
0
votes
2
answers
478
views
Difference in increment & decrement loop execution speed
I was experimenting with for loops when I noticed that a simple increment loop executes faster than a decrement loop. I can't think of any reason why it should be like that. Is there something in my ...
0
votes
1
answer
2k
views
real-time reading of a quadrature encoder at full resolution with only one interrupt on ATmega328
I want to read a quadrature rotary encoders at full resolution with only one interrupt on Arduino Nano (ATmega328). So I found out that we can use XOR to reach a full resolution:
Where pin 3 ...
2
votes
1
answer
3k
views
Slow refresh rate on I2C OLED screen
I'm trying to create a small handheld console with 6 buttons and an I2C 0.96" OLED display:
https://i.sstatic.net/gWqZP.jpg
The directional buttons use the analog pin and different resistors ...
-3
votes
2
answers
316
views
Why would anyone use Arduino in 2017? [closed]
Sorry for clickbait question but it really bugs me why Arduino is still a thing in the age of ARM based boards like Pine64, Raspberry Pi, Bannana Pi, Whatever Pi etc.
I'm more or less aware of ...
2
votes
2
answers
263
views
for loop reads pots, passes value to PWM pins, can this be in the same for loop?
In the code below I am using a for loop to iterate over analog pins (potentiometers) and pass their value, after being mapped, to PWM enabled analog output pins (currently controlling LED brightness). ...
1
vote
1
answer
378
views
Speedometer slow reaction arduino
I'm trying to make a speedometer, with utilization of interrupt for get number of pulse and some calculation for getting speed, but when compute speed the arduino freeze for some second and i lose ...
0
votes
1
answer
278
views
Extrapolate require MCU from Arduino MEGA2560 performance
I am running a control program for an ebike on an Arduino MEGA2560 which uses this MCU: http://www.atmel.com/devices/atmega2560.aspx. Currently, the program loops every 100ms which gives me a sample ...
1
vote
1
answer
86
views
Performance tuning PORTB manipulation - mask
I have the following snippet that seems to be taking a total of 6 CPU cycles per invocation.
Can I speed this up somehow? x is a byte with the 3 lowest bits set.
#define SET_COLOR(x) PORTB = (PORTB ...
8
votes
2
answers
4k
views
OOP vs Inline with Arduino
I have been programming for quite a while now but I am new to Arduino and AVR Programming. The main question I have about programming these Micro-controllers is are there major differences in ...
0
votes
1
answer
414
views
Comparison of an Arduino's performance?
How does an AVR-based Arduino's CPU performance compare to a vintage PC (Apple II, PC-XT, TRS-80, et.al.)?
How many megaflops of number crunching can one get out of an AVR-based Arduino?
21
votes
2
answers
13k
views
Would an infinite loop inside loop() perform faster?
When you're writing a typical sketch, you usually rely on loop() being called repeatedly for as long as the Arduino is running. Moving in and out of the loop() function must introduce a small overhead ...