Author Topic: Decoding Serial Signals  (Read 5398 times)

0 Members and 2 Guests are viewing this topic.

Offline otpowellTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: us
Decoding Serial Signals
« on: March 19, 2015, 01:58:36 pm »
Hello all, I have an Owon SDS7102V and it does not have advanced trigger decoding options for I2C, SPI, etc.  I read an article saying that I could save my waveform on a USB stick and import it into a serial deciding software on my PC. 

Can anyone suggest any good software program I can use for this?  All the ones I am finding on the web are for USB scopes like picoscope.  Is there a universal oscilloscope software program I could use?  I'm a sophomore in EE program, still learning.   Thanks in advance. 
 

Offline janoc

  • Super Contributor
  • ***
  • Posts: 3847
  • Country: de
Re: Decoding Serial Signals
« Reply #1 on: March 19, 2015, 03:40:32 pm »
You can look at Sigrok, it might be able to work with your scope.

On the other hand, you are probably far better off buying a simple logic analyser (search the forum, there are lot of threads on these). That will decode these signals no problem.

 

Offline JohnnyBerg

  • Frequent Contributor
  • **
  • Posts: 474
  • Country: de
Re: Decoding Serial Signals
« Reply #2 on: March 19, 2015, 03:42:56 pm »
Buy a cheap 8 channel usb "logic analyzer". 10 bucks could get you going ;)
 

Offline otpowellTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: us
Re: Decoding Serial Signals
« Reply #3 on: March 19, 2015, 03:49:19 pm »
Awesome, thanks all!
 

Offline otpowellTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: us
Decoding Serial Signals
« Reply #4 on: March 19, 2015, 04:06:47 pm »
Sigrok doesn't yet support my device but it's planned.  Thank you for the great suggestion.  I found a 30 dollar logic analyzer and while searching for the analyzer, the bus pirate caught the my interest.   intrigued my interest.  I think I may buy both.   

So between my oscilloscope, function generator, multimeter, DC power supply, Logic analyzer, and private bus, I should be able to decode, test, and analyze anything right?   Well I may need an LCR meter and some capacitor and resistor decade box.
« Last Edit: March 19, 2015, 06:26:26 pm by otpowell »
 

Offline otpowellTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: us
Re: Decoding Serial Signals
« Reply #5 on: March 19, 2015, 07:51:31 pm »
Wow, good Logic analyzers a are expensive!   Can you suggest any good cheap Logic analyzers?  I don't want to buy a cheap LA and have the software UI not be very friendly. 
 

Offline JohnnyBerg

  • Frequent Contributor
  • **
  • Posts: 474
  • Country: de
Re: Decoding Serial Signals
« Reply #6 on: March 19, 2015, 08:45:10 pm »
Well, to get started you could get one of these:

http://www.banggood.com/USB-24M-8CH-24MHz-8Channel-Logic-Analyzer-Latest-Support-1_1_30-p-74101.html

I have one, and I was amazed how much I could do with $9,00 (incl. shipment) :)

And if you ever get tired of it, wrap it as a gift for your younger nephew and buy a "real" one.
 

Offline otpowellTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: us
Re: Decoding Serial Signals
« Reply #7 on: March 19, 2015, 09:19:07 pm »
Wow that same exact one is 30 dollars on Amazon. Thank you JohnnyBerg!
 

Offline AG6QR

  • Frequent Contributor
  • **
  • Posts: 865
  • Country: us
    • AG6QR Blog
Re: Decoding Serial Signals
« Reply #8 on: March 19, 2015, 09:31:19 pm »
Nothing beats a scope in taking an initial look at a digital signal.  A scope is useful to determine voltage levels, whether the transitions are sharp and clean, baud rate, and whether the protocol is normal asynchronous serial or something else.  If it is normal async serial data, a scope can easily show the number of stop bits.

But a scope isn't so convenient to use for decoding mass quantities of data once you've figured out what's going on at this lowest physical level.  Sooner or later, you just want to deal with bytes, not raw scope data.

I've used a scope to look at raw serial data, and I've decoded a few bytes of raw data by hand by looking at the scope display.  But after an initial peek using a scope, I've figured out enough of the protocol to hack together a level shifting circuit and then start using a computer serial port for the rest of the work.

Maybe I'm just having an attack of "sour grapes", since my scope doesn't have a serial decoder built in.  I can see some usefulness to one, and like the original poster, I'd appreciate it if someone has a pointer to software that can do a serial decode on a .wfm file or similar.  But I really don't think that I would use it very often.  Usually, I just want to work with the scope enough to figure out how to get bytes to a computer serial port, and from then on, it's easiest to put aside the scope and work with bytes.

One caution about logic analyzers.  They only work well if the transmission line being monitored is working reasonably well in the analog domain.  In other words, they can give you a misleading and incomplete picture if there is ringing, crosstalk, slow transitions, or other kinds of problems that only a scope can see.  And the only way you know the logic analyzer picture is misleading is if you look at the situation with a scope.  Keep that in mind if you're ever stuck with a situation that seems very confusing when you're looking at it using a logic analyzer.
« Last Edit: March 19, 2015, 09:39:27 pm by AG6QR »
 

Offline johnwa

  • Frequent Contributor
  • **
  • Posts: 255
  • Country: au
    • loopgain.net - a few of my projects
Re: Decoding Serial Signals
« Reply #9 on: March 19, 2015, 09:33:21 pm »
How fast is the signal you are trying to decode? I recently reverse engineered some UHF remote controls, at about 4kbps, by recording the signal with a PC sound card. You can then write a decoder in a language of your choice. (Matlab is good for this, despite all its annoyances)
 

Offline otpowellTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: us
Re: Decoding Serial Signals
« Reply #10 on: March 20, 2015, 01:24:58 pm »

How fast is the signal you are trying to decode? I recently reverse engineered some UHF remote controls, at about 4kbps, by recording the signal with a PC sound card. You can then write a decoder in a language of your choice. (Matlab is good for this, despite all its annoyances)

Thanks, I'm not sure I haven't hooked the scope up to anything yet.  Just trying to acquire information before hand about how to decode and analyze properly.
 

Offline otpowellTopic starter

  • Regular Contributor
  • *
  • Posts: 101
  • Country: us
Re: Decoding Serial Signals
« Reply #11 on: March 20, 2015, 01:29:15 pm »

Nothing beats a scope in taking an initial look at a digital signal.  A scope is useful to determine voltage levels, whether the transitions are sharp and clean, baud rate, and whether the protocol is normal asynchronous serial or something else.  If it is normal async serial data, a scope can easily show the number of stop bits.

But a scope isn't so convenient to use for decoding mass quantities of data once you've figured out what's going on at this lowest physical level.  Sooner or later, you just want to deal with bytes, not raw scope data.

I've used a scope to look at raw serial data, and I've decoded a few bytes of raw data by hand by looking at the scope display.  But after an initial peek using a scope, I've figured out enough of the protocol to hack together a level shifting circuit and then start using a computer serial port for the rest of the work.

Maybe I'm just having an attack of "sour grapes", since my scope doesn't have a serial decoder built in.  I can see some usefulness to one, and like the original poster, I'd appreciate it if someone has a pointer to software that can do a serial decode on a .wfm file or similar.  But I really don't think that I would use it very often.  Usually, I just want to work with the scope enough to figure out how to get bytes to a computer serial port, and from then on, it's easiest to put aside the scope and work with bytes.

One caution about logic analyzers.  They only work well if the transmission line being monitored is working reasonably well in the analog domain.  In other words, they can give you a misleading and incomplete picture if there is ringing, crosstalk, slow transitions, or other kinds of problems that only a scope can see.  And the only way you know the logic analyzer picture is misleading is if you look at the situation with a scope.  Keep that in mind if you're ever stuck with a situation that seems very confusing when you're looking at it using a logic analyzer.

Thanks AG6QR your post has some great info.  It sure would be nice just to be able to decode the signal with my scope, I guess a LA would be nice too because there's more channels than my scope. I've been reading about Sigrok, and it doesn't support my Owon yet, but it does support Binary files.  I'm thinking I don't even need to hook my scope up to it.  I should be able to capture the waveform into a binary file and import the file via USB flash drive and have Sigrok decode the signal?  I might have to do that on multiple signals to figure out what's going on but I think it might work. 
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf