Basic logic analyzer on raspberry pi using PICKit2

I discovered this little trick for all of you out there that uses the rpi for the electronics projects like I do.

First, go to this link and download the pk2-la zip file, and extract it somewhere like a Downloads folder on the rpi.

Then go “sudo apt-get install python-usb”, which will install the USB stuff for python, and just run the pk2-la executable through root command line, or “sudo pk2-la”. Make sure your pickit2 is plugged in before you run it tho otherwise it will not run.

I copied the pk2-la file, LA-Format file, and IO-Format file to /usr/bin so I could just call it from anywhere in the command line by using “sudo pk2-la”.

You should see a window pop up after a few seconds looking like this:


You need to hook 5v from your circuit to pin 2 and gnd to pin 3/middle pin, then the other three inputs are shown in this diagram:


And there you go, a 3 channel logic analyzer for your Raspberry Pi 😛

All credit for pictures go to Josejx at and Microchip.


6 Responses to Basic logic analyzer on raspberry pi using PICKit2

  1. Vicho says:

    Hi. I isntall phyton-usb and python-gtk2-dev, the i tried run pk2-la but i can’t. Konsole say:
    vicho@vicholaptop:~$ sudo pk2-la
    Traceback (most recent call last):
    File “/usr/bin/pk2-la”, line 27, in
    import pango
    ImportError: No module named pango
    i don’t know about phyton, please any suggestion??
    thank. atte vicho

    • cae2100 says:

      which distro do you use?

      from what Ive found, it’s part of the pygtk2 package, on debian/raspbian, use “sudo apt-get install python-gtk2”

      • Vicho says:

        Hi. I use Kubuntu 12.10. i tried this but….
        vicho@vicholaptop:~$ sudo apt-get install python-gtk2
        [sudo] password for vicho:
        Leyendo lista de paquetes… Hecho
        Creando árbol de dependencias
        Leyendo la información de estado… Hecho
        No se pudieron instalar algunos paquetes. Esto puede significar que
        usted pidió una situación imposible o, si está usando la distribución
        inestable, que algunos paquetes necesarios no han sido creados o han
        sido movidos fuera de Incoming.
        La siguiente información puede ayudar a resolver la situación:

        Los siguientes paquetes tienen dependencias incumplidas:
        python-gtk2 : Depende: python-cairo (>= 1.0.2-1.1) pero no va a instalarse
        E: No se pudieron corregir los problemas, usted ha retenido paquetes rotos.


      • cae2100 says:

        I dont understand spanish, but I believe you need python-cairo, just use apt-get to get it.

  2. Vicho says:

    Hi. Im sorry for lost. I’m busy for my job.
    Finally I did it , I did install/repair python-cairo, then I install python-gtk2 and pk2-la running in my notebook.
    thank you for you help and your time.

    atte vicho

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

%d bloggers like this: