I want to make an arduino pro mini 16MHz based “emulator”, which requires responses within 15usec from the trigger. I had several measurements and I was really mad about it. Anything I tried I got ~11.5usec delay from the trigger to the first command in the top prio interrupt. Then I disabled all interrupts and I made the rising edge detection and the response form the main program. The same. I had disassembled the code. Everthing was OK, nothing justified the ~11.5usec delay. Simply there was nothing between the “while” and the first command of the response.
I use a Saleae Logic Analyzer 24MHz-8ch with Logic 2 v2.3.55.
Now I tried to change the input and output pin on arduino. Then start Logic 2, triggering rising edge of input pin. Now ~8usec delay.
Some hint: the during the while cycle in which I wait for the rising edge I create a square wave (125ns On, 375ns OFF). After getting the rising edge double on and double off (250ns, 250ns) and 3 time on-off (125ns, 125ns)
During this measurement ch1 was the input and ch2 the output, trigger was ch1 rising.
Then I switched the measuring channels and the trigger.
As you can see, now everything is prefect. After rising edge of input, the on-off cycle ran, exited the while cycle, double on, double off, 3x on-off.
Counter-test again. Input ch1, output ch2, trigger ch1 rising. The same delay again.
I made a “counter counter-test”, I switched the measuring wires. The wires are perfect. The delay occurs when input and trigger is on ch1.
Can someone explain it?
Is it Saleae Analyzer fault or Logic 2 v2.3.55 bug? (I barely think that the arduino can do such strange things as it looked like the edge detection delayed 11,5usec)