EEVblog Electronics Community Forum

Products => Test Equipment => Topic started by: nealfox on February 28, 2018, 03:04:57 pm

Title: DS1054Z Rs232 decoding
Post by: nealfox on February 28, 2018, 03:04:57 pm
I am having problems performing Rs232 decoding with my new DS1054Z. While I have years of experience using analog scopes I’m new to digital scopes and protocol decoding. So, I’m trying to determine is I have a problem with my scope or with me.

I am generating a serial stream using an Arduino Uno and capturing it as a single-shot. As I start examining it everything is fine but at some point, as I change the horizontal position the decode breaks up. Also sometimes changing the timebase effects the decode.

Title: Re: DS1054Z Rs232 decoding
Post by: m_t on February 28, 2018, 03:39:44 pm
Unfortunately, there is no way to fix this. The RS232, I2C and SPI decoders on the 1054Z all stop working if your timebase setting is too large. Also, the list view only decodes the waveform currently shown on the display. This can be pretty annoying if you have to "scroll" through a long single shot capture.
Title: Re: DS1054Z Rs232 decoding
Post by: Fungus on February 28, 2018, 03:58:12 pm
Yep. It has a lot of limitations.

It's good for finding out if RS232 is working correctly or not but it's not a serious tool for hacking or examining long data sequences.

(Use your Arduino for that...)

Title: Re: DS1054Z Rs232 decoding
Post by: GeorgeOfTheJungle on February 28, 2018, 04:03:41 pm
That's correct, but in the 2nd image the rigol should have lost only the first "o" in the "o-p-q..." sequence, not everything up to the "A-B..." as it did, no?
Title: Re: DS1054Z Rs232 decoding
Post by: nealfox on February 28, 2018, 04:27:16 pm
That was my thought.  Both screen shots are from the same single-shot capture.  So the data is the same and just turning the position control shouldn’t have affected it at all.
Title: Re: DS1054Z Rs232 decoding
Post by: GeorgeOfTheJungle on February 28, 2018, 04:48:56 pm
Never thought about it before, but now I wonder if a real UART would also take/need so many chars to get in sync again... Who knows? Anybody?
Title: Re: DS1054Z Rs232 decoding
Post by: Karel on February 28, 2018, 05:07:22 pm
One possibility is to use DSRemote. It will do the serial protocol decoding offline using the whole internal memory of your scope (12 or 24Mpts).
It doesn't suffer from the fact that the scope fails to decode correctly when the start of the visible trace is in the middle of a character.

https://www.youtube.com/watch?v=r2UFd0fJLU4 (https://www.youtube.com/watch?v=r2UFd0fJLU4)

Title: Re: DS1054Z Rs232 decoding
Post by: Adrian_Arg. on February 28, 2018, 05:55:12 pm
for windows is there any software?
Title: Re: DS1054Z Rs232 decoding
Post by: nealfox on February 28, 2018, 05:56:37 pm
This is my first attempt at serial decoding and I didn’t know what to expect. I naively assumed that I would be able to simply scroll through the entire serial message. I haven’t even started to explore DSRemote so I guess that’s my next project. Thanks everybody for your help.
Neal
Title: Re: DS1054Z Rs232 decoding
Post by: Karel on February 28, 2018, 06:50:43 pm
for windows is there any software?

If you want you can use DSRemote on windows by using VirtualBox.
Title: Re: DS1054Z Rs232 decoding
Post by: Fungus on March 01, 2018, 12:36:22 am
This is my first attempt at serial decoding and I didn’t know what to expect. I naively assumed that I would be able to simply scroll through the entire serial message.

It's a natural enough assumption.

However, you'll find that almost everything that these DSOs do is based only on the data shown on screen. They don't have the processing power to work on the entire 24Mb internal buffer for their calculations (and usually not even a direct access to the sample memory...)

Serial decoding simply follows this pattern of using the on-screen data. It's the way things work.

Title: Re: DS1054Z Rs232 decoding
Post by: LaurentR on March 01, 2018, 06:46:16 am
If you are going to be playing with Arduino-type microcontrollers, do yourself a favor and get at least a cheap USB logic analyzer (e.g. a Saleae clone - or a real one if you have the budget)

They are able to record very long streams of UART/i2c/SPI and decode with ease (and have typically have many more decoders than any scope). Some can look at analog signals at the same time. You can also cross-trigger with the DS1054Z.

The DS1054Z is barely usable for serial decode and even better scopes that decode from full memory are limited in what they can acquire and for how long vs. external USB LAs. Obviously, the USB LAs have much lower acquisition rates, but that tends to be enough for basic serial protocols.

Title: Re: DS1054Z Rs232 decoding
Post by: Karel on March 01, 2018, 07:34:38 am
If you are going to be playing with Arduino-type microcontrollers, do yourself a favor and get at least a cheap USB logic analyzer (e.g. a Saleae clone - or a real one if you have the budget)

They are able to record very long streams of UART/i2c/SPI and decode with ease (and have typically have many more decoders than any scope). Some can look at analog signals at the same time. You can also cross-trigger with the DS1054Z.

The DS1054Z is barely usable for serial decode and even better scopes that decode from full memory are limited in what they can acquire and for how long vs. external USB LAs. Obviously, the USB LAs have much lower acquisition rates, but that tends to be enough for basic serial protocols.

The problem with logic analyzers is, is that they use 1-bit ADC's. You risk to loose a lot of time by searching for a logic error
in your sourcecode while in reality the problem is caused by bad signal integrity...
Title: Re: DS1054Z Rs232 decoding
Post by: GeorgeOfTheJungle on March 01, 2018, 08:04:07 am
The problem with logic analyzers is, is that they use 1-bit ADC's. You risk to loose a lot of time by searching for a logic error in your sourcecode while in reality the problem is caused by bad signal integrity...

Exactly!
Title: Re: DS1054Z Rs232 decoding
Post by: Fungus on March 01, 2018, 08:16:29 am
The problem with logic analyzers is, is that they use 1-bit ADC's. You risk to loose a lot of time by searching for a logic error in your sourcecode while in reality the problem is caused by bad signal integrity...

Exactly!

And ... that's what the DS1054Z is for!!

The serial decode on the DS1054Z isn't much use for decoding huge amounts of information but it's plenty good enough to check out the signal integrity.
Title: Re: DS1054Z Rs232 decoding
Post by: Karel on March 01, 2018, 08:48:49 am
The problem with logic analyzers is, is that they use 1-bit ADC's. You risk to loose a lot of time by searching for a logic error in your sourcecode while in reality the problem is caused by bad signal integrity...

Exactly!

And ... that's what the DS1054Z is for!!

The serial decode on the DS1054Z isn't much use for decoding huge amounts of information but it's plenty good enough to check out the signal integrity.

And that's why DSRemote can be usefull.