Go Down

Topic: Arduino Single Channel Logic Analyser (Read 5231 times) previous topic - next topic


Most of them look pretty close, it dies on SPI and 1-wire by the looks of it. But the SPI is 2MHz isn't it? No chance there.

Rob Gray aka the GRAYnomad www.robgray.com


1-wire is pretty rubbish but with SPI you can at least see some structure. I think the ISR is taking to long and missing fine detail. Maybe the code can be optimized to improve this or maybe add a separate high speed capture mode.
Don't PM me for help as I will ignore it.

Mike T

Jul 13, 2013, 10:53 pm Last Edit: Jul 13, 2013, 11:02 pm by Mike T Reason: 1
I've been experimenting with the Input Capture Mode of the timers for fast capturing of a single boolean signal and wrote an article about it. You can capture pulse-widths of 3┬Ás with an accuracy of 65ns with the sketch attached to the article.

The article itself is in German, but the screenshots and the code (with english comments) should be enough to understand how it works:

Here the direct link to the code for the Arduinos
For Uno, Leonardo and other ATmega328 based Arduinos: HighSpeedCaptureAtmegaTimer Source.zip
For the Arduino Mega2560: HighSpeedCaptureAtmegaTimerATmega2560 Source.zip



If one does not need the high refresh rate - that is, an update every few seconds would suffice - and if you need logging (Excel or notepad) then my USB HID logger may be your answer.  Plus, it picks up the analog, too. 

If you do not wish to mess with V-USB, use a Leonardo.



Go Up