Pages: 1 [2]   Go Down
Author Topic: Arduino Single Channel Logic Analyser  (Read 3567 times)
0 Members and 1 Guest are viewing this topic.
nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 126
Posts: 8501
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Norfolk UK
Offline Offline
Faraday Member
**
Karma: 67
Posts: 2520
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Full Member
***
Karma: 0
Posts: 186
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: July 13, 2013, 04:02:21 pm by Mike T » Logged

Atlanta, USA
Offline Offline
Edison Member
*
Karma: 53
Posts: 1790
AKA: Ray Burne
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: 1 [2]   Go Up
Jump to: