【Introduction】Since I²C signal quality is easily affected by parasitic capacitance, timing compliance testing is very important to ensure communication stability. This article will teach you to complete the timing test in one second through an example application, and quickly analyze various combination parameters such as pulse width, amplitude, edge, setup time, and hold time of I²C signals.
Introduction to I²C Bus
The I²C bus is a serial bus introduced by Philips. It is a high-performance serial bus with bus arbitration and high and low-speed device synchronization functions required by multi-host systems. The I²C bus is used to connect microcontrollers and their peripherals.
Figure 1 I²C device selection
Physically, the I²C bus has only two bidirectional signal lines, one is the data line SDA and the other is the clock line SCL.
● SCL (serial clock line): The rising edge inputs data into each EEPROM device; the falling edge drives the EEPROM device to output data.
● SDA (serial data line): bidirectional data line, which is an OD gate, and forms a “wire-and” relationship with any other OD and OC gates.
Figure 2 Internal structure of I²C bus
The I²C bus is connected to the positive power supply through a pull-up resistor. When the bus is idle, both lines are high. The low level output by any device connected to the bus will make the bus signal low, that is, the SDA and SCL of each device are in the “AND” relationship.
I²C has three rates, as follows:
● Normal mode (100kHz);
● Fast mode (400kHz);
● High-speed mode (3.4MHz).
I²C bus data validity
When the I²C bus transmits data, the data on the data line SDA must remain stable during the period when the clock signal SCL is at a high level. The level state is allowed to change, as shown in Figure 3.
Figure 3 Data validity
I²C Timing Analysis Software
The traditional test method of I²C communication timing requires manual positioning of each parameter and individual cursor measurement. The average time to test a set of data is about 30-60 minutes, which is not only inefficient, but also prone to reading errors or even errors. The innovative I²C timing analysis function of the ZDS5000 series oscilloscope can greatly improve the measurement efficiency and maintain data consistency.
Using the I²C timing analysis software, it can complete the analysis of the DC characteristics and AC characteristics of the bus signal in a very short time, and compare it with the nominal parameters of the device manual, directly output the test results (Pass/Fail), and support report export, It saves the trouble of manual data entry and greatly improves the test efficiency. The specific test interface is shown in Figure 4 below.
Figure 4 I²C timing analysis interface
I²C Timing Analysis Test Parameters
In addition to analyzing the decoding situation of I²C timing, it is also necessary to verify whether it meets the AC characteristic standard of I²C. The test parameters and manual nominal of I²C timing analysis function are shown in Table 1, including clock frequency, start signal/data signal setup time , Start signal/data signal hold time, clock low/high level time and bus idle time and more than a dozen test parameters.
The yellow part in Figure 5 below is the specific test location corresponding to the test item.
Figure 5 I²C test items
I²C Timing Analysis Example Application
This test uses a ZDS4054 Plus oscilloscope equipped with I²C timing analysis software as standard. Figure 6 shows the I²C timing analysis parameter setting interface, including bus settings and parameter settings. Users can adjust the parameter values according to the test standard.
Figure 6 Parameter setting interface
● Bus level: the input voltage Vcc, the general I²C input voltage is 3.30V, if it is other input voltage value, it can also be adjusted by knob A. The adjustment of the bus level Vcc will affect the values of VIL and VIH. There is a relationship between Vcc and VIL and VIH as shown in Table 2.
● Input high-level/low-level voltage (VIH, VIL): The input value of the two is determined by Vcc, which satisfies the relationship shown in Table 2. It can also be adjusted by knob A, and the changes of their values will not be affected. Will affect the change of Vcc value.
After setting the parameters, click[Return]to view the results of the test analysis, as shown in Figure 7 below.
Figure 7 I²C timing analysis
Detailed analysis of I²C timing test data
As shown in Figure 8:
● By observing the measured parameters in the test table, if the measured parameters meet the test standard, the test will pass, and it will be displayed as “Pass”;
● If it does not meet the set standard, it will not pass the test, and it will be displayed as “Fail”;
● If “No Test” is displayed in the test table, it means that the test signal cannot be found. At this time, the horizontal time base of the oscilloscope can be adjusted to make the waveform of several or even a dozen frames appear on the screen of the oscilloscope as much as possible. Test analysis and comparison;
● At the bottom of the test table, the final overall test effect will be displayed. If the test is completely passed, it will Display “Pass”, and if one item fails the test, it will be “Fail”.
Figure 8 I²C timing test results
Rotate knob B in the test list to view the parameter test results in the test table. If you need to view the details of a parameter test, you can select it with knob B and then press knob B briefly. At this time, the zoom window on the screen will jump to the selected data. The test site is shown in Figure 9.
Figure 9 Data Analysis
After the test is completed, the tested waveforms and data can be exported. The exported “web report” file can be opened with the webpage, and the exported “CSV” file can be opened with Excel.
Do the electrical characteristics of the I²C bus on the board meet the requirements? This question can be left to I²C timing analysis software to answer accurately. The ZDS5000 industry analysis oscilloscope allows you to easily perform I²C bus testing and parameter verification, speeding up debugging and improving efficiency.
The Links: DF200BA80 MG200H1AL2 IGBTS