Logic Analyzer, Mixed Signal Oscilloscope, or DS1054Z???? - Page 1
Forum section: electronics / testgear

author: MDM3D
author_rank: Contributor
timestamp: August 01, 2016, 03:29:32 pm
content: HelloI am a Mechanical Engineer with little background when it comes to the correct tools to solve a problem so I will ask here what my best step to take to solve this current problem.I am having trouble with a SPI bus. The board is a Arduino DUE based board and I have 7 devices on the SPi bus with the DUE set up as master. The devices are and ethernet IC, A ST7920 LCD display adapter, 4 Max31855 thermocouple ic, and an SD card. There is a persistent 2 horizontal lines across the display. and when the sdcard is removed the everything works as intended except for the two horizontal lines. When the sd card is inserted the sd card can be read and written to and the display is responsive but the thermocouple ic all read 1's and go back to normal when the sd card is removed. I have a basic DMM and an old M0-1251 20Mhz 2 channel scope that I was given. However I cannot figure out a good way to view the Spi bus and most of the signals seem to be to fast for even the scope and the DMM is only useful for measuring the chip select lines(sort of).The question is what piece of equipment should I pursue in order to troubleshoot this problem effectively? I have looked at DSlogic Pro and Saleae logic 16 usb logic analyzers and found them to be the ideal solution to this exact problem but the DSlogic seems to have "died out" and the Saleae logic 16 runs more than $400 dollars and I would rather spend this on a DS1054Z and then "enhance" it to gain the spi features. But this would only give me 4 channels and I think I will need 10 would be ideal for my trouble shooting needs. Then I would have to wait almost 4 weeks for a clone to arrive. SO I looked further and discovered MSO scopes and saw a HP AGILENT 54622D for under $300. This seems to offer the most bang for my buck but I thought I would run this by the blog before I pulled the trigger.Thank you for your time and consideration.MDM

author: nctnico
author_rank: Super Contributor
timestamp: August 01, 2016, 03:37:25 pm
content: The HP 54622D is a nice scope (I have used it a lot about 15 years ago) but it doesn't have SPI decoding. SPI decoding on the DZ1000Z is useless as well so don't bother going that route. IMHO best your bang for buck would be a cheap USB logic analyser with SPI decoding because it has more then 4 channels so you can check whether the select lines are inactive when they should (which is likely the cause of your problem OR the SPI interface isn't set to the right clock/data polarity before accessing a device). Don't underestimate capacitive loading either with 7 devices.

author: MDM3D
author_rank: Contributor
timestamp: August 01, 2016, 03:41:03 pm
content: Quote from: nctnico on August 01, 2016, 03:37:25 pmI assumed that the 622d would not have decoding on it but is there a way to export the data to a computer which could then decode it?Are there any MSO scopes that offer decoding the don't cost and arm and a leg?Thanks for the fast response.

author: jjoonathan
author_rank: Frequent Contributor
timestamp: August 01, 2016, 04:10:04 pm
content: The Saleae can do basic signal integrity checks with analog channels, but it'll be painful (low bandwidth, not much protection, low voltage range). The 1054Z can do basic SPI decoding, but it'll be painful (slow interface, short memory, crap zooming -- try to find a youtube video to gauge how much this affects you). A MSO will solve the channel count issue but will cost as much as the 1054Z+Saleae and won't offer the Saleae's effective memory depth, screen size, and liquid-smooth scroll/zoom. Pick your poison.If you continue to do EE work you'll eventually need both, so if possible the "right answer" is probably to bite the bullet and spend the money.

author: Fungus
author_rank: Super Contributor
timestamp: August 01, 2016, 04:24:21 pm
content: Quote from: jjoonathan on August 01, 2016, 04:10:04 pmI think the question is whether to buy an MSO (which is usually much more expensive than the equivalent DSO)ora DSO+logic device.I think it's not an answerable question. It depends on too many factors, including:* How much money you're spending on the MSO* How much time you spend doing digital work every day* How long are the packets of data you need to capture (could be several minutes or even hours)* Whether you need to look at signal integrity or not (that might be somebody else's job)* etc.

author: MDM3D
author_rank: Contributor
timestamp: August 01, 2016, 05:16:48 pm
content: Quote from: Fungus on August 01, 2016, 04:24:21 pmYou have some valid questions.Budget:Hopefully less than 70% of the total price of the DS1054z and a saleae clone so by the numbers I can find ($400 +$70)*.70 = $330If once this problem is solved maybe 1 to 2 days a month as a best guess. I really don't want to peer any deeper in the the abyss that is digital communication. I like HW EE much better.That is a great question I believe my error happens very quickly and is repeated constantly so a second or less.This operation is run by the three amigos me, myself, and I.What I have come to the conclusion is that as much as the Seleae logic 16 is the ideal candidate for the job it runs 4x slower than the DSLogic Pro for 4 times the price so the $/performance are way off! So a DSlogic Pro runs about 100$ and I don't like their Analog offerings.I think I would use the DS1054Z constantly but it may not be the best tool for this task as nice as it is. However $400 is still a big jump because most of the stuff I play around with is 16Mhz or less.So if i could find an older MSO 2 channel + digital scope for under $330 that can get data to my pc without a tape drive, that is what I believe to be ideal.

author: Fungus
author_rank: Super Contributor
timestamp: August 01, 2016, 05:51:35 pm
content: I think the DS1054Z should be able to find this problem (assuming you hack it and enable the SPI decoders, etc.)The SPI decoder isn't the greatest but with a bit of patience and understanding it'll do the job.Afterwards .... well, you'll have a nice oscilloscope. Oscilloscopes areveryuseful for electronics work, I'm sure it will make you a lot more productive in general.(Yes, I know it's a bit more than you planned but a hacked DS1054Z is head and shoulders above everything else on the market in terms of bang per buck).

author: Howardlong
author_rank: Super Contributor
timestamp: August 01, 2016, 06:33:09 pm
content: If your SPI bus is reasonably fast, remember to take that into account.The DS1054Z will decode a 50MHz SPI bus, the basic Saleaes won't, and the 54622D, much as I love that scope, has no decoding but will do SPI triggering, although is limited in sample rate, and switches to equivalent time at higher timebase speeds which is _not_ what you want!Digital channels on the 54622D will run at 400MSa/s if you only have eight running, but I'm not sure how good the trigger is, on later Agilent scopes based on the same firmware, they are limited to about 30MHz SPI.The DS1054Z decoder is limited in that it will only decode what's displayed on the screen not the entire memory, but it also limits its sample rate so it'll only decode a handfull of butrs at a time. Better than nothing at all though. Used in conjunction with the trigger you can do a fair bit with it, but be wary of these subtle limitations! Of all of them I'd probably go for the DS1054Z, unless you don't mind manual decodes, that's how I did it for decades, you can get pretty good at it!

author: MDM3D
author_rank: Contributor
timestamp: August 01, 2016, 07:27:13 pm
content: Quote from: Howardlong on August 01, 2016, 06:33:09 pmFor the MAX Spi rate from a due should be 42Mhz using HW spi so that is the minimum speed I need.I hope I don't ever have to get as good as you so that I can manually decode on the fly.As my best guess I would have to say that the speed of my current spi bus is hovering close to 21Mhz given because I can see much shorter pulses modulating through the larger ones(which may be my problem switching from sw to hw spi).How terrible is it to capture and extract the data off of it to a pc (Windows is preferred over Linux but Linux is available). I see USB and Ethernet connections, but have not heard of people using them easily due to poor drivers etc... Basically has this been addressed. I ask this because if for some reason the event happens to fast to display it would be nice to export it to view at my leisure.The max31855's run at a max of 5Mhz and spit out 32 bits and are polled 11 times a second as far as I can tell but the lcd and sd card probably transfer substantially more data. I haven't started to try and get Ethernet integrated in to the firmware.And just for my sanity this approach(ds1054Z) is the proper one over something like a jtag debugger right?

author: whalphen
author_rank: Regular Contributor
timestamp: August 01, 2016, 07:34:05 pm
content: Take a look at the Dangerous Prototypes Open Workbench Logic Sniffer. It's a low cost logic analyzer. I use this with the free OpenBench LogicSniffer Client software written by J. W. Janssen. It includes an SPI analyzer. (Other software clients are also available.) I've done some SPI analysis with this device. I've also used it to do extensive I2C analysis and some RS232 analysis. Cost of the hardware is about $50. They also make the Logic Pirate which has more limited capabilities and a lower price and is also capable of SPI analysis.

author: MDM3D
author_rank: Contributor
timestamp: August 01, 2016, 07:48:18 pm
content: Quote from: whalphen on August 01, 2016, 07:34:05 pmFrom what I have read the OWLS was a pain to set up and use and it will take a month to arrive. Is this still true? (read I only use Linux if a gun is put to my head or if it has a GUI)

author: 0xdeadbeef
author_rank: Super Contributor
timestamp: August 01, 2016, 07:52:09 pm
content: Nah, I used it for some years and it was easy to use and nice for the price tag. Then again, development stalled two years ago or so and now there are better options, especially regarding memory depth.