Cheap Logic Analyser

Equites

Chief Sheesher®
vacBacker
Feedback
35 (100%)
Credits
3,329CR
guddler said:
Before you get too excited I wasn't able to install the software on my main pc which is Win7 64 bit. I'm going to try on 32 bit tonight. If not, mine will be for sale.

Why not just try to run it from VPC/VirtualBox with XP installed?
 

trm

Who loves you, and who do you love?
Feedback
2 (100%)
Credits
2,877CR
Also, depending on how they've done the software lock it may be possible to get newer versions to work by messing with the USB device & vendor ID in the installer package.
 

trm

Who loves you, and who do you love?
Feedback
2 (100%)
Credits
2,877CR
If somebody can post a link to the software download I'll see if it's possible to unwrap it, modify the driver .inf and re-package it.
 

Setch

The nice ad-min
vacBacker
Credits
542CR
At least he's honest:

The quality of probe is not good (that's why it is cheap), but functional.



might have a punt myself to add to the ever growing dust covered pile of test equipment that I dont know how to use :)

but looks like a good piece of kit to get started with..



Just out of interest anyone know how much flukes are selling for these days ?


Setch
 

trm

Who loves you, and who do you love?
Feedback
2 (100%)
Credits
2,877CR
I thought that was pretty amusing too Setch :) Have you found a link to the software download?

As for the Fluke pricing, I've not seen any for sale in a good while (which is a bit surprising; they used to turn up reasonably frequently) but I'd say something around £100-150 for the 9010A (with serial) and probe feels about right.
 

guddler

Busting vectors like it's 1982!
vacBacker
Feedback
10 (100%)
Credits
4,058CR
Tim, the software is already patch to the USB ID.

If you go to the download site for the pulls version you'll see they changed their software completely after a certain point. The version he's patched is the last of the old software.

The way this stuff works is that the running firmware is downloaded on the fly, or 'bootstrapped' once the ID is verified so I'm not going to be the guinea pig with the newer software. Too much potential for bridling :)

Saying that, there's a plugon SDK for the old software so may be better anyway.

If I find it good enough that I want to buy one with more channels then I may experiment with this one. Right, off to try it on 32 bit Win 7
 

trm

Who loves you, and who do you love?
Feedback
2 (100%)
Credits
2,877CR
I should have been more clear - I was thinking of modifying the Saleae installer to pick-up the new device & vendor IDs for the bootleg. I've just ordered one along with a bit of Arduino stuff so will be giving it some attention when it arrives
smiley4.gif
.

For a bit of fun I've just grabbed the Win7 x64 installer from the Saleae site and fired it up whilst running Process Monitor. The Logic installer basically unwraps itself and produces an MSI along with some subfolders and files, including one called Drivers. These have been extracted by the time you're presented with the "Welcome to the Saleae Logic Setup Wizard" screen. You have to click Next to progress past here so you've got all the time you want to browse the expanded files.

On my system the files are extracted to -

C:UserstrmAppDataRoamingSaleae LLCLogicinstallE4E0A35Drivers

A tree view of that shows:

Code:
---Logic

    ---install

        |   decoder.dll

        |

        ---E4E0A35

            |   Logic.exe

            |   LogicSetup.msi

            |

            +---Analyzers

            |       CanAnalyzer.dll

            |       I2CAnalyzer.dll

            |       I2sAnalyzer.dll

            |       OneWireAnalyzer.dll

            |       SerialAnalyzer.dll

            |       SPIAnalyzer.dll

            |       UnioAnalyzer.dll

            |

            +---Drivers

            |   |   logiccatalogfile.cat

            |   |   WinUSBLogicInterface.inf

            |   |

            |   +---amd64

            |   |       WdfCoInstaller01007.dll

            |   |       WinUSBCoInstaller.dll

            |   |       WUDFUpdate_01007.dll

            |   |

            |   ---x86

            |           WdfCoInstaller01007.dll

            |           WinUSBCoInstaller.dll

            |           WUDFUpdate_01007.dll

            |

            ---License

                    License.txt

And the key file being the DriversWinUSBLogicInterface.inf
smiley2.gif
. Poking about in there I can see that the legit device has the following device and vendor IDs.

Code:
[LogicDeviceSection.NTx86]

%USBLogicDevice.DeviceDesc% =USB_Install, USBVID_0925&PID_3881

So, if somebody obtains the device and vendor ID for the bootleg (easily available from System Hardware control panel, or any of the USB scanning tools) it should just be a matter of editing the WinUSBLogicInterface.inf file to match the bootie's dev & vendor IDs.

Of course, the next step would be for Saleae to include some detection code that identifies a difference between the boot and real hardware. I'll have to wait for mine to arrive before I work on that, but it may be possible to blow an e-fuse on the boot to stop firmware being overwritten or perhaps dump the current firmware.

So as it stands it looks like there is a reasonable chance to either mod the boot to match the official device/vendor ID, or modify the installers so they work with the boots. I'll unwrap the MSI later on to see what's inside and see if there are any resource objects, such as firmwares.

cheers

tim

ps Martin - were you on a device with auto-correct when you posted that message? Some of it seems a bit random
smiley4.gif
 

trm

Who loves you, and who do you love?
Feedback
2 (100%)
Credits
2,877CR
Heh. A quick poke around and it seems this is the USB vendor/device ID for the real hardware
smiley1.gif


Bus 001 Device 011: ID 04b4:8613 Cypress Semiconductor Corp. CY7C68013 EZ-USB FX2 USB 2.0 Development Kit

ETA: Or maybe not. This could be the native "unflashed" devices ID.

trm2011-03-09 22:41:56
 

guddler

Busting vectors like it's 1982!
vacBacker
Feedback
10 (100%)
Credits
4,058CR
trm said:
ps Martin - were you on a device with auto-correct when you posted that message? Some of it seems a bit random
smiley4.gif

I've defected and become Chinese!
smiley36.gif
Yep, you guessed it, I was on my iPhone. You gotta love Apple's "I think I know how to spell better than you" spell checker! Quite why I was posting from my iPhone whilst sat in front of my PC is beyond me really, but there you are
smiley36.gif


Anyway, I'm happy to report that it works fine on my 32bit Win 7 install, which at the end of the day is the PC in the repair room anyway so 64bit is really not an issue for me.

The biggest problem for me at the moment is not knowing WTF I'm doing with it
smiley4.gif
. Here's a sample of the R/G/B/H/V outputs of Shaun's Tron PCB as it's what's on the bench right now. I'm sure it's not really what you're meant to use it for, but at least it shows it works. If I hover over the V.SYNC I get a reading of 61.something hz and the H.SYNC is also close enough. So it's all good. Yes, lacking in number of channels but interesting to play about with.

Tron_Video.png


Now if I only knew how to use it properly!

PS: I just need to have a crack at the SSIO board on the bench then I can get you the Vendor IDs etc. off the device. Or Rob can. I'm more wary of what happens if they detect the bootleg and shove a brick down the bootstrap so I'm happy enough where I am for now.
 

guddler

Busting vectors like it's 1982!
vacBacker
Feedback
10 (100%)
Credits
4,058CR
Ok, looking at the Saleae download page: http://www.saleae.com/downloads/ this all makes sense now.

Included (and hacked) is 1.0.21 - this is the last Windows only release using the "old" driver. It also only came in 32bit form. The reason it's still around is that it's the last version compatible with the SDK that allows you to build your own Analyser plugin (something I'm possibly interested in). There is a later version, 1.0.33 that uses a new driver and is not compatible with the SDK, but IS available in 64 bit.

Then there's the current 1.1.4 which is the cross platform version. This isn't compatible with the session data from the bootleg versions at all.

guddler2011-03-09 23:04:29
 

trm

Who loves you, and who do you love?
Feedback
2 (100%)
Credits
2,877CR
Whack it on the data bus of a 8-bit CPU and watch what comes through :) If you can get the timing right so it doesn't do any double samples, you should be able to feed that to a disassembler and get some bits of code - problem will be when the CPU is writing gfx/sound/whatever to RAM. I would say use the /M1 pin on a Z80 as a sample trigger but you'd have to drop one of the data lines.
 

guddler

Busting vectors like it's 1982!
vacBacker
Feedback
10 (100%)
Credits
4,058CR
Ok, done that, got the data and going to have a bit of a look at it.

How am I meant to know what sample rate to specify? I just went with 1Mhz.
 

guddler

Busting vectors like it's 1982!
vacBacker
Feedback
10 (100%)
Credits
4,058CR
I'm still not entirely sure what to make of this, great for the price, or cheap crap!

I had a further play tonight and one of the things that I thought I'd do was use it to analyse a potential bad input buffer. P1 Up wasn't working on the PCB. I figured if I captured /G and the relevant input and output of the 74LS244 then I'd be good to go. (Obviously this is not really the tool for the job but I'm playing!).

So, first of all I noticed a few things.

Firstly, I was getting phantom data on inputs that weren't connected. I found that using a bit of 0.1" header with a wire soldered across to tie all unused inputs to the LA solved this by tying them all High. There must be an internal pull up.

This next one is slightly odd. I expected the /G signal to be pretty regular. My fluke was suggesting it was something pretty low like 13Khz. I couldn't get a regular pulse on that input at all. Maybe the analyser is concentrated on getting as fast a sample rate as possible that it's totally inaccurate at much slower rates? More likely, my understanding of the circuit under test isn't correct and the samples are fine!!

Ok, so the bad input happened to just be a poor connection on my loom but I carried on and took some samples anyway. Bear in mind I now know that I've got a good logic chip.

So, I took 10M samples at whatever rate (I forget), exported them to bin, went to my desktop and wrote me a program to analyse this data. And I got a bit of a surprise.

Total Samples: 10000000

Total Active Gates: 2449

Total Good Samples: 2444

Total Bad Samples: 5

Let's just explain that! Total samples is obvious. Active gates is every time /G goes low on the 74LS244. All other samples are ignored as we don't care. So then, being a 74LS244, when /G goes low the data on it's input should be present on it's output. Hence a good sample is where INPUT = OUTPUT and a bad sample is where INPUT != OUTPUT.

So why 5 bad samples when I know the chip is good? Am I expecting too much of the LA? Surely not, if you were doing something like decoding a custom chip then an element of "well, it's correct most of the time" would be a bit useless wouldn't it??

Maybe I'm not doing something right in either my LA setup or my code. I can post the code that's analysing the data here if anyone wants. It's dirty and hacky, and it's Cocoa - although it would be mostly understandable to anyone that knows C. Just don't laugh!!

Oh, as an aside, are there any software tools ready made for analysing the data afterwards? Some bit of software that allows you to build up a query like "when input X does this, compare input Y to input Z and show the result"? That sort of thing? Seems a little tedious if I've got to spend an hour or more in XCode every time I want to read the data from an analyser session.

Your thoughts are welcome
smiley2.gif
 

DaveAS

User
Credits
336CR
The bad samples will probably be where the LA has captured near/at transitions. You'll have skew between the signals due to internal delays in the part and the analyser itself, plus any samples taken too close to an edge will violate setup/hold and effectively return random data.

When post processing, ignore any output samples near to the /G or input data transitions. You can work out how many by dividing your sample period into the worst case delay through the part and adding 1 (because you don't know your start point relative to the real edges).

Most analysers let you feed in a clock for capture of synchronous signals without getting bad samples. Well at least that's the theory... marginal timing combined with skew across a large circuit board may still result in what looks like wrong behaviour even though the design is working. In your case, using /G as a rising-edge clock ought to capture clean data.

[EDIT: I should add that an option to capture on a changing signal value is not necessarily the same as using it as a clock. Typically there will be dedicated lines for a real clock input. I'll bet on the cheapy not having any.]

On the irregular sampling issue: although /G changes at 13KHz, does it maybe have quite a narrow active period? If it's a regular 13KHz square wave, you ought to see a square wave in the analyser when capturing at a much faster sample rate.

--
Dave

davespicer2011-03-11 16:52:25
 

guddler

Busting vectors like it's 1982!
vacBacker
Feedback
10 (100%)
Credits
4,058CR
Ok, I think I understand most of what you're saying (this is new ground for me after all). So first relatively simple thing that I can do without getting too bogged down in the timings of it all is to modify my code to tell me for each active gate period, how many samples it consists of. Then, assuming it's a minimum of three samples, ignore the first and last as these may be on or near to the rising and falling edges of the gate. See where that gets me. Given that I've only got 5 'bad' (or marginal) samples I would think that would eliminate them all.

Longer term I guess I need to learn about the timings of it all properly and ignore all samples that occurr within a calculated marginal time period period rather than just X samples on the rising or falling edge.

I can see what you mean about the clock input. At least I think! It would make sense to be able to supply a clock in addition to the inputs as a reference for the samples but alas, you're quite right, on this cheap analyser it's strictly 8 inputs and that's your lot.

Ignore the irregular sampling. I thought some more about this and it's just me. The Fluke is telling me the signal on the gate pin is 13Khz, but that's just reporting on the active period and it's not a regular wave or pulse at all. At the end of the day, the gate will occur whenever the code for the PCB (an MCR SSIO board) will decide it wants to read inputs only. Which may or may not be a regular interval. It certainly appears to have a pattern to it, but it's by no means any kind of square wave or anything.

There's another restriction to this analyser as well, but it's software related. The trigger is just a one-shot "when to start sampling" trigger and nothing more complex than that. So you can't get it to repeatedly only sample while a given trigger occurs, or for X samples after a trigger on a repeating basis or anything like that.

Oh, and I never answered Equites question of why not use a VM? The answer is that you can, but the sample rate could (will?) be greatly reduced due to latency across the physical to virtual USB bridge. I haven't tried it, and in reality it may be fine but it does say about this on Saleae's website so I guess they've come across the issue before.
 

trm

Who loves you, and who do you love?
Feedback
2 (100%)
Credits
2,877CR
Dave has already sorted most of your questions so saved me a bit of RSI :)

I did think that the original Logic product supported using an external CLK input - is there nothing in the software about this? Sampling in externally-clocked mode would probably be quite useful as it gets round wondering if the sample rate is distorting your results (I linked to the wiki article on Nyquist-Shannon elsewhere if you want to read some background, but make sure you're not sleepy!) and for something like this would be interesting to see the results from sampling every time you got an /ENABLE.

I've used this quite often in the past for making the best use of the sample buffer as well as checking things like decoders and 245s and haven't experienced many problems with gates needing a bit of time to "settle", but as I mention later all of my knowledge of using LAs is based on messing about so it's possible I've encountered propagation delays and just not noticed the impact. I've definitely seen and been able to measure the period of time it takes gates to "settle" but don't think I've had invalid data from it although I'm not sure I know enough to be certain.

I also make use of the pre-trigger capture buffer to get an idea of what was going on before the trigger activated to make sure I'm not misunderstanding the data due to propagation/settling. I think the Logic has a pre-trigger feature too.

The other idea I'd suggest for first-time sample of an IC is that if you've got a reliable trigger you set it to sample at the max clock rate after the trigger has been activated. Although this reduces the effective time window on my LA due to limited on-device RAM, I do this to get an idea of what the waveforms are looking like so that when I sample at a more reasonable rate I've got an idea of what I should be seeing and I can tell if the chosen rate is wrong and perhaps causing aliasing or missing any transitions.

Regarding the simple trigger, it looks as though the newer versions of the software support a much better trigger setup so when mine arrives and I've established it won't brick the device (or I can backup any pre-programmed firmware) I'll see about producing a modified version of the newer software that is known safe for use with the booties. Hopefully the device firmware can be progged once and then a "write to flashram enable" pin can be lifted or cut to stop inadvertent bricking.

I'll be bringing my Intronix to Rob's techmeet so if you've seen the light about LAs by then
smiley1.gif
, you're more than welcome to have a good fiddle with it to see if it's what you want in a more capable device (or I could post it down once I've used it to examine the bootie which should arrive soon).

Also, I never found anybody else who was using an LA much until Dave came along, so my understanding of how to use, issues to be aware of and pitfalls are all based on my own deductions based on messing about, so anybody feel free to correct me if I've ended up figuring something out wrongly as I won't be offended and any tips on getting more out of it would be gratefully received. I'm looking at you there Dave
smiley36.gif
.

cheers
 

guddler

Busting vectors like it's 1982!
vacBacker
Feedback
10 (100%)
Credits
4,058CR
I'm sleepy :)

Strikes me though that the bulk of the usefulness with a logic analyzer is less so in the analyzer than whatever software you write to post process the data? Either in custom software or protocol analyzers?
 

guddler

Busting vectors like it's 1982!
vacBacker
Feedback
10 (100%)
Credits
4,058CR
Ok, bit more with it now (and less drunk).

WRT the LA itself, it's a bit of a case of horses for courses really. You can do most of what it does with the 9100, and with a lot greater flexibility in terms of hardware as you can have up to 4 I/O pods connected, each supporting up to 40 pins. That's one hell of a lot of sampling!! The restriction though is in the setup and programming of it as it's pretty archaic compared to today's standards. Also, the huge size.

The USB logic analysers that are now starting to get more mainstream however have pretty much all the opposite strengths and weaknesses. Tiny footprint, massive flexibility in setup and data analysis (if you know how to code that is) and of course availability (something I didn't mention on the 9100). The obvious downside is in their input count etc.

Anyway, getting back on track there's definitely no facility for using a clock edge in sampling. Not in the old software, or the new as I have that on my games PC. They admit that the new trigger is more "dumbed down" than the old one, but they've improved it ready to expand it so hopefully better things will come along soon. Obviously though, if the bootlegs hit too hard then maybe nothing will come along soon! For now, the old software has a better trigger as it can combine up to 4 bytes of trigger. Always only a single shot though.

I may still also get a SUMP based analyser to try (The hack a day one). I've got a bit of money in my paypal account. I'm a bit confused on that one though. They say 32 input channels unbuffered, 16 buffered and then only have 16 physical pins!!!
 

trm

Who loves you, and who do you love?
Feedback
2 (100%)
Credits
2,877CR
think you need exposure to some more functional control software to get a proper comparison. If you download from http://www.pctestinstruments.com/downloads.htm you can run the software for the Intronix/Logicport in demo mode where it synthesises a bunch of inputs.

I've not yet found a time where I need more than the Intronix software and on occasion an export to CSV so I can bring it into Excel to do a disassembly, if I'm capturing CPU stuff.

My three main uses are:

1 - Making sure an IC is doing what it's meant to be. For this the time vs state waveform trace is all I need. I just label up each input line with the gate it's monitoring and then scroll about to see whether my inputs match my outputs when /ENABLE changes, or for decoders to make sure that the output state matches the truth table according to the inputs and so on. This all works really well with just the scrolling waveform display and sometimes using the cursors for timing info.

2 - Grabbing data (normally code) off a bus. Generally I'll be sniffing the CPU-RAM-ROM addr & data busses as I'm interested in what code is executing and generally why it's not moving on to the next stage e.g. attract mode. Initially I'll use the waveform display to check that things look "ok" as in proper timing and syncronicity of the signals, no dead/stuck lines and so on. Then I'll do another capture, normally triggered by looking for a specific address on the CPU addr bus (often obtained by using mame-debug and finding the PC for the region I suspect isn't working) and then I'll capture the busses. This gets exported via CSV into Excel where I'm starting to build some macros that will disassemble the data - although I'm getting pretty good at memorising the key 6809 opcodes :) I've used this recently to great effect.

3 - Poking around to get a look at stuff which seems interesting. This is pretty much as the header suggests - if I see something that looks interesting I'll hook up to as much as I can and just run some captures, often whilst trying to get the game to perform a specific action. Useful for getting a better understanding on partially documented customs, trying to determine if a custom is buggering good input data into badly formed output, and generally just being nosy! This is often done just using the waveform display but sometimes I'll export as CSV to get it into Excel for more manipulation.

I've yet to use it for anything like monitoring I2C or serial so I've never used the inbuilt decoders, but I understand you can code your own for the Intronix which is something I'll look at eventually as having a real-time disassembler would shorten step 2 greatly.

But I think that the you're not seeing a lot of the potential uses, nor the ease of use of LAs due to the limited Logic software. Have a bash at the demo mode Intronix software and you can borrow the LA to try it out in action.

Found this interesting Google Spreadsheet in the comments whilst looking at the SUMP stuff - it's a feature comparison of all LAs under $500 that the author could find. It's got a few different LAs to the ones I looked at before deciding on the Intronix.

http://spreadsheets.google.com/pub?key=rmNr4Eeren8jBG7MXfHYxsQ&output=html

As I understand it, the bit about 32 channels unbuffered and 16 physical pins is because the board is also a cheap FPGA devboard.

When used as an LA it only uses the 16 buffered 5V inputs. But when used as an FPGA devkit you've also got access to another 16 bi-directional GPIO pins (which are limited to 3.3V and are probably some of the pin headers on the side of the PCB) and are bi-directional unlike the LA input pins which are strictly input only. So it's a bit confusing as they've basically come up with a cheap FPGA devboard but supply it pre-loaded with a 16 channel LA
smiley5.gif


This diagram probably explains it better - it's the block on the right

sump.PNG


ETA: Didn't like deep-linking of the block diagram so took a screenie.

trm2011-03-12 18:00:38
 
Top