Jump to content
  • 0

Capturing both UART and SPI data on Analog Discovery 2


Chetan

Question

I want to capture UART data and SPI data at the same time in the Logic analyzer of Analog Discovery 2. UART baud is 115.2kHz and SPI is at 8Mhz.

when i increase the sample rate, UART data is not captured. and without increasing the sample rate i can not capture SPI data.

what is the optimal setting to capture both low frequency and high frequency signals at the same time?

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

13 hours ago, Chetan said:

I want to capture UART data and SPI data at the same time in the Logic analyzer of Analog Discovery 2. UART baud is 115.2kHz and SPI is at 8Mhz.

when i increase the sample rate, UART data is not captured. and without increasing the sample rate i can not capture SPI data.

what is the optimal setting to capture both low frequency and high frequency signals at the same time?

@attila

Could you also please answer this question. Thanks for your support.

Link to comment
Share on other sites

33 minutes ago, attila said:

Hi @Chetan

It depends on the timing between your UART and SPI communication.
To capture 8MHz SPI communication you need about 20MHz sample rate.
With 16k samples (in 4th configuration and unchecked noise under top-right gear) and 20MHz you can capture 800us, ~9 UART words at 115kHz.

Hi @attila

Thank you for the quick Response. with your proposed configuration i was able to capture both UART and SPI data.

Currently i also have a saleae logic analyzer. Though its maximum sampling rate is 24Mhz, it seems to be doing a better job than AD2. I can record data for 5 or 10 seconds and analyze it.

i was looking for similar option in AD2. I would be disappointed if AD2 doesn't have such feature inspite of having a higher sampling rate up to 100Mhz.

is there a way i can just mention the sample rate and the number of seconds i want to capture the signals?

Link to comment
Share on other sites

3 hours ago, attila said:

Hi @Chetan

Yes, in the top-right:
image.thumb.png.6128e286d11f23610ccc016695a994b2.png

Hi @attila

Pls refer the attached file "Saleae_Complete_Captured_data", where i am able to capture multiple frames.

with AD2 only the first frame shows valid data. Rest of the frames show junk values.

is it possible to capture data in AD2 similar to saleae logic analyzer?

With AD2 readings i am not able to determine the time between 2 frames.

Frankly speaking, the controls in the waveforms software looks very complex when compared to the settings in Saleae analyzer.

Saleae_Complete_Captured_data.jpg

Saleae_SamplingRateSelection.jpg

Saleae_SPI_data_Decoded.jpg

Saleae_UART_and_SPI.jpg

UART_SPI_UART_Multiple_Frames.dwf3work

Link to comment
Share on other sites

3 minutes ago, attila said:

Hi @Chetan

The record mode uses data streaming which limits the rate to 1-2Mhz. Notice the "Samples where lost! Reduce sample rate" warning.
I'm planning to implement data compression which would let higher sample rates.

Hi @attila

Thanks for the response.

Data compression would be a much needed feature. without this Logic analyzer part of AD2 is pretty much unusable for my application.

I am actually very disappointed that a $300 AD2 can't do what a cheap logic analyzer does at a 1/10th of the cost.

My whole purpose of buying AD2 was to have a high speed Analog and Digital analyzer. I think i have wasted my hard earned money on AD2.

I spent almost 4 to 5 hours to get a proper measurement with AD2, which i got on a cheap logic analyzer with in 5 mins.

sorry to say this. I am highly disappointed with the product.

Link to comment
Share on other sites

Hi @Chetan

Sorry to hear that you are not satisfied.

For deep logic analyzer buffer see the Digital Discovery: https://store.digilentinc.com/all-products/scopes-instruments/ 

I hope you will change your mind after you explore the other features the Analog Discovery 2 and WaveForms has, mostly in analog side. 
Just to mention some: 100Msps differential scope, measurements, spectrogram..., 100Msps awg, AM/FM,... spectrum, network and impedance analysis, digital IO, pattern generator, protocol interface, supplies..., script tool...

I see the other device you mentioned is much more expensive than DD or AD2 and it supports only logic analyzer.

Link to comment
Share on other sites

1 hour ago, attila said:

Hi @Chetan

WaveForms v3.7.12 adds data compression which lets you capture low and high speed signals together.
https://forum.digilentinc.com/topic/8908-waveforms-beta-download/
For deep logic analyzer buffer see the Digital Discovery: https://store.digilentinc.com/all-products/scopes-instruments/ 

image.png.f417ce12cebd027956aadcc684740ac9.png

 

image.png.894172252127235a93b41743eca731f6.png

image.png.a1dcd9b59abebef0b4691f468067f17b.png

 

Thank you very much for your support. Will test it and let you know the result.

Link to comment
Share on other sites

@attila

Tested with the latest update. Now AD2 works Great for my requirement. Its a perfect combination of Analog and Digital scope now. Thank you.

I should say that i am very happy with AD2 now.

I observed that the latest update supports only 16x4K buffers in the device manager (is it because of Beta version?).

Any idea when 16x16k buffers will be implemented for Logic analyzer.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...