Logic Analyser (Saleae) : Getting Started

Yeah, “Tear in the Eyes” moment, whenever I get a new electronics item to play with.  This time I got my hands on Saleae Logic Analyser (digital one though). This one allows you to probe 8 digital channels simultaneously.  The device is extremely simple to use for first timers.  salea_analyser

Just plug a miniUSB cable, the probing wires to the other end and open the Logic Software on the PC/Laptop side. Don’t forget to use “sudo” while opening Logic software, otherwise you ain’t gonna get the permissions for doing the necromancy. Assumptions: 1. You know what a Logic Analyser is. 2. You are using linux terminal with root privileges allowed. otherwise please do give a look to these helpful pages: http://en.wikipedia.org/wiki/Logic_analyzer http://electronicdesign.com/test-amp-measurement/what-s-difference-between-mixed-signal-oscilloscope-and-logic-analyzer http://www.radio-electronics.com/info/t_and_m/logic_analyzer/logic_analyzer.php

Getting Started:

In order to understand “how to”s with the Logic analyser, I am going to break it down to very simple tasks which will be explained in consecutive posts. In this very first post, we are just going to see the most basic example i.e. a blinking LED sniffing. 1. “Let there be light” in your arduino board at pin 13, i.e. upload the blink sketch on your arduino board or any other board/controller that you are using. For the purpose of experimenting and to see the logics, I will be changing values repeat and rinse to see the corresponding affects. So, lets make the LED blink example rate at 10Hz i.e change the delay from 1000ms to 100ms(for no reason, it just acts fast…lol) 2. Connect the ground pin of the Saleae Analyzer to the Board’s ground pin. 3. Connect the channel 1 of the Analyzer to pin 13(or whatever you are flipping) of your arduino board. Since there already is a LED attached on your arduino board on pin 13, so as soon as you upload the sketch, it should have started blinking.  Yeah, we are probing right on this pin. 4. Now Download the Logic software and put it somewhere you have permissions of. 5. Enter the directory and Open the Logic executable with sudo permissions otherwise you won’t get Analyzer detected and it will show Disconnected. Opening, it should look something like this:

saleae_first_screen

  6. From the screen, it is inferrable that I am using Saleae Logic 1.1.31 Beta version and I am connected to Analyzer hardware at 24MHz and I will capture data for 5 seconds. 7. The above settings are configurable by clicking on Start on the left pane.  It looks something like this which is pretty self explanatory.

saleae_start_config

8. Now since we have attached two pins from Analyzer to Controller’s pin, we can now check what is going on that pin. Simply START once you have configured the sampling rate and the time for which you are sampling. You may use the same settings as I did in the pic.  It really won’t matter much for this example we are learning.  Clicking on start will take samples for next 5 seconds. Then you will see this Magical Screen. saleae_blink_led

9. Wohooo!!!  We got some digital square wave thing as it should have been as we are doing nothint but flipping a pin HIGH and LOW.

10. when you take your mouse cursor to any of the regions on the channel where we captured the wave, it displays the information about it like this salea_blink_timings

from the pic we can verify what we programmed, i.e we gave an 100ms delay for both HIGH and LOW so obviously it should be a square wave with 50% duty cycle. W refers to width f  refers to the frequency duty refers to duty cycle T is time period.

So, wrapping up, in this post, I kinda explained how to use the saleae analyzer for the first time and sniff a digital pin. Consecutive posts will explain other protocols explanations.