Article count:1385 Read by:1972833

Account Entry

Recommend a good logic analyzer that I have been using recently.

Latest update time:2024-03-29
    Reads:

Click on the blue " Linux " in the upper left corner and select " Set as Star "

As an embedded software/hardware engineer, you must be able to use various instruments, especially oscilloscopes and logic analyzers .

These two instruments can monitor various data lines and signal line waveforms.

It can help us quickly locate product problems and shorten the development cycle.

Today, Junanli has a very good logic analyzer: kingst LA5016

This instrument is very easy to use,

Especially in the area of ​​parsing some common protocols, the performance is very good.

This article introduces this device and explains how to use it by capturing the SPI protocol waveform of an LCD screen.

1. kingst logic analyzer

1. kingst parameter

There are 4 models of this logic analyzer. The prices and parameters are as follows:

I have 2 models of logic analyzers in my hands:

If you only capture low-speed waveforms, LA1010 is enough. If it involves some high-speed data, you can buy LA5016.

2. Software download address:

https://www.qdkingst.com/cn/download-vis

Installation files:

3. Program startup interface and interface description

The one in the upper left corner:

  • 50MSa is the sampling depth: the total number of sample points collected at one time for the signal under test. It determines the amount of data that can be collected in one sampling. The greater the depth, the greater the amount of data that can be collected in one time.

  • 16MHZ is the sampling rate: the frequency at which the signal under test is sampled, that is, the number of sample points collected per second. It determines the time accuracy of a sampling result. The higher the sampling rate, the higher the time accuracy. The sampling rate must be more than 5 times the highest frequency of the signal being measured, and more than 10 times is recommended.

2. Practical operation examples

Next, Yiyijun will explain how to use it by grabbing the SPI waveform of an LCD screen with a SPI interface.

The example uses LA1010.

1.Set spi protocol

kingstVIS supports a lot of protocols, we need to set the software parser to spi first

  1. Click the + to the right of the parser
  2. Click SPI and the SPI protocol setting dialog box will appear.
  3. Set the relationship between the pins of the SPI protocol MOSI, MISO, SCLK, and SCS and the left channel [the subsequent connections need to connect the pins according to this corresponding relationship]
  4. Set the polarity and phase. In this example, the polarity and phase of the LCD screen are ( 0,0 ) [You need to query the peripheral datasheet for this value]

2. Device connection

After the software is set up, we can connect the corresponding pins

First, plug in the cables according to the picture below. Pay attention to the left row in the picture. The cables correspond to ch0, ch1, ch2, and ch3 from top to Xi'an. The black ones are the ground wires. Use Dupont wires to connect the ch0, ch1, ch2, and ch3 of LA1010. channel pin to spi pin of lcd screen

See the figure below for specific connections:

In order to facilitate wiring, the waveform color of each channel and the color of the connecting wire on the manufacturer's design software are in one-to-one correspondence.

CH0 -- MOSI -- 粉色
CH1 -- MISO -- 蓝色     因为只有写操作,所以没有接该引脚
CH2 -- SCLK -- 绿色
CH3 -- SCS  -- 黄色
GND ---------- 黑色

besides

  1. The ground pin GND of the peripheral must also be connected, otherwise reverse power supply may occur and a lot of noise may occur.
  2. MOSI and MISO do not need to connect if there is no data.

3. Capture the waveform

Set the trigger mode of channel 2, SCLK pin, to rising edge trigger.

Click the triangle on the page to capture the waveform in a single capture.

You can see the parsed data in the lower right corner. Click on any value and the waveform page will expand the waveform.

We click on the first data 0XFD. As can be seen from the above figure, CH0 is the MOSI pin. Through the spi sampling protocol requirements, the data 11111101 is parsed out, which is 0xFD.

[Actually, the oscilloscope can also analyze the data, but you need to manually count the bits one by one, which is troublesome and easy to count incorrectly. The key is that the oscilloscope has limited storage waveforms]

4. Modify spi protocol parameters

Sometimes there will be a problem that the SPI data cannot be parsed. It may be due to incorrect polarity and phase settings, or there may be an error in channel and pin correspondence. You can modify the SPI configuration through the following methods:

  1. Click the button to the right of SPI
  2. Click Edit and the SPI configuration dialog box will pop up.
  3. Just reset it

5. Display waveform period pulse width, duty cycle, frequency

Hover the mouse over the waveform to display the corresponding period and frequency.

6. Add display channel

Sometimes our peripherals may have other functional pins. For example, the LCD screen in this example also has resset and dc pins. If you want to capture the waveforms of these two pins, you can set them as shown below. Then connect the wiring to the corresponding pin of the LCD screen.

3. Other settings

1. Add other protocols

Yiyiyi also used this logic analyzer to capture IIS data and restore it to the original wav voice.

2. Save the waveform file

The captured waveform files can also be saved.

It is convenient for us to analyze and compare waveforms.

3. Export the data transmitted by spi protocol

Sometimes we just want to save the valid data transmitted in the protocol,

As shown in the figure below, both methods can save data.

Regarding the price of this logic analyzer,

I have already asked the manufacturer, and the price is the same for the entire network, without any discounts!

Yiyijun really can’t provide benefits to everyone!

But this also shows that product quality is guaranteed,

No need to use price to please customers.

Anyone who wants to learn embedded technology can add me as a friend: yikoupeng

Let’s roll embedded together!

end



A mouthful of Linux


Follow and reply [ 1024 ] Massive Linux information will be given away

Collection of wonderful articles

Article recommendation

【Album】 ARM
【Album】 Fans Q&A
【Album】 All original works
Album Introduction to linux
Album Computer Network
Album Linux driver

 
EEWorld WeChat Subscription

 
EEWorld WeChat Service Number

 
AutoDevelopers

About Us Customer Service Contact Information Datasheet Sitemap LatestNews

Room 1530, Zhongguancun MOOC Times Building,Block B, 18 Zhongguancun Street, Haidian District,Beijing, China Tel:(010)82350740 Postcode:100190

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