Logic Analyzer Provides Complete Solution for I2C Signal Measurement

Publisher:明月昊天Latest update time:2016-11-03 Source: elecfansKeywords:Logic Analyzer Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
  The I2C bus is a very common bus in electronic products. Its advantage is that it only needs two lines to connect many ICs in parallel for control. However, due to the multi-device and open drain architecture, it is often difficult to troubleshoot the I2C bus. This article will present some practical application cases and use the various functions of the logic analyzer to help troubleshoot the problem.

  Long-term data logging using transient storage

  When an abnormality occurs in the I2C bus signal, it is often impossible to clearly know which device has failed. Therefore, it is impossible to locate the problem point by setting a trigger. Most users will consider capturing all the waveforms first and then slowly analyzing them. However, the logic analyzer basically captures signals in a sampling manner. Regardless of whether the signal changes or not, the memory will continue to be consumed as the sampling and capturing action proceeds. The transitional storage function is a waveform data storage mode that only stores waveform data when the waveform transitions. In this way, when the data does not transition, the logic analyzer can continue to wait and does not store any data in the memory. Compared with the practice of storing data once at each sampling point, transitional storage will be able to record more data. As the transmission speed of I2C is shown in Table 1, the overall speed is not very fast. Therefore, it is very suitable to use transitional storage to extend the storage time.

  Using I2C trigger to locate the problem point

  For example, the I2C bus on the circuit board connects device A and device B, but during the long burn-in test, an error occurs on the I2C bus. It is known that when an error occurs, an invalid address will appear on the I2C bus, and it will appear several times during the burn-in test. How can a logic analyzer be used to clarify the problem? For such a problem, it is actually difficult to capture all the waveform data. Because the time point and number of problems are very uncertain, and the burn-in test that lasts for several days also makes it impractical to log all the data, and it is necessary to find the problem point in a large amount of data. It is also a very time-consuming and laborious task.

  Therefore, the I2C trigger function in the logic analyzer can be used for positioning. First, input the valid addresses of device A (Addr: 12h) and device B (Addr: 34h). Then let the logic analyzer find the addresses that do not meet the above two conditions. The actual setting is shown in Figure 1.

  Then, with the automatic storage function after capturing the waveform with the logic analyzer, during the burn-in process, each time the trigger is successful, it will be saved, and then the trigger point of the saved waveform can be checked. Making good use of the I2C trigger function can quickly assist in waveform positioning, which is much more meaningful than capturing more data. Similarly, making good use of the entire I2C parameter as a trigger condition, such as address matching or data matching or multi-stage triggering to specify a more accurate trigger, these are functions that cannot be achieved by simply using the edge trigger (Edge Trigger).

  Problems with I2C trigger check timing violation

  The I2C bus will regulate SCL and SDA to be sent at the specified time, otherwise the behavior of the entire bus will be wrong, resulting in communication failure. Sometimes the actual waveform time has exceeded the specification, but it cannot be picked out during development and verification, because sometimes the time error is not large, so that the product can still be used normally. But often the problem will not break out until mass production, causing the mass production defect rate to rise. Even problems will not appear until the user has the product. These are all results that product development is not happy to see.

  As shown in Figure 2, you can enable the logic analyzer's time violation check as a trigger condition, set the time value to be checked, and then let the logic analyzer help pick out the time violation. The logic analyzer system uses a 200MHz sampling rate for sampling. Therefore, the minimum time width that can be checked is 5ns. In this way, it can assist users to use triggers to perform time violation checks. This method is very suitable for detecting the signal time of the I2C bus during burn-in testing.
 

 
Use Schmidt trigger circuit architecture to capture good quality I2C signals#e#

 

  Use Schmidt trigger circuit architecture to capture good quality I2C signals

  When using a logic analyzer for measurement, some noise is often seen. But when using an oscilloscope, it seems that there is no noise. What is the reason? How to eliminate it? This is because the I2C bus is an open collector structure, and many devices are connected to the bus at the same time, and there are some electrostatic protection parts, etc. It may make the I2C waveform not necessarily a good square wave. Common I2C waveforms are shown in Figures 3 and 4. However, such waveforms are normal and acceptable in the I2C specification and there is no problem.

  Because of this, general I2C chips will have a Schmitt trigger circuit at the signal input pin, so as to perfectly solve the problem of correctly processing the logic signal after the signal input. For this reason, the logic analyzer can also use this method to perform a more complete signal decoding operation. Figure 5 shows a general logic analyzer, which uses a single trigger level to distinguish between logic 0 and logic 1. This approach can easily produce many unexpected logic changes when the signal to be tested passes near the trigger level (Threshold). Make the captured signal look like noise or bounce phenomenon.

  If a low-pass filter is used, the noise can be filtered out, but the high-frequency noise that may cause line problems is also filtered out. In any case, this is not an appropriate solution.

  Figure 6 shows the image after the Schmidt trigger circuit is enabled. This architecture uses two sets of trigger voltages, Thres-high and Thres-low. The area between the two voltages is the so-called non-transition region. Within this range, no matter how the signal changes, it will not affect the logic judgment. In this way, the I2C signal can be captured normally, and the real high-frequency noise will not be missed, which also complies with the I2C chip design specifications.

  Stacked oscilloscopes can simultaneously see I2C digital and analog signals

  After using the I2C bus trigger and analysis function provided by the logic analyzer, the captured waveform begins the problem analysis stage. Often, many projects involve the cooperation of software and hardware, and many people are involved. If the corresponding analog signal cannot be seen at the same time, it will not be very helpful to clarify the problem. Especially for problems caused by the line, digital signals cannot clearly show the problem points.

  However, simply stacking a logic analyzer with an oscilloscope is not helpful, because most of the time the length of time that a logic analyzer can capture is much longer than that of an oscilloscope. In this way, even if the oscilloscope displays the waveform, it is not in the correct position. Only by using the trigger function of the logic analyzer can the signal be located. In this way, the captured analog signal is meaningful. Figure 7 uses stacking and setting triggers to capture both digital and analog signals at the same time. The user can send it to someone who needs to see the waveform. The I2C bus digital decoding part allows the user to quickly understand the waveform he sees. The analog signal part faithfully presents the original appearance of the waveform. This combination of the two becomes the best measurement solution.


Keywords:Logic Analyzer Reference address:Logic Analyzer Provides Complete Solution for I2C Signal Measurement

Previous article:Application of Vector Network Analyzer Wiltron360B in RF Simulation
Next article:Design of Metal Magnetic Memory Detector Based on DSP and CPLD

Recommended ReadingLatest update time:2024-11-23 10:54

C51 implementation of TMP101 I2C temperature sensor
I was very frustrated with the I2C application of STM32 some time ago. I found a 12-bit I2C interface temperature sensor TMP101 from Texas Instruments to practice. I connected the power supply wrongly when wiring the SMT32, and I didn't connect the pull-up . I'll try it on 51 first, and I'll definitely try it on STM3
[Microcontroller]
C51 implementation of TMP101 I2C temperature sensor
Analysis of the relationship between the oscilloscope and the I2C timing waveform
Introduction to I2C The I2C bus only needs two lines, an SDA data line and an SCL clock line; the communication between the host and the I2C device can be realized based on the high and low levels, rising and falling edges of these two lines. I2C and Oscilloscope For the data of I2C bus, we need to use an oscillosco
[Test Measurement]
Analysis of the relationship between the oscilloscope and the I2C timing waveform
Briefly analyze the application of I2C bus in multi-machine communication
  The I2C (Inter Integrated Circuit) bus is a bidirectional two-wire host bus developed by Philips Company, which can easily realize data transmission and control between chips. Through the two-wire buffer interface and internal control and status registers, non-master-slave communication or master-slave communication
[Industrial Control]
What are the characteristics of I2C and SPI?
What are the characteristics of I2C and SPI? Answer: The I2C bus is a two-wire system that uses a hardware setting method for device addresses. Software addressing completely avoids the chip select line addressing method of the device, making the hardware system have a simple and flexible expansion method. The I2C b
[Microcontroller]
I2C and one-byte division written in s3c9228 assembly
; /*Read and write EEPROM*/ ;This file provides four functions to read and write MEM (24C02) ;ReadMemByte ;ReadMemBlock ;WriteMemByte ;WriteMemBlock ;--------------------------------------------------------- ;Read a byte from EEPROM, function return value R15 ;unsigned char ReadMemByte(unsigned char Addr) ;E
[Microcontroller]
Design of a new type of programmable gain amplifier circuit based on I2C bus
  In various remote sensing and telemetry systems, the dynamic range of analog signals is usually very large, generally ranging from a few mV to tens of V (dynamic range can reach 80_90db), and some are even a few pV to hundreds of V (dynamic range can reach more than 160db). Moreover, there are many interference sour
[Power Management]
Design of a new type of programmable gain amplifier circuit based on I2C bus
Based on 51 single chip microcomputer i2c multi-byte reading and writing
It can be downloaded using Keil's compilation environment, but the entry address is shown in the yellow line below. If single-step execution (F11) or full-speed run (F5) is performed, the program always stays at the original position (0x1FFF4252). If the PC pointer value and SP value are forced to be changed to 0x8000
[Microcontroller]
Based on 51 single chip microcomputer i2c multi-byte reading and writing
Setting the slave device address of the I2C device (taking AT24C02 as an example)
1 AT24C02 hardware connection circuit diagram 2 Slave device address   When performing I2C communication, the host sends the start signal and then sends the addressing signal. The device address has 7 bits and 10 bits. Taking addressing with 7 as an example, the addressing signal consists of one byte. The high 7 b
[Microcontroller]
Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号