Linux-driven design hardware foundation (8) use of instrumentation

2.8 Use of instruments

2.8.1 Multimeter

Two functions of the multimeter are mainly used during the debugging of the circuit board.

Measurement level.

Use the diode block to measure the connectivity of the network on the board.

2.8.2 Oscilloscope

    An oscilloscope is an electronic instrument that uses the characteristics of an electronic oscilloscope to convert an alternating electrical signal that cannot be directly observed by the human eye into an image, which is displayed on a fluorescent screen for measurement. It is an indispensable and important instrument for observing the experimental phenomena of digital circuits, analyzing the problems in the experiments, and measuring the experimental results.

    When using the oscilloscope, the main attention should be paid to adjusting the vertical deflection factor selection (VOLTS/DIV) and fine-tuning, the time base selection (TIME/DIV) and fine-tuning, and the trigger mode. If the VOLTS/DIV setting is unreasonable, it may cause the voltage amplitude to exceed the entire screen or the variation on the screen is too small to be observed. Figure 2.31 shows a schematic diagram of the same waveform when the VOLTS/DIV setting changes from large to small.


Figure 2.31 VOLTS/DIV settings and waveforms of the oscilloscope

    If the TIME/DIV setting is not appropriate, it may cause waveform aliasing. Aliasing means that the frequency of the waveform displayed on the screen is lower than the actual frequency of the signal. At this time, you can increase the waveform frequency by slowly changing the sweep speed TIME/DIV to a faster time base block. If the waveform frequency parameters change sharply or the shaking waveform stabilizes at a faster time base block, it means that the waveform has occurred before. aliasing. According to the Nyquist theorem, the sampling rate is at least twice as high as the high frequency components of the signal so that aliasing does not occur. Figure 2.32 shows a schematic diagram of the same waveform in the process of changing the TIME/DIV setting from small to large.


Figure 2.32 TIME/DIV setting and waveform of oscilloscope

    In the process of using the oscilloscope, it is necessary to set the trigger mode and trigger mode. The purpose of triggering is to start from the same position of the waveform every time it is displayed, so that the waveform can be displayed stably. Generally, oscilloscopes support edge triggering. In some cases, video triggering, glitch triggering, pulse width triggering, slope triggering, pattern triggering, etc. are also used. Setting the correct trigger can greatly increase the flexibility of the test process and simplify the work.

    The oscilloscope generally supports three trigger modes: automatic mode, normal mode and single-shot mode.

    Auto mode (AUTO button on the oscilloscope panel). In this mode, when the trigger does not occur, the scanning system of the oscilloscope will automatically scan according to the set scanning rate; and when a trigger occurs, the scanning system will try to scan according to the frequency of the signal. In AUTO mode, regardless of whether the trigger conditions are met, the oscilloscope will scan, and you can see the changing scan lines on the screen, which is the characteristic of this mode. Generally speaking, when the characteristics of the signal are not well understood, the automatic mode can be selected first.

    Normal mode (NORM or NORMAL button on the oscilloscope panel). In this mode, the oscilloscope scans only when the trigger condition is met, and does not scan if there is no trigger. So in this mode, if there is no triggering, the user will not see the sweep line for an analog oscilloscope and no waveform update for a digital oscilloscope.

    Single shot mode (SIGL or SINGLE button on the oscilloscope panel). This mode is similar to the NORMAL mode, that is, scanning is only generated when the trigger condition is met, otherwise it is not scanned. The difference is that once the sweep is generated and completed, the sweeping system of the oscilloscope enters a resting state, and no sweep is performed even if a signal that meets the trigger condition appears later, that is, only sweeps once per trigger. In actual work, it may be necessary to switch between automatic, normal and single mode according to the situation.

2.8.3 Logic Analyzer

    A logic analyzer is an instrument that uses a clock to collect digital signals from test equipment and display them. Its main function is to determine timing. Unlike oscilloscopes, logic analyzers do not have many voltage levels, and typically only display two voltages (logic 1s and 0s). After the reference voltage is set, the logic analyzer uses the comparator to determine the signal to be tested, and the value higher than the reference voltage is 1, and the value lower than the reference voltage is 0.

    For example, if a signal is measured with a sampling rate of n MHz, the logic analyzer will sample the signal with a period of 1000/n ns. When the reference voltage is
set to 1.5V, it will be judged as 1 if it exceeds 1.5V, and if it is below 1.5V, it will be determined as 1. 0, connecting logical 1s and 0s into a continuous waveform, engineers
can look for timing problems based on this continuous waveform.

    High-end logic analyzers install the Windows operating system and provide a very friendly logic analysis application software where probes, signals, and waveforms can be easily edited. This kind of logic analyzer is generally called traditional logic analyzer. It has powerful functions and integrates data acquisition, analysis and waveform display, but it is very expensive. Some logic analyzers do not have a graphical interface, but can be connected to a PC through interfaces such as USB, and the analysis software works on the PC. This kind of logic analyzer is generally called a virtual logic analyzer, which is the product of the combination of PC technology and measurement technology. The triggering and recording functions are completed by the virtual logic analyzer hardware, and the functions such as waveform display and input setting are completed by the PC, so it is relatively cheap. . Figure 2.33 shows two logic analyzers.


Figure 2.33 Logic Analyzer

    The waveform of the logic analyzer can display the address, data, control signal and the change track of any external probe signal. The signal name of each probe should be edited before use. After that, the working sequence of the bus is restored according to the waveform. Figure 2.34 shows an example of I2C. At present, many logic analyzers have their own protocol analysis capabilities, which can automatically analyze information such as commands, addresses, and data transmitted on the bus.


Figure 2.34 Restoring the I2C bus from a logic analyzer waveform

    The logic analyzer has a powerful logic trace analysis function. It can capture and record the bus cycle of the embedded processor, as well as the program execution information of the ETM interface such as real-time trace, and analyze, decode and record these records. Restore the execution process of the application. Therefore, a logic analyzer can be used to coordinate the work through the trigger interface ICD (In-Circuit Debugger) to complement the ICD's lack of trace functionality. The cooperation of logic analyzer and ICD can provide engineers with breakpoint, trigger and trace debugging methods, as shown in Figure 2.35.


Figure 2.35 Logic analyzer and ICD cooperation




Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325994350&siteId=291194637