Author Topic: Oscilloscope Specifcation for Serial Decoding  (Read 6544 times)

0 Members and 1 Guest are viewing this topic.

Offline mheruianTopic starter

  • Contributor
  • Posts: 43
  • Country: ph
Oscilloscope Specifcation for Serial Decoding
« on: April 03, 2018, 05:45:38 pm »
Hi, Total Newbie here :'(

(Quite intro for all to understand properly)
As well total newbie regarding oscilloscopes (I haven't use any). Just got back from vacation (almost a month away from electronics). I am quite new to electronics (less than a year w/o mentor, just self study stuffs. Fell in love in electronics via arduino stuffs. Not a genius or smart but willing to understand stuffs as much as I can - so not so much familiar on deeper technical stuffs).

Since some people saw my potential (been trying my best) based on the small electronic stuffs I've done. I had given a project (someone started it but unable to finish it so - its my first big project yay!) where i need to integrate a lot of SPI based ICs (energy meter chip CS5480) so yeah, its a energy monitoring system where they want me to use this devboard pyboard v1.1 instead of arduino. A lot of folks here told me oscilloscope could help out since i could experience some glitches, etc on data transmission so it wouldn't hurt to have one since they give budget but of course, their not technical, etc. I've done research a lot for about 4 hours and now, been brain dead (confused)

So to make it short and simple. I'll summary what I know, have and what I'm dealing via enumeration;

What I'm dealing:
1) 2MHz CLKSPD SPI device (CS5480 datasheet pg14 as per SCLK, am I right? so this device can't go +25 Mbps as this table on this site)
2) 12MHz CLKSPD pyboard (uses this MCU that could reach 168 MHz clock speed right? but on datasheet, only accommodates up to 26MHz crystal oscillator? has 12MHz based on sch - Y2)
3) There'll be a time I'll be dealing with UART via RS-485 and this Long Distance SPI-based IC where it can operate up to 1Mbps data transmission for long distance integration.
* The above are based on my understanding on arduino uno - tech spec specification since it I use it a lot and knew it operates on 16MHz clock speed as its crystal oscillator is 16Mhz.

What I know and have:
1) SPI speed operates at 25Mbps at short distance but still based on the SPI device
2) UART speed operates at 20Kbps at 15m distance
3) Oscilloscope canvased so far as budget could: Gratten DSO GA1102CAL, MicSig TO1102 and BK 2190E DSO (which could be enough for the project else what at least minimum spec needed for me to see the said serials)

*Above are the details why I need oscilloscope and I am for a fact bombarded by complicated stuffs that confused me unable to pinpoint what I need.. else TLDR? Minimum specification (bandwidth, channels, etc) of DSO for SPI, UART, I2C, etc for reading and consideration (still better if specs would be given instead of brand for me to canvas further on other oscilloscope).
 

Offline SWR

  • Regular Contributor
  • *
  • Posts: 125
  • Country: dk
  • Without engineering science is just philosophy.
Re: Oscilloscope Specifcation for Serial Decoding
« Reply #1 on: April 03, 2018, 09:05:16 pm »
You need at least 4 channels to decode SPI (CLK,MOSI,MISO,CS).
I would recommend a 200MHz scope to decode a 25MHz SPI bus (it's not going to look like square waves with 50MHz analog bandwidth).
I would recommend a scope with deep segmented memory (>10M samples, >10K segments).
It's a must that the scope decodes based on memory instead of screen based decoding (too low resoluton and capture length).
It's a great advantage to have data based triggering with several bytes and wildcards (0, 1 and X).
It's also very nice to have segmented memory search with several bytes and wildcards (0, 1 and X).
Another nice feature is a choice between binary, hex and ASCII decoding.

Many scopes can do this.
I chose the GW Instek MDO-2000E series but the GDS and MSO line are also fine.

I also have an ok experience with the Keysight DSOX3000 series scopes.
They have a lot of protocols, but I don't recommend them for hobby use for the following reasons:
- They're too expensive for what you get (the base scope is expensive and doesn't include the serial protocol decode options - these options alone cost more than a GW Instek scope)
- They have limited memory depth (4M vs. 40M).
- They have limited number of segments (1K vs. 29K).

My advise wound be that you spend some time studying the manuals of the scopes you're interested in. :)
You should never go down on equipment!
 
The following users thanked this post: mheruian

Online tautech

  • Super Contributor
  • ***
  • Posts: 28380
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: Oscilloscope Specifcation for Serial Decoding
« Reply #2 on: April 04, 2018, 01:00:45 am »
BK 2190E is a Siglent SDS1102CNL+ rebranded.

It won't do decoding, period.

While 4 channels are best to see all signals on a bus it's not entirely necessary if you're willing to do MOSI and MISO independently. With the BW requirement you want and a unit that can do what you need with a little ingenuity a SDS1202X-E would be a good choice. Decode comes free with these units.

If you must have 4 channels, it's bigger brother and 4ch version SDS1204X-E would be a cost effective solution.
Avid Rabid Hobbyist
Siglent Youtube channel: https://www.youtube.com/@SiglentVideo/videos
 
The following users thanked this post: mheruian

Offline sokoloff

  • Super Contributor
  • ***
  • Posts: 1799
  • Country: us
Re: Oscilloscope Specifcation for Serial Decoding
« Reply #3 on: April 04, 2018, 01:12:06 am »
I don’t think you need decoding on the scope (necessarily). You want to be able to look at the waveforms, but any amount of decoding is more easily (and cheaply) done on a logic device like a Saleae or similar.
 
The following users thanked this post: mheruian

Offline TK

  • Super Contributor
  • ***
  • Posts: 1722
  • Country: us
  • I am a Systems Analyst who plays with Electronics
Re: Oscilloscope Specifcation for Serial Decoding
« Reply #4 on: April 04, 2018, 01:13:36 am »
If you are doing serious serial protocol development, it is more valuable to have a logic analyzer.  A cheap saleae clone can do i2c and SPI decoding, but I am not sure if it can do 25MHz SPI.  Another option is zeroplus LAP-C 16128 with 200MHz sample rate or LAP-C 16032 with 100MHz sample rate.  Both can decode over 100 serial and parallel protocols.  You can get the LAP-C 16032 for around $150 in the US.  Then you can get a nice 2 channel scope just to test signal integrity on the serial bus.
 
The following users thanked this post: mheruian

Offline cstratton

  • Regular Contributor
  • *
  • Posts: 62
  • Country: us
Re: Oscilloscope Specifcation for Serial Decoding
« Reply #5 on: April 04, 2018, 01:14:55 am »
In-scope decoding can be handy for figuring out *short* issues.  But it's typically far inferior to a cheap PC based logic analyzer for anything of message or conversational scale.

If fancy gear isn't in the budget, consider a 3-prong approach

- Use a decent digital scope to examine signal integrity issues at speed, and at word scale, even if it means you have to decode by eye.  Modify software to twiddle a GPIO if you need an explicit trigger to see what is of interest.  If you only have an analog scope, modify the firmware to do one operation and over and so you can see it.

- Use a cheap USB logic analyzer with Sigrok (or the commercial offerings) to monitor protocol issues.  If your traffic is actually too fast for that, make a build with a slower clock, since you can look at the signal integrity issues with the scope in isolation.

- Always consider the option of adding verbose output to the firmware to give you more insight.  Check registers you usually wouldn't.  Read back what you just wrote.  Dump everything through a serial UART "console" to a PC running logging terminal software.
« Last Edit: April 04, 2018, 01:18:51 am by cstratton »
 
The following users thanked this post: abraxa, mheruian

Offline Proto

  • Contributor
  • Posts: 33
  • Country: us
Re: Oscilloscope Specifcation for Serial Decoding
« Reply #6 on: April 05, 2018, 06:56:34 am »
I prefer SPI decode on a scope for a very important reason.  You see, it can be used for SW and system debug.  With a SPI output function in the language of your choice, in my case "C", you embed it wherever you want to check on the value of a variable.  Latency from program statement to output is less than 20 uS for a recent project with a PIC processor running at 32 MHZ internally, and SPI clock at 8 MHz. 

My tightest loop was triggered by a Compare and Capture Module (CCP) where the interrupt driver measured and subtracted the current capture time from the previous time  This driver latency was included in the 20 uS from the signal edge to driver code to SPI Out statement to seeing the decode on the scope.  I've done this with hundreds of decodes on the screen and then go through my algorithms step-by-step in Zoom mode to see how processing is moving along.  You have to use Zoom when the SPI waveforms are very compacted due to slow sweep rate.

Overall, I take snapshots of the system usually in single-shot mode and once acquisition ends, I wait a bit for SPI decode on the scope to recover the data in any of the formats available (Hex, binary or more if you scope has them).  I only need SPI Clock and MOSI on an MDO3000 and qualify packets with Idle time in the scope's SPI setup.  This saves analog channels but you can use digital channels if you have them or an analog channel for CS as well.  The key is the scope screen has the SPI signals along with other signals of interest. 

With this approach, the decode gives you the value of a program variable in near real time.  Acquisition memory size can be important depending on snapshot time, waveform sample rate and SPI clock rate, especially when you're pushing for long acquisitions like several 100 milliseconds.  You need to have enough samples per SPI clock time to allow it to decode.   
« Last Edit: April 05, 2018, 06:51:30 pm by Proto »
 
The following users thanked this post: mheruian

Offline mheruianTopic starter

  • Contributor
  • Posts: 43
  • Country: ph
Re: Oscilloscope Specifcation for Serial Decoding
« Reply #7 on: April 10, 2018, 03:51:30 am »
Thanks a lot for all the answers, experiences and recommendations you had given. Just got back, been busy on something else.

I had done checking all the equipment that all of you had given and I really like these. Problem are 1) my budget chokes me and 2) most of equipment here are not available on our area. So far after canvasing a lot of suppliers here, the only oscilloscopes that are available and I could afford that is 4 channel was this MicSig TO1074. Would this be enough if the IC slaves (metering chip) I'll be using operates at 2 Mhz SPI at max?

Also, as said by @cstratton, i would like to learn a lot how to use oscilloscope and logic analyzer.
 

Offline TK

  • Super Contributor
  • ***
  • Posts: 1722
  • Country: us
  • I am a Systems Analyst who plays with Electronics
Re: Oscilloscope Specifcation for Serial Decoding
« Reply #8 on: April 10, 2018, 10:25:19 am »
If you have a budget constraint, why don't you try with a cheap logic analyzer (saleae clone?), then decide if you need a scope
 
The following users thanked this post: mheruian

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: Oscilloscope Specifcation for Serial Decoding
« Reply #9 on: April 10, 2018, 11:51:28 am »
The MicSig TO1074 is a good scope but the decoding is limited. It doesn't have a message list display.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 
The following users thanked this post: mheruian

Offline sokoloff

  • Super Contributor
  • ***
  • Posts: 1799
  • Country: us
Re: Oscilloscope Specifcation for Serial Decoding
« Reply #10 on: April 10, 2018, 12:17:40 pm »
If you have a budget constraint, why don't you try with a cheap logic analyzer (saleae clone?), then decide if you need a scope
Yes. If you’re not building the PCB, this is where I’d start as well. The scope is most useful on the hardware side. It seems like you have a mostly software problem where the sub-$20 clones will work just fine (and better than a scope).
 
The following users thanked this post: mheruian

Offline mheruianTopic starter

  • Contributor
  • Posts: 43
  • Country: ph
Re: Oscilloscope Specifcation for Serial Decoding
« Reply #11 on: April 10, 2018, 01:39:57 pm »
If you have a budget constraint, why don't you try with a cheap logic analyzer (saleae clone?), then decide if you need a scope
Yes. If you’re not building the PCB, this is where I’d start as well. The scope is most useful on the hardware side. It seems like you have a mostly software problem where the sub-$20 clones will work just fine (and better than a scope).

I'll canvas some logic analyzers then, do I need some specific specs for this? Also, I have built a PCB (prototype breakout board) based on the metering chip I'm going use (component and layout are based on IC's datasheet). It's already on fabrication stage and I'm just waiting for it.

The MicSig TO1074 is a good scope but the decoding is limited. It doesn't have a message list display.

So I can't view any SPI decoding ranging 2 Mhz - 4 Mhz?? Is it because of limited bandwidth? Would the MicSig TO1104 would do? Just ask some suppliers if they had such model. Still waiting for their response.

I'm currently reading this topic on this forum section also regarding MicSig TO1104 review. Would Serial Decoding be supported in the future on this model just via firmware update?

Thanks for all the response folks :) really appreciated. I have no experience on using oscilloscope or analyzers, etc. (programmable dc psu would be the test equipment I had so far experienced using aside from multimeters)
« Last Edit: April 10, 2018, 01:57:02 pm by mheruian »
 

Offline mheruianTopic starter

  • Contributor
  • Posts: 43
  • Country: ph
Re: Oscilloscope Specifcation for Serial Decoding
« Reply #12 on: April 10, 2018, 02:02:29 pm »
Hey folks, I found this video where it has this demo of decoding serials (CANs, UARTs, I2Cs, SPIs, etc) using MicSig TO1074. I'm currently validating this one. Maybe firmware update. What do you think or am I missing out something? It can decode but still limited - up to what??
 

Offline fanOfeeDIY

  • Supporter
  • ****
  • Posts: 412
  • Country: jp
    • YouTube Channel
Re: Oscilloscope Specifcation for Serial Decoding
« Reply #13 on: April 10, 2018, 02:43:57 pm »
Hi @mheruian,

I am maintaining the Digital Oscilloscope Chart here.
https://www.eevblog.com/forum/testgear/digital-oscilloscope-comparison-chart/

And if you search around the forum, some of them are able to hack the firmware to have Serial Decoding :)

« Last Edit: April 11, 2018, 02:41:05 am by fanOfeeDIY »
 
The following users thanked this post: mheruian

Offline mheruianTopic starter

  • Contributor
  • Posts: 43
  • Country: ph
Re: Oscilloscope Specifcation for Serial Decoding
« Reply #14 on: April 10, 2018, 02:54:43 pm »
Hi @mheruian,

I am maintaining the Digital Oscilloscope Chart here.
https://www.eevblog.com/forum/testgear/digital-oscilloscope-comparison-chart/

And if you search among the forum, some of them are able to hack the firmware to have Serial Decoding :)



Oh?! this one is nice! :D thanks a lot @fanOfeeDIY ! will look at this
 
The following users thanked this post: fanOfeeDIY


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf