Scope Bandwidth to decode SPI data - Page 1
Forum section: electronics / testgear

author: frequencydrive
author_rank: Newbie
timestamp: June 20, 2018, 12:41:05 am
content: I am an electrical engineering student. I have a need to decode in real time an SPI signal at a clock frequency of 10mhz. Besides the decode features built into many scopes what kinda bandwidth would I need to be looking at in order to be able to capture data in real time and decode it? I thought a 100mhz scope would be good enough, but after googling a little bit I am starting to doubt that.

author: tautech
author_rank: Super Contributor
timestamp: June 20, 2018, 12:50:23 am
content: Quote from: frequencydrive on June 20, 2018, 12:41:05 amThen you should know Mega Hertz is expressed as MHz, please use it, this is an engineering forum !

author: frequencydrive
author_rank: Newbie
timestamp: June 20, 2018, 12:58:36 am
content: Yeah, I didn't think I was going to held accountable for capitalization error.

author: ataradov
author_rank: Super Contributor
timestamp: June 20, 2018, 01:03:20 am
content: Quote from: frequencydrive on June 20, 2018, 12:58:36 amThat's not capitalization error. It is a factual error. "MHz", "mHz" and "mhz" are very different things.

author: tautech
author_rank: Super Contributor
timestamp: June 20, 2018, 02:54:35 am
content: Quote from: frequencydrive on June 20, 2018, 12:41:05 amIt's not so much BW as processing capability when it comes to Decoding. 10 MHz BW requirement is pedestrian and any 100 MHz DSO should eat this.I've seen it with SDS2kX, SDS1kX models and now with SDS1kX-E models that now run a much gruntier FPGA than their predecessors and so much better able to get 'somewhere near' realtime. Trigger settings get you to see what you want, more than anything else.Once you step past the current offerings of entry level DSO's decode performance gets better however the perfect scope is yet to be built.Have a squis at SDS1104X-E.

author: evgen.05
author_rank: Regular Contributor
timestamp: June 20, 2018, 05:51:27 am
content: My opinion is - Logic analyzer is much better for decoding protocols. SPI, I2C or USART - doesn't matter. It's much cheaper and smaller than oscilloscope

author: Ice-Tea
author_rank: Super Contributor
timestamp: June 20, 2018, 06:16:08 am
content: Quote from: frequencydrive on June 20, 2018, 12:58:36 amI teach. You would be held accountable.Also: welcome to the forum

author: Fungus
author_rank: Super Contributor
timestamp: June 20, 2018, 07:31:02 am
content: Quote from: frequencydrive on June 20, 2018, 12:58:36 amIt's not a "capitalization error", it's a completely different unit.m = milliM = megaDo you want 0.01 Hertz or 10000000 Hertz?Space ships have crashed for much less error than that.Quote from: frequencydrive on June 20, 2018, 12:41:05 amIf it's a 10 MegaHertz SPI signal then you're right on the limit but you should be OK.Quote from: evgen.05 on June 20, 2018, 05:51:27 amIf your main task is "to capture data in real time and decode it" then an oscilloscope is the wrong tool for the job (IMHO). If there's more than a couple of packets of data then you'll be very frustrated by using twisty knobs, tiny screens and small memory. Keyboard, mouse and gigabytes of RAM are the way to go.

author: BillB
author_rank: Unknown
timestamp: June 20, 2018, 07:45:41 am
content: I don't think I'd have the patience to wait for 10 mhz SPI to decode.I didn't mean to pile-on, I think OP has learned his lesson.I agree about a logic analyzer being a better choice. However, if money is an issue, and you need a scope anyway, having one that can do serial decoding as well is very handy. For SPI, a 4 channel scope is the way to go but is more expensive of course. I second the recommendation for the Siglent SDS1104X-E.

author: Fungus
author_rank: Super Contributor
timestamp: June 20, 2018, 08:28:30 am
content: Quote from: BillB on June 20, 2018, 07:45:41 amIf 'money is an issue' then a Rigol DS1054Z will do it for half the price (you could get a Rigolanda logic analyzer for the price of a Siglent).But, as people have said: If you're going to be doing alotof this then then an oscilloscope will just frustrate you. Better to buy a logic analyzer.

author: JPortici
author_rank: Super Contributor
timestamp: June 20, 2018, 08:32:39 am
content: Quote from: evgen.05 on June 20, 2018, 05:51:27 amIt depends.Many logic analyzers aren't realtime, or when used in realtime they drop the sample rate to a minimum, or have a great blind time between acquisitions. This, at least, for all the USB logic analyzer i've seen and used.A scope on the other hand lets you see the waveforms with much more detail, and not what they look like after the LA input circuitry and the comparators.. a lot can be happening that you won't be able to see.A scope will be bettere in realtime mode, as would be any standalone instrument.A scope will also be able to trigger on more conditions, always related to the shape of the signal.A scope will also be easier to set up to see a time correlation between the serial bus data and other analog signals

author: Fungus
author_rank: Super Contributor
timestamp: June 20, 2018, 08:32:52 am
content: Theotheroption is a USB oscilloscope, eg. Picoscope.This gives you a worse oscilloscope (although some people like them) but a better serial decoder.https://www.picotech.com/library/oscilloscopes/serial-protocol-decoding-spi

author: Fungus
author_rank: Super Contributor
timestamp: June 20, 2018, 08:35:42 am
content: Quote from: JPortici on June 20, 2018, 08:32:39 amIf you're building a new circuit and want to look at signal integrity then a 'scope is essential, yes.But he said "capture data in real time and decode it".

author: nctnico
author_rank: Super Contributor
timestamp: June 20, 2018, 11:50:57 am
content: Quote from: frequencydrive on June 20, 2018, 12:41:05 am100MHz should be more than enough to decode a 10MHz SPI. What can be a problem is the minimum samplerate required. You might end up needing a higher samplerate than you'd expect because the oscilloscope uses decimated data for decoding. If the samplerate is too low it won't decode properly even though the signal on screen looks OK. An exception are the MicSig tBook (1000) mini series; these seem to have a seperate decoding engine running at a fixed samplerate.

author: David Hess
author_rank: Super Contributor
timestamp: June 20, 2018, 02:24:56 pm
content: For 10 MHz SPI, 100 MHz of bandwidth is plenty for decoding which probably goes along with a sample rate of 200 MS/s or better. As others point out, sample rate may be a problem if the record length is insufficient and a DSO is not going to decode in real time.If you are interested in signal integrity, then the bandwidth of the oscilloscope needs to support a rise time faster than the signals and 100 MHz may be too slow for a system intended to support 10 MHz SPI. This is where bandwidth is king whether it is achieved with an analog oscilloscope or equivalent time sampling DSO or not.

author: frequencydrive
author_rank: Newbie
timestamp: June 22, 2018, 03:34:16 am
content: A capital M is a capital M, which is a capitalization error. If you don't want to answer the question then just keep moving.

author: frequencydrive
author_rank: Newbie
timestamp: June 22, 2018, 03:35:09 am
content: On a test maybe but not on a forum.

author: frequencydrive
author_rank: Newbie
timestamp: June 22, 2018, 03:41:16 am
content: Ok I appreciate that recommendation. I haven't graduated yet, so I'm not making buckets full of money.

author: tautech
author_rank: Super Contributor
timestamp: June 22, 2018, 03:44:33 am
content: Quote from: frequencydrive on June 22, 2018, 03:34:16 amAnd your Prof when looking for M as in MHz is gunna mark mHz as FAIL !Keep your standards up frequencydrive and I'm sure you'll be a fine EE someday.

author: KaneTW
author_rank: Frequent Contributor
timestamp: June 22, 2018, 03:50:58 am
content: No, it's a factual error, because mHz is millihertz and MHz is megahertz. Never count on context clues for units, just press that shift key. Every professor and TA will take points off if you do not use SI prefixes properly.

author: frequencydrive
author_rank: Newbie
timestamp: June 22, 2018, 03:52:50 am
content: I appreciate your answers. Although I have read the Tektronix "The basic of oscilloscopes" whitepaper that paper is no substitute for real world experience. I can't read that paper and decide on what scope specifications I need. If I drop $1600 on a basic Rigol 200 MHz 4 channel scope I want to make sure it will actually decode a 10 MHz SPI signal. I know $1600 isn't a lot for someone who has a job and is making $135K as a practicing engineer, but right now I am in school and need to buy something that can so kinda everything kinda well. I'm not looking for the Higgs Boson in the Large Hadron Collider, so I figure a 2000 series Keysight or the equivalent Rigol would be good enough to get me through my last year.I appreciate your answer. I will look into logic analyzers. Thank you.

author: Fungus
author_rank: Super Contributor
timestamp: June 22, 2018, 06:05:43 am
content: Quote from: frequencydrive on June 22, 2018, 03:34:16 amNot to an engineer in that context.(which is what you're training to be)

author: tggzzz
author_rank: Super Contributor
timestamp: June 22, 2018, 06:46:58 am
content: Quote from: frequencydrive on June 20, 2018, 12:41:05 amQuite apart from the units faux pas (which lumps you in with clueless amateurs), you also need to define:how much data you need to capture; I'm told some DSOs only decode the little that is visible on the screenwhether triggering/filtering is necessary/beneficial, e.g. don't capture anything until message X1 followed by X2 is found, then only show Y*what you will do with the captured information; you aren't going to eyeball the captured information in real time!Overall the a good strategy is usually:in the analogue domain use a scope to ensure good signal integrity, i.e. that theanaloguesignals will be correctly interpreted by the digital receiverthen flip to the digital domain and use a logic analyser of some sort. Which type is best will depend on the information defined aboveOnce you have defined those requirements, you will probably find that you don't need to spend any where near £1600 !An engineer is someone that can do something for $1 that any fool can do for $10. And see the aphorism in my .sig