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:

A LeCroy Xi or Zi series oscilloscope with the I2C option keycode installed.
2 passive Probes
WaveSource 100 demonstration signal source

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

Figure 1:

An outline drawing of the WS 100 demonstration signal source. Use the push button to select one of 6 waveform choices

Table 1:

The Signal Outputs Available from the WS 100 Demonstration Signal Source

Displays shown in the tutorial are based on the following initial setup on a WaveRunner 6 Zi scope:

  1. Recall the default setup: File pull down > Recall Setup> Recall Default.
  2. Verify that the input coupling on both channels 1 and 2 is DC 1 MΩ: Touch or click the channel 1 annotation box>touch or click on the coupling field >select DC 1MΩ. Repeat for channel 2 if necessary
  3. Using the C1 dialog box or the front panel vertical scale control, set the channel 1 vertical scale to 1 V/division and the vertical offset to -3V. Repeat this action for channel 2
  4. Touch or click the Trigger annotation box on the display of the oscilloscope. Set up the trigger as follows: Edge-Trigger, Source :C1, Coupling : DC, Slope: Positive, Trigger Level: 2.5 V
  5. Press the Normal button in the Trigger area on the oscilloscope’s front panel.
  6. Connect the WS 100 to a front panel USB connector. If the Found New Hardware Wizard appears press the cancel button. Select S2 (I2C) of the WaveSource100.
  7. Connect one passive probe to Ch1 of the scope and Ch1 of the WS 100. Ch1 is the data of the I2C signal.
  8. Connect one passive probe to Ch2 of the scope and Ch2 of the WS 100. Ch2 is the clock of the I2C signal.
  9. Touch or click the Timebase annotation box on the display of the oscilloscope. Set Time/Division: 20 ms, Select Set Maximum Memory and set Maximum Sample Points to 2.5MS.
  10. Press the Stop button in the Trigger area on the oscilloscope’s front panel.
  11. This completes the initial setup. The scope display should be similar to Figure 2.

Figure 2:

The acquired I2C signals; Channel 1 is the data and channel 2 is the clock

Figure 3:

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.

Select the Decode setup tab.
Set the ‘Table # Rows’ entry to 8, as shown in Figure 4.

Figure 4:

Setting up I2C decode using the serial decode dialog box

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:

Figure 5:

Using the hyperlinked decode table

Off – Turn off serial decode
Zoom – Turn on Zoom and expand the selected decode
Setup – Turn on the Serial Decode dialog box
Export – Save the decode table in .CSV format
Measure - 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.

Figure 6:

The serial decode trigger setup for I2C

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.

Figure 7:

Displaying the packet corresponding to the trigger point

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.

Figure 8:

ASCII decode readout

This completes this tutorial.