Introduction
A logic analyzer is like an oscilloscope that is used to view multiple digital (binary) waveforms. We use logic analyzer for precise hardware troubleshooting, especially for timing issues. While we focus on microcontrollers here, logic analyzers can be used for any type of digital circuit that has a binary output. You can set the threshold values for the logic highs and lows in the logic analyzer software. In the LA2124 Logic Analyzer we use in this demo and the EE3176 labs, the threshold is set at 1.40 V, so a signal voltage > 1.40 volts is a logical one, while a voltage less than 1.40 V is a logical 0.
While you could use an oscilloscope for basic timing issues, this becomes a problem when you have a lot of channels, and/or you need to display a large amount of data. Most oscilloscopes handle two or maybe four channels of data, and typically only display 4K - 12K data points (assuming they are DSO's). This is OK for some cases, but is of limited use when we have a lot of digital output as we do in a microcontroller.
A logic analyzer overcomes the limits of an oscilloscope by providing many channels of data, as well as long data display times. The logic analyzer we use is the LA-2124 from Link Instruments. This is a 24 channel analyzer that can hold 128Kbytes of data in the buffer, and samples at rates up to 100 M samples/sec (50 MHz bandwidth). It hooks up to the parallel port of your PC, and displays the data on the CRT. The 24 channels are displayed simultaneously, so we can easily see timing relations between the different digital sources. We can also set up complicated trigger events with the logic analyzer that are not possible with the oscilloscope. For instance, you can set up a logic analyzer to trigger (start logging data) when Channels 0,3 and 6 are high, Channels 1 and 2 low, and the others are "don't cares". You could not set up such a complicated triggering event using an oscilloscope unless you had additional external circuitry.
The output of a Logic Analyzer is usually in one of two forms. Most commonly, we use a time-domain display, where the binary waveforms from one or more digital sources is viewed as a function of time. An example screenshot from the LA-2124 Timing View is shown below:

Note that the time division of the grid (dashed vertical lines) above is 10 useconds ("u" for micro) per division. So, for the Channel 0 waveform, the first pulse train starts at 11 usec, with the first few pulses having a 2 usec period (1 usec high, 1 usec low, 1 usec high, etc.).
We can also view the logic analyzer output in the "state" domain. This gives us the binary output in terms of 0's and 1's. An example screenshot from the LA-2124 State View is shown below:

You can group channels into logical groups that make sense for the problem at hand. In the view above, Group 1 is formed from Channels 0-7, with Channel 0 being the leftmost bit and Channel 7 being the rightmost bit in that group. So, at 1 usec., Channel 0 has the binary value "0", Channel 1 = 0, ..., Channel 7 = 0. At 11 usec., Channels 0,1 and 3 turn "on" and are binary 1s, while the others are binary 0s. This state view corresponds to the time domain view above, so you can directly compare them. Which view you use depends on the type of data you are looking for. We will use the time-domain view in the ee3176 labs.
You can set the "trigger word" to any binary pattern you wish. When the input channels have this pattern, a trigger will occur. A "1" is a logic high, a "0" a logic low, and an "X" a don't care. For instance, if you set the trigger word to be "XXXXXX11" in Channels 0-7, then you will get a trigger when both channels 0 and 1 are high, regardless of the other channels. You can set the binary pattern for the trigger for all 24 channels as desired, so you can trigger on very specific events.
Events trigger relative to the trigger cursor, which is a red vertical line (you may have to click and drag on the leftmost dotted line to reveal the red line). You can drag the colored vertical cursors to get precise timing information. For instance, if you click and drag on the green "A" cursor line you can drag it to any event such as the rising edge of a pulse. The time value of the cursor will be displayed in the timing window. If you click and drag on the blue "B" cursor line, you can also drag it to any event and check the time value of that event. The timing window shows the absolute times of the various cursors, and also the difference in times, eg, between the green and blue cursors (A-B).
For a concrete example of using the LA2124 Logic Analyzer with Pulse Width Modulation, look at the PWM Using The Logic Analyzer page.