Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Open Source Logic Analyzers?

Cliff posted more than 10 years ago | from the testing-and-comparing-digital-signals dept.

Software 29

Rorschach1 asks: "I'm a hardware hacker, doing my part to develop useful open source projects, but my projects are getting more ambitious and my test equipment just isn't keeping up. PC based oscilloscopes have been discussed here before, but I'm particularly in need of a logic analyzer. The BitScope does offer an 8-channel analyzer with Linux support, but that hardly compares to most commercial offerings. I'm also concerned by the fact that I can't find any independent reviews of the device, and I'm hesitant to shell out $500 without knowing what I'm getting into. A logic analyzer is a pretty simple device. My current setup runs on a dedicated 486 with ancient DOS-based software. Surely there must be a more modern option available that'll work under Linux, but so far I've been able to find nothing. Perhaps someone can point me in the right direction?"

Sorry! There are no comments related to the filter you selected.

OSS (-1, Troll)

Anonymous Coward | more than 10 years ago | (#8839890)

There's an interesting blog entry about this over at Wil Wheatons blog []

Re:OSS (0)

Anonymous Coward | more than 10 years ago | (#8841079)

that was very informative.

found via google (1, Interesting)

Anonymous Coward | more than 10 years ago | (#8839935)

Re:found via google (1)

Rorschach1 (174480) | more than 10 years ago | (#8841774)

Yep, that's what I'm using now.

Re:found via google (1)

mnp (160301) | more than 10 years ago | (#8841785)

Umm, yea, that's good, if the bus frequency you're probing runs under 10 kHz. How many busses are in that range these days?

Ask a better question... (3, Insightful)

HotNeedleOfInquiry (598897) | more than 10 years ago | (#8839991)

You have not defined what type of logic analyzer you need. They span the range of 10mhz and 8 inputs for less than $200 to 1ghz and hundreds of inputs for tens of thousands of dollars. You didn't say if you needed disassembly or a processor pod.

Sometimes I think that all you need to get your question in "Ask Slashdot" is to preface it with "I'm looking for an open-source blah blah blah..."

In Soviet Russia... (-1, Troll)

Anonymous Coward | more than 10 years ago | (#8840511)

...better questions ask you!

Re:Ask a better question... (3, Informative)

Rorschach1 (174480) | more than 10 years ago | (#8841474)

Nothing terribly fancy. Say 16 channels and 50mhz. Much of what I'm doing is SPI bus and only needs a few channels, but I do sometimes find myself needing more than the 8 provided by the BitScope.

Something that could look at a data line and clock line and give me a hex dump of the data would be nice, but I don't really need any more intelligence than that.

Re:Ask a better question... (1)

HotNeedleOfInquiry (598897) | more than 10 years ago | (#8841607)

You might want to check out They have cute little 8 and 16 bit usb analyzers. Their products work well and they have fast delivery to the US (they are located in the UK). I don't know about Linux support, as we've only run them under Windows.

Re:Ask a better question... (1)

Rorschach1 (174480) | more than 10 years ago | (#8842002)

'Ask a better question'? I take it you've never submitted a story to Slashdot before. =] I guess too many details like that ruin the story, so they tend to get edited out.

I guess I shouldn't complain. This time it only came out sounding poorly defined. Last time my question just sounded stupid.

$500? (0)

Anonymous Coward | more than 10 years ago | (#8840034)

normally a company providing something of that high a cost would offer a trail version (eg, 45 days) via their website, or can be negotiated with a salesperson from that company. Sure, it might be crippled a la the old shareware days, but may contain enough features to decide whether or not the product is viable. Why not research that option should the OSS route come up short?

Look at this project... (3, Interesting)

stienman (51024) | more than 10 years ago | (#8840062)

Take a PIC microcontroller, add a Xilinx fpga, and a few misc other items and you have a decent logic analyzer [] .

Check out his Carmon project if you're interested in long term GPS data tracking (stores a GPS data stream to a compact flash card)


Re:Look at this project... (1)

cybermace5 (446439) | more than 10 years ago | (#8840276)

Heh, that's pretty neat. I was considering something like this. Actually...yup...I have every single part listed. BTW that's not an FPGA, that's a CPLD. The particular one in that project is very inexpensive, about a dollar...that's why I have a few on hand. Actual FPGAs run in the tens to fifties.

Re:Look at this project... (1)

stienman (51024) | more than 10 years ago | (#8840376)

I re-read the page and noticed that it was cpld after I'd posted my earlier response. When I write "Xilinx" my hands automatically include FPGA afterwards. CPLDs and FPGAs have more in common than they have differences in many points of view. Cost is the big one. Power consumption and complexity are two others. Other than that, they are both programmable logic devices...


Re:Look at this project... (1)

harrkev (623093) | more than 10 years ago | (#8848940)

CPLDs and FPGAs have more in common than they have differences in many points of view. Cost is the big one. Power consumption and complexity are two others. Other than that, they are both programmable logic devices...

Yup. And and this [] is the same as this [] .

And and this [] is the same as this [] .

(all links safe for work)

BTW: This is only for laughs.

But on a serious note, a modern FPGA can have a LOT of extra goodies on board, such as hardware multipliers, embedded dual-port RAM and FIFOs, PLLs, and even processors! No CPLD could compare itself to an FPGA.

Whatever you do... (1, Funny)

SpaceLifeForm (228190) | more than 10 years ago | (#8840086)

don't look to SCO for any Open Source Logic Analyzers.

On a semi-related note (2, Interesting)

martinde (137088) | more than 10 years ago | (#8840120)

I know this is not what you asked and is probably out of most hobbiest budgets, but I'll mention it anyways as it could help someone. A project we did here absolutely required a scope, and we considered a logic analyzer as highly desirable but not strictly necessary. We had a budget of around $5k - significant but not really that big when you start pricing this stuff.

It had been a while since I shopped for this stuff and I happily found that Agilent (used to be HP) has what they call "mixed signal scopes". Specifically, we purchased a 54622D. It's 100MHz 2 channel oscillscope, but then it's also got a 16 channel logic analyzer built in. (See full specs here [] .) We purchased it used for around $2600. To get that price we had to play two of the used dealers against each other a little bit. We have been really happy with it so far. $2600 is quite a bit more than $500, but you do get both a scope and a small logic analyzer for that... It's got a built in serial interface and floppy, and it's more portable than dragging a computer around. Take care, and good luck with your quest!

Re:On a semi-related note (1)

cybermace5 (446439) | more than 10 years ago | (#8840197)

I have used these, and definitely recommend them. A good solid scope and analyzer, even though the bandwidth and number of digital inputs isn't incredibly impressive. The computer link is pretty handy. It probably is adequate for most people.

Re:On a semi-related note (1)

Rorschach1 (174480) | more than 10 years ago | (#8841821)

That'd be awesome. I just checked eBay, though, and the only one listed there recently went for $3000. Can't really justify that at the moment, but if I see one cheap I'll be sure to grab it.

Timing intensive software. (3, Insightful)

fmaxwell (249001) | more than 10 years ago | (#8840242)

DOS is what my EPROM programmer software runs on. The reason? DOS is not a multitasking OS. I'm not going to screw up an E-PROM because the programming algorithm's timing was hosed by task-switching, a hung application, accessing a swap file, etc.

I recommend that you avoid any logic analyzer which relies on software for any timing-critical elements of its operation. If that's not possible, then avoid software which runs on a multitasking OS.

Re:Timing intensive software. (0)

Anonymous Coward | more than 10 years ago | (#8843636)

DOS is what my EPROM programmer software runs on. The reason? DOS is not a multitasking OS.

Fair enough. But can I suggest some less crumudgeon-like solutions to some of your perceived problems?

First of all, device programming generally happens at low-speed (ie, not bus-speed or anywhere near clock speed). We're talking serial and parallel port speeds. An "interruption" on a cheap 2 GHz PC could last thousands and thousands of clock cycles (more than enough to be recognized as a nice'd process and put aside until programming, the non-nice'd process, is complete) and not rob the programmer process of any significant time.

What I'm saying is that if you're running on typical or even obsolete PC hardware, your DOS programmer is spending ridiculous amounts of CPU time simply idle or waiting synchronously for the next programming event. There are huge windows for any modern multi-tasking OS to interrupt it without taking enough time to possibly hurt your device programming.

Can you cite actual experiences (CPU, OS, other tasks running) that actually burned you while programming? I pry only because I burn without incident on both Windows 2000 with MPLAB and Linux with GNU PIC programming tools and have never had an incident. I typically keep my text editors, browsers, and MP3 play open while burning. This is on a PIII 750 MHz notebook.

- task-switching
# man nice

- a hung application
Use a mature application and don't pollute your development/programming machine with other hardware and software that could destabilize it.

- accessing a swap file
Purchasing more RAM will prevent all swap file access, guaranteed.

Timing? (1)

brianjcain (622084) | more than 10 years ago | (#8842713)

You'll probably only be able to get timing resolution near that of the OS tick interrupt interval, right? Sounds like the makings of a piss-poor logic analyzer.

I suppose if you were using an open source OS kernel, one where you could change the OS tick interval -- you might be able to make use of your logic analyzer idea.

Re:Timing? (2, Informative)

martinde (137088) | more than 10 years ago | (#8843397)

> You'll probably only be able to get timing resolution near that of the OS tick interrupt interval, right?

Only if you do it using a hardware resource under control of the OS and do polling. Even the parallel port can generate interrupts to the OS. Add a microcontroller and/or some custom hardware and the OS doesn't come into play except for display.

You can do your own with a FPGA easy (2, Informative)

xtal (49134) | more than 10 years ago | (#8843341)

I jerry rigged something "good enough" awhile back with a Xilinx 4000 series FPGA and a microcontroller. I might clean it up and release it if there's any demand, but it's pretty simple to implement a basic one.. you just need a bunch o latches synced to a clock.

Anything more than 10-20mhz you are going to have to buy something though.. although I never did tests to see how fast or reliable my hacked apparatus was.

Go ebay hunting. Lots of deals on there.

Re:You can do your own with a FPGA easy (1)

Squant (652554) | more than 10 years ago | (#8849346)

Well i am quite interested in what you made. Could you just give an overvieuw? or a little page describing your project?

I am now currently developing an microcontroller with an CPLD type logic analyser, still in its breadboard stage and it contains:

- DS89C420, Fast 8051 derivative from maxim-ic, its available for free as part of their excellent sample program. (free)
- 32K 10ns SRAM's out of an 80486 mainboard. (free from a mainboard)
- Several 74F244 bus drivers. (F logic for high speed) But maybe would be an better idea to replace with AC logic. (free from an mainboard or 60 eurocents a piece)
- An XilinX 9536XL-PC44 CPLD, quite cheap from my distributor (around 6 euro's at farnell).
- MAX 233 rs232 interface chip (free samples)
- an 74LS125 to make the controller ISP (In System Programmable). (free from an mainboard)
- 64 Mhz oscillator module (free from an IBM token ring card)
- Experiment board with an integrated ground plane (around 13 euros at various shops)

Such projects can be built cheaply for around 20 euros and some time to write controller and PC side software.
If you select the parts well, like faster clocks/logic/components. You might quite an nice analyser for the price. Most important for such high frequency projects is that you make your own PCB with solid ground plane. (or use an experiment board with such a plane).

I thought these sounded pretty cool... (2, Interesting)

John Miles (108215) | more than 10 years ago | (#8844953)

... when their designer announced them on the sci.electronics newsgroups. Unfortunately the control software is not open-source, but he might be persuaded to release the interface specs if someone volunteered to do a Linux port. []

HP 1631D (2, Interesting)

dfranks (180507) | more than 10 years ago | (#8845287)

You might want to get something off the shelf instead of investing lots of time in building something. I purchased an HP 1631D for around $120, they seem to be going for around $200 on ebay now. This scope gives you 43 channels (can mix between state and timing with a few predefined setups) and 2 channels of 20mhz analog.

The oscilloscope channels have limited voltage swings, but are good enough for most of the work I have done. You can always build/purchase dividers to measure higher voltages.

If you do get a 1631 or something similar, make sure it has the pods and test clips. They get pretty expensive to purchase/replace.


Cheapest Logic Analyzer? Heh, got you all beat! (3, Interesting)

rfmobile (531603) | more than 10 years ago | (#8846922)

With some level shifting circuitry you can turn any common RS232 serial port into a 4 channel logic analyzer. It you've got +5 volt TTL levels, you can probably get away without any extra circuitry.

Say what?!

Yep. Most anyone can do this. In my case, I went so far as to write a device driver that makes it work under Windows NT/2K/XP. It hooks the serial ports interrupt service routine and logs the state of the UART's modem status register or MSR. Four bits from the MSR tell us the state of the CTS, DCD, DST, and RI input pins. I use the RDTSC instruction which offers ridiculous accuracy (theoretically, it's the CPU's clock speed) compared to most other software based solutions - even betten than some coarse-grained hardware solutions.

The same could easily be done under Linux or anything with a serial port and Pentium compatible processor.

I never thought anyone would be interested so no website or anything. Interested persons can send me an email ...


Re:Cheapest Logic Analyzer? Heh, got you all beat! (1)

rfmobile (531603) | more than 10 years ago | (#8846959)

CTS, DCD, DST, and RI input pins.

*sigh* Typo ... sorry, that's the CTS, DCD, DSR, and RI input pins.

Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?