A simple logic analyzer

ian – Tue, 2006 – 07 – 04 12:30

In the process of building my H-bridge controller, I needed to watch what was happening on the I2C bus. I built a simple logic analyser that runs off a PC's parallel port. It's based on the active design from JWA Systems, although I have to admit that I didn't look at the schematic before I started building it. I assumed that the source code for the control software was on the website, which it isn't. Fortunately, the designer had the same idea that I did for how the thing should work. I used a 74HCT541, because that's what I found in the junk box. It's all soldered to (surprise, surprise) more Veroboard. I hot-glued the wires in place to reduce the risk of yanking them out of the board. Logic analyzerLogic analyzer IC test clips are what you usually attach to a device like this. They're awesome for general testing, too. Buy the smallest ones you can find (these ones are 40mm and a fraction too large) and a bunch of alligator clips. Then you can clip your multimeter or power supply or whatever to an IC pin and not have to hold it there yourself; you can jury-rig connections between different IC's and components; you can do all sorts of quick hacks without having to get the soldering iron. I had a lot of trouble getting the DigiTrace software to cooperate, and I'm still not really satisfied with it. I'm using WinXP, so I had to use the AllowIO utility from http://www.beyondlogic.org/porttalk/porttalk.htm. Invoke DigiTrace with: allowio digitrac.exe 0x378 I also needed to use the DisableWarmPoll registry hack on the website. The documentation on the website is pretty out of date. My interpretation of what the DigiTrace settings actually do is:

  • Trigger channel: a high on this channel will cause the software to trigger. Or maybe a transition. Or random noise. I never really got triggering to work reliably.
  • Pre trigger delay: I have no idea. I thought that this would let you set a delay between the trigger event occurring and sampling starting - but it didn't make any difference. Setting it negative (to let me see what happened just before the trigger event) did nothing, either.
  • Samplesize: This seems to be somehow correlated with the number of samples that were taken. I used 1000.
  • Sample period: This determines how much time passes between samples. Higher values mean a slower sampling frequency. The hardware isn't perfect, either - but what do you expect from something made from junk parts? A lot of people report issues using parallel ports for this sort of task due to voltage or timing issues, but I had no trouble at all - on a laptop, no less, over a five metre cable. The main problem that I encountered was crosstalk between the channels causing false triggering. Tying the channels low with a high-value resistor would eliminate this, as would fixing the software to only trigger on the channel that it's set to. Despite all of these problems, it's a useful little tool. If I find myself in a position where I'm using it regularly, I'll rewrite the software - or buy a cheap oscilloscope.


Reply

Please solve the math problem above and type in the result. e.g. for 1+1, type 2
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
More information about formatting options