You might dig into the main() function that the Arduino IDE pulls in, which in turn calls loop() . There's some additional overhead that can be found with the source code pulled in by the IDE. I don't remember the explanation, but when I had this problem I switched to AVRStudio. If you just want to ignore the jitter, try looking for trigger holdoff or pulse width trigger options.
@BrendaEM6 жыл бұрын
Thank you. It was interesting to see it. If I had time, I would try another Arduino Micro, just to be sure.
@NiHaoMike646 жыл бұрын
Make sure the probe is calibrated if you see overshoot or rounded edges where you're not expecting it.
@BrendaEM6 жыл бұрын
I am fairly sure it was. Generally, I check it before each use.
@NiHaoMike646 жыл бұрын
@@BrendaEM Then it must be some weird transmission line effect causing it.
@BrendaEM6 жыл бұрын
@@NiHaoMike64, I have a friend who specializes in signal integrity. He says that the over/undershoot can be fixed with a pull-down resistor. Still, it was better than I thought--except for the jitter.
@fuzzy1dk6 жыл бұрын
I assume the jitter is from the arduino code installing a timer interrupt behind the scenes, disable interrupts if you need deterministic timing
@TimGremalm6 жыл бұрын
You're getting pretty close to what your 16 MHz Arduino can handle with the Arduino-overhead. Arduinos loop-function i probably interupted by one of it's timers. "One major disadvantage is that any interrupts will affect the timing, which can cause considerable jitter unless you disable interrupts. " Bit-banging Pulse Width Modulation - www.arduino.cc/en/Tutorial/SecretsOfArduinoPWM You can disable the timer that Arduino uses, and get rid of the interrupts. I got a very stable output by disable timer0. gist.github.com/TimGremalm/61bc54f473bec4809122d3489f1793af There's a lot of other cheap microcontrollers out that is far more powerful and easier to use than the Arduino Nano. ESP32 for instance is like 10 times faster than the Nano, but only twice the price. The MCU have a buildt in PWM driver that that is uper easy to call. docs.espressif.com/projects/esp-idf/en/latest/api-reference/peripherals/mcpwm.html#_CPPv219mcpwm_set_frequency12mcpwm_unit_t13mcpwm_timer_t8uint32_t
@BrendaEM5 жыл бұрын
Thank you. I wish the timers didn't mess with the ports.