Go Down

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

Graynomad

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
Rob Gray aka the GRAYnomad www.robgray.com

Riva

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.

Mike T

#17
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:
http://www.mikrocontroller.net/articles/High-Speed_capture_mit_ATmega_Timer

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

 Michael

mrburnette

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.

http://forum.arduino.cc/index.php?topic=135623.msg1027748#msg1027748


Ray

Go Up