How to decode IR remote control signals with your PICkit 2

[SpiralBrain] needed to figure out the coding scheme used by an IR remote control so that he could use it with his own project. He built an IR receiver board for the PICkit 2 and figured out how to use some of the Microchip software to measure the timing of the incoming signal.

The hardware’s dead simple; a 38 kHz IR receiver does the heavy lifting by filtering out errant infrared light. When it does detect a signal with the correct frequency the output pin drives the base of a transistor to toggle the input pin on the PICkit 2. The breakout board has a pin header which makes it a snap to detach and store for later use. The PICkit 2 Logic Tool software captures this input, by setting the correct pin as a trigger and choosing a 10 kHz sample rate.

As we discussed in our PIC programming with Linux tutorial, the PICkit 2 really is far superior to its replacement, the PICkit 3. [SpiralBrain] mentions that it is more versatile than the newer version but doesn’t go so far as to tell us whether you can use this hardware with the PICkit 3 or not.


  1. Bogdan says:

    I forget about this tool sometimes. It’s a great addition to the programmer.

    Never thought about it as IR decoder as of yet… Good idea!

  2. Bogdan says:

    Anyway, why the transistor for the inverter?

  3. nate says:

    I’ve noticed that a lot of IR remotes tend to cause interference with audio equipment (sensitive mics, pickups, etc). I’ve never worked with IR before personally, but I’ve always wondered if you could just use an inductor and a sound card to figure out IR codes.

  4. SpiralBrain says:

    Oh great, the post made it! Thanks HAD!

    It will not work with PICKit 3 for sure because it does not support signal capture. Microchip never released the source for the PICKit 3. PICKit 2 however is an open source project and a lot of people contributed to add the additional features.

    @Bogdan A transistor makes the visualization easier, a high level represents an IR reception. It would however work without the transistor too but a low pulse would indicate IR reception in that case.

  5. atomsoft says:

    kind of useless unless you know the IR protocols. Measuring by hand can be a hassle.

    Ive done this so many times with the pickit 2, nothing new… you should include this link to help users decode the Protocol

    On the left hand side are protocols and the user can simple go through them to find one that matches.

    Would make creating a decoder easy!

  6. hubert says:

    I like this very cool project, i own a pickitIII and that doesnt work, but i think my buspirate will do the job.

  7. nics says:

    i have one doubt…
    at witch time , i have to capture it??
    i have press one key at time and hit RUN and get one waveform,but by pressing that key when i again hit RUN the waveform did not same….
    so i have confusion that witch waveform i have to consider?
    and why all time different waveform occur.

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,612 other followers