Forum Index
Inexpensive Logic Analyzer

 
Author Message
mikep



Joined: 24 Sep 2005
Location: Austin, TX

Posted: 01 January 2009, 19:19 PM    Post subject: Inexpensive Logic Analyzer

Last year I investigated buying a logic analyzer. I looked at Agilent analyzers on eBay and also USB-based solutions. In the end I decided on an inexpensive yet powerful one based on a FPGA development board. This was also an opportunity for me to learn more about FPGAs and their capabilities.

The logic analyzer is easy to use and I wrote a User Guide. It supports up to 32 input channels with a sample depth of 256K, up to 200 MHz, complex triggering and I2C/SPI protocol analysis. The logic analyzer does however need a 32 channel logic converter and buffer for use with 5V systems. Instead of just building one, I decided to make an interface card available for sale on my website.

So if you have been thinking about getting a logic analyzer, this is an inexpensive ($140) alternative and you still get a FPGA development board to play with.
Back to top
spamiam



Joined: 13 Nov 2005

Posted: 01 January 2009, 21:37 PM    Post subject:

I just got this analyzer, and I will be "configuring" the FPGA to do the work this weekend. It seems to be a really interesting application of an FPGA.

I have looked a little at how to configure (i.e. "program") an FPGA. I really have to shift gears mentally from the logic of programming a CPU.
I am still trying to get any sort of grip on the subject, but I am trying to imagine the FPGA as a massively parallel, extremely RISC, processor. Then I combine that a little with "object orientation" and I am beginning to get a vague idea of how to approach an FPGA. The "objects" are groups of the individual gates that are used to perform a single more complex task.

In the tutorial I have read, they say that you can look at the gates as being infinitely fast. IOW, the output occurs simultaneously with the input. And the tutorial so far has not dealt with clocking. But when an object ("entity") is made from a sequence of gates, there must be a propagation delay, so it does become necessary to use a clock at some point. But I have not gotten that far.

Anyway, the code for the logic analyzer is already written so all you need to do is load it into the FPGA board. Mike's instructions tell how to do this very clearly. As I learn more about what an FPGA will do, the more intrigued I become. I just don't know if I can overcome my decades of CPU programing instincts!

-Tony
Back to top
victorf



Joined: 01 Jan 2006
Location: Schenectady, New York

Posted: 03 January 2009, 13:40 PM    Post subject:

Mike,

Is this system something that a mere mortal could use or would I need to have an in-depth knowledge of FPGA stuff. I have been using my old TEX 453 for many years but need to move on. I would like a logic analyzer but don't want to get out in front of my electronics knowledge. I guess I would want something that is somewhat plug-and-play. I don't mind a learning curve. I am more of a software type than an electronics wizard I'm afraid.

Any enlightenment will be appreciated.

Vic
Back to top
spamiam



Joined: 13 Nov 2005

Posted: 03 January 2009, 17:27 PM    Post subject:

It is definitely plug-and-play. The manual that Mike wrote is quite explicit about how to do the initial programing of the FPGA board. Once programmed, it does not need to be messed-with any longer. After that you just hook up the board via the RS-232 connector (on the board). The PC-side Java program handles the rest.

I am afraid that my reply above made it look as if you needed to know how to write "programs" for the FPGA, but you don't. The program is ready to go. All you do is hook upthe wires to the OMLA-32 add-on board that Mike created and you are ready to go.

-Tony


Last edited by spamiam on 03 January 2009, 21:16 PM; edited 1 time in total
Back to top
mikep



Joined: 24 Sep 2005
Location: Austin, TX

Posted: 03 January 2009, 19:55 PM    Post subject:

victorf wrote:
Is this system something that a mere mortal could use or would I need to have an in-depth knowledge of FPGA stuff.
You do not need to know anything about FPGAs. The FPGA is merely a vehicle in providing an inexpensive, but feature-rich logic analyzer. There are only two things to be concerned with:
  1. One time setup and configuration. If you don't feel comfortable following the instructions in the User Guide, then I could do it for you when you purchase a omla32 interface card. You would only need to pay any additional shipping costs. Send me email or a PM to work out the details.

  2. Using the logic analyzer. Like any test tool you need to learn how to use it and interpret the results. Again the User Guide will help get you started but much depends on the circuit you are testing.
BTW The nearest comparable commercial logic analyzer costs nearly $400.
Back to top
spamiam



Joined: 13 Nov 2005

Posted: 03 January 2009, 21:20 PM    Post subject:

mikep wrote:
If you don't feel comfortable following the instructions in the User Guide, then I could do it for you when you purchase a omla32 interface card.


Would someone be able to buy the FPGA card and have it shipped to you directly from the retailer, then have you program it, and then have you ship both the FPGA and the OMLA-32 on to them?

What would happen if the FPGA is lost in shipment to you?

-Tony
Back to top
mikep



Joined: 24 Sep 2005
Location: Austin, TX

Posted: 04 January 2009, 2:34 AM    Post subject:

spamiam wrote:
Would someone be able to buy the FPGA card and have it shipped to you directly from the retailer, then have you program it, and then have you ship both the FPGA and the OMLA-32 on to them?
That is one alternative. Another is to pay me for the FPGA card, shipping from Digilent to my location, and shipping of the FPGA and omla32 from my location. I would then handle any non-delivery of the item from Digilent.
Back to top
victorf



Joined: 01 Jan 2006
Location: Schenectady, New York

Posted: 27 February 2009, 12:58 PM    Post subject:

I am still considering a logic analyzer. I came across this one:

http://www.saleae.com/logic/

Would someone like to comment on it?

Any enlightenment will be appreciated.

Vic
Back to top
spamiam



Joined: 13 Nov 2005

Posted: 27 February 2009, 15:12 PM    Post subject:

[quote="victorf"]I am still considering a logic analyzer. I came across this one:

http://www.saleae.com/logic/
/quote]

It looks very nice. It is USB rate limited. 24MHZ is the maximum sample rate, and half that seems as if it might be a more reasonable number. For pulse width measurement, the maximum signal frequency needs to be a fairly small fraction of the maximum. So maybe 120KHZ (+/- 8uS) would be a reasonable limit on accurate pulse width measurement.

It is limited to 8 channels, which is probably enough for 99% of all uses.

The cost is reasonable.

The user interface looks pretty, but I have not tried the demo.

The hardware is compact and very functional. I am not sure about the length of the leads. They might be a little short, but given the hardware compactness, it will be able to get pretty close to the circuit under test.

All in all, it looks pretty good.

I am currently working on updating the PC software for the Spartan3-based logic analyzer for which Oak Micros makes an input level shifter. The software has all the functionality of the Saleae unit, but the screens are not as pretty. The Spartan3 unit has up to 31 channels in the most current version. It downloads the data comparatively slowly to the PC, but it can record the logic signals up to 200MHz. It now uses run length encoding so it is very possible to have data spanning more than 256K clocks of duration. With intermittent signals, like on any serial bus, the recordings can span a very long duration. I.E. more than 2^32 clocks, which creates all sorts of headaches with a GUI interface designed with a span of only up to 2^32. I am currently working on a total re-write of the method that the data is displayed, and this means that nearly every module and subroutine needs to be re-written. When complete, it ought to offer significantly more than the Salae unit. That being said, the Salae unit is really nice and the hardware is really compact and looks easy to use!

-Tony
Back to top
mikep



Joined: 24 Sep 2005
Location: Austin, TX

Posted: 27 February 2009, 15:12 PM    Post subject:

victorf wrote:
I am still considering a logic analyzer.
For my purposes it is insufficient as it only handles 8 channels and the capture speed is limited to what can be transmitted on the USB bus (up to 24 MHz but 12 MHz is more likely).

No-one can answer your question for you because it all depends on your criteria. The way I normally go about a purchase decision like this is:
1. Research the topic so I understand what is available and the pros and cons of different specifications and criteria.
2. Decide on what my criteria are and perhaps attach a weighting to each.
3. Score each of the items against the criteria and perhaps ask a question or two to clarify my understanding.
4. Review the scores and make a purchase decision
5. Ask my CFO for purchase approval of any item over $10 (optional)

I was going to patent this method but someone else beat me to it Smile
Back to top
stevech



Joined: 23 Feb 2006

Posted: 28 February 2009, 3:23 AM    Post subject:

mikep wrote:
victorf wrote:
I am still considering a logic analyzer.
For my purposes it is insufficient as it only handles 8 channels and the capture speed is limited to what can be transmitted on the USB bus (up to 24 MHz but 12 MHz is more likely).

No-one can answer your question for you because it all depends on your criteria. The way I normally go about a purchase decision like this is:
1. Research the topic so I understand what is available and the pros and cons of different specifications and criteria.
2. Decide on what my criteria are and perhaps attach a weighting to each.
3. Score each of the items against the criteria and perhaps ask a question or two to clarify my understanding.
4. Review the scores and make a purchase decision
5. Ask my CFO for purchase approval of any item over $10 (optional)

I was going to patent this method but someone else beat me to it Smile


Yep. A trade-off study as we say. Where the ranking is not just price.
Back to top
twesthoff



Joined: 17 Mar 2006
Location: Virginia, USA

Posted: 28 February 2009, 15:34 PM    Post subject: Inexpensive Logic Analyzer

General wrote:
Quote:
mikep wrote: victorf wrote: I am still considering a logic analyzer. For my purposes it is insufficient as it only handles 8 channels and the capture speed is limited to what can be transmitted on the USB bus (up to 24 MHz but 12 MHz is more likely).


There may be a misunderstanding here... Some of these devices capture the data at very high speds and then send what they capture to the scope via USB to be displayed on the screen.  The speed of the USB does not factor in to their ability to capture the digital signals. 





Back to top
mikep



Joined: 24 Sep 2005
Location: Austin, TX

Posted: 28 February 2009, 16:16 PM    Post subject: Re: Inexpensive Logic Analyzer

twesthoff wrote:
There may be a misunderstanding here... Some of these devices capture the data at very high speds and then send what they capture to the scope via USB to be displayed on the screen. The speed of the USB does not factor in to their ability to capture the digital signals.
In general you are correct and this is certainly true of the FPGA-based Logic Analyzer that I started this thread with. It includes 1 MByte of RAM which allows a capture depth of up to 256K for 32 channels.

The 8-channel "Saleae" device doesn't appear to have any onboard RAM and depends on storing data directly to the host PC. It says clearly in the documentation that their capture rate is limited to the USB bus speed and that if the PC is busy with other things, the capture rate might be lower.
Back to top
Display posts from previous:   
Page 1 of 1

 



ZBasic Microcontrollers Home
All content Copyright © 2005, 2006, 2007, 2008, 2009, 2010 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group