blog dds


A Unix-based Logic Analyzer

A circuit I was designing was behaving in unexpected ways: the output of a wireless serial receiver based on Infineon's TDA5200 was refusing to drive an LS TTL load. To debug the problem I needed an oscilloscope or a logic analyzer, but I had none. I searched the web and located software to convert the PC's parallel port to a logic analyzer. I downloaded the 900K program, but that was not the end. Unfortunately the design of Windows 2000 does not allow direct access to the I/O ports, so I also downloaded a parallel port device driver and a program to give the appropriate privileges to other programs. Finally, I also downloaded from a third site the Borland runtime libraries required by the logic analyzer. Needless to say that the combination refused to work.

I decided to solve the problem from scratch, and this proved to be trivial, given the right environment. Linux provides system calls (available to root) for directly reading the I/O ports, so sampling the printer port is a matter of a simple loop. Displaying the results can also be very easy: a call to GNU plot will create beautiful auto-scaled graphs in a variety of formats and for different output devices. The prototype program I wrote to sample the port and display the results using GNU plot was just 63 lines of code, demonstrating yet again the power and flexibility of a tool-based approach.

Sample Outout

Read and post comments, or share through   

Creative Commons License Last modified: Sunday, October 26, 2003 11:52 pm
Unless otherwise expressly stated, all original material on this page created by Diomidis Spinellis is licensed under a Creative Commons Attribution-Share Alike 3.0 Greece License.