Ten Minute Tutorial - Serial Decode - I2C

December 23, 2011

Summary

LeCroy oscilloscopes have the ability to trigger on and decode multiple serial data protocols. The decode in binary, hex, or ASCII format, is displayed in an intuitive manner that is very easy to understand.

Inter Integrated Circuit (Inter IC or I2C)

2 C is a master/slave synchronous communications system developed by Phillips with rates of up to 3.4 Mb/s. I2C uses two bidirectional lines with clock (SCL) and data (SDA) signals. Slaves are addressed using unique address codes which can be in a 7 or 10 bit format, multiple masters can be used in a single I2C system, each with a unique address. Data transfer is initiated by the master with a start bit followed by the address of the desired slave and a read/write bit signaling that it wants to read from or write to the slave. The slave responds with an acknowledge bit (ACK). This tutorial will get you familiar with the LeCroy I2C Decode & Trigger Option.

Equipment Requirements:

The WS 100 Demonstration Signal Source

The WS 100 signal source is a USB powered circuit board which has 6 sets of output waveforms. There are two sets of duplicate output connections on the WS 100 which are marked Ch1, CH2, and Trig. Table 1 summarizes all the available outputs. In this tutorial we will use selection S2 (I2C).

Use the Analysis pull down menu and select Serial Decode (Figure 3) or press the Decode button adjacent to the WavePilot SuperKnob (WaveRunner 6 Zi only) this will bring up the Serial Decode dialog box.

In the Serial Decode dialog box check the Decode 1 Decode On check box. Select the Decode 1 Protocol to be I2C. If not already selected choose C1 and C2 to be the source channels. Turn off the channel 2 trace. Finally, check the Link to Trigger On checkbox.

Turn on zoom by pressing the Zoom button on the front panel or by touching the Zoom key on the WavePilot SuperKnob.Click or touch any entry on the decode table, a popup will appear offering you five choices shown in Figure 5:

Off – Turn off serial decodeZoom – Turn on Zoom and expand the selected decodeSetup – Turn on the Serial Decode dialog boxExport – Save the decode table in .CSV formatMeasure - Select a decode related measurement (optional, requires ProtoSync Measure and Graph) Choose Zoom. Note that the zoom trace is updated to show the selected decode.You can also use the WavePilot SuperKnob to scroll through the decode table selections.

Serial Triggering

Touch or click on the Trigger annotation box or press the Setup button in the front panel trigger group. This will cause the trigger dialog box to appear. We have already linked the trigger to the serial decode setup so the I2C tab will be displayed as shown in Figure 6.

Having checked the Link to Trigger box on the serial decode setup you will find that the basic configuration of the signals sources has been automatically transferred to the trigger setup.

There are 8 trigger types to choose from. We will setup a trigger based on the I2C address and data content.

Press the button that is labeled Addr+Data in the Trigger type section of the I2C trigger setup. The grayed out areas in the Address Setup and Data Pattern setup will activate.

Enter the value 4C into the Address field in the Address Setup.

Enter the value 65 into the Data Value field in the Data Pattern Setup.

Touch or click the Zoom (Z1) trace annotation box. When the Zoom dialog box appears press the reset zoom button. This will reset the zoom so that the trigger point is centered on the screen. Use the Horizontal In button to expand the zoom trace. The trace will expand about the trigger point so we can see the packet that is aligned with the trigger point as shown in Figure 7. Press the Normal button in the front panel trigger group.

Your display should be similar to Figure 8. Only packets with address 4C and with Data value equal to 0x65 will trigger the scope.

Go back to the Decode Setup. On the Basic tab change the Viewing selection from Hex to ASCII. The decode content will now be displayed as ASCII text. Note that you also have the option to see the data in Binary.