Using the parallel port as a logic sniffer

[Fernando] wrote in to share his take on building a logic analyzer. He’s using the parallel port to capture data and feed it to the display software of your choice.

The method depends on a custom kernel which alters the way the parallel port works. The kernel he compiled includes a method of intercepting the signals coming in from the hardware, passing that data to the /dev/parport* as it should, but also sending a copy to /dev/parportsnif*. It also creates a log file which is in the OpenBench Logic Sniffer format for easy use with various display software.

Of course this is easiest to use with a Linux system, but can also be run as a virtual machine under Windows. We’d plan on using a virtual machine within Linux as well since this is a custom kernel and will probably only see occasional use.


  1. my2c says:

    - Very nice, I vote parallel ports get brought back. Jeez, my last build I found the hard way many MB’s don’t even have an IDE bus anymore so I could use a dvd drive I had laying around…

  2. Alex Rossie says:

    This is a module not a kernel.

  3. Reynald says:

    Remember The Fabulous Logic Analyzer ?

  4. Whatnot says:

    Perhaps a link for the under 20’s as to what a parallel port is might be appropriate.

    Yes I’m saying no computer has those anymore, and in fact unfortunately not even serial ports :/ but damn floppy ports live on though.. so we need hacks to do something with those since currently they are not in use.

  5. anon says:

    Both my PC’s have them. They’re so much faster for prototyping than USB (im a windows user and holy shit at the things you need to do for libusb).

  6. Drone says:

    There is no explanation why the Author is removing the existing LP kernal support and using his kernel module. Sounds like a lot of trouble. Why not just use the existing parallel port support?

    • Alex Rossie says:

      By the sounds of it the real ports remain I haven’t looked at his code but the old module is just a modprobe away anyways.

    • edonovan says:

      “It also creates a log file which is in the OpenBench Logic Sniffer format for easy use with various display software”

      Not sure why you couldn’t just write code that watches the port and creates the log file, though.

    • Fernando says:

      It’s just an rmmod, as soon as you restart the module will be up again (man rmmod).

    • Fernando says:

      Well, this is actually a parallel port sniffer, to see what programs do with the parallel port. In fact I was able to analyze a BlueLab program that uses the parallel port to program a bluetooth chip with this kernel module. I didn’t think of it as a logic analyzer as hackaday suggest, but I guess it will work. To use it as an analyzer, you would need to make a small program that keeps reading the parallel port in a loop, and then use any of the data pins.

    • Mikey says:

      I’d assumed it was because Linux is not (by default) an RTOS, and you’d want to keep the OS from messing up your timing; in which case this would be pretty cool, just pop the module in, instead of having to recompile your entire kernel (as some CNC software makes you do).

      However, Fernando hit it on the head, methinks.

  7. S says:

    I’ve used this one TFLA-01 that is a simple logic analyzer for the PC.

  8. Aussietech says:

    Here’s an argument for hanging on to some old hardware like 386’s just for futzing with.

  9. Tony says:

    A very old project like this was to use an 8-bit ADC and read the data thru the LPT port, giving you a way to log analogue data (battery voltages etc).

    An even older project sent the data as 2 sets of 4 bits (via the status lines) as the data lines were output only.

    The parallel port has survived for a surprisingly long time. If your motherboard doesn’t have the connector it may have a header for it on there somewhere, you’ll need to find the cable for it.

    • Mikey says:

      You really need an RTOS if you want to do any kind of analog data logging with the parallel port — and even then you’re only going to get 5 bits of precision — since the parallel port only has 5-input bits.

  10. Alex Rossie says:

    Also paraelle port/ serial dev boards are about half the price of usb ones

  11. Funky Gibbon says:

    I did this project many years ago, first useing QBasic, Remember that? the i went on to make a graphical version with Borland Visual C++, fine till you get to winXP, no special hacks, just used portIO for winXP to open the ports up, I still use a Compaq evo N6000c for deving from time to time, it has just abou every hardware port you could want

  12. blue carbuncle says:

    How timely :) I was just browsing some parallel port tricks last week and getting all inspired. Found a lil dell craptop P3 700Mhz that is all linuxed out and ready to play. Love the old stuff :)

  13. Anonymous says:

    I was using this in 2003


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 96,423 other followers