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.

14 thoughts on “How To Decode IR Remote Control Signals With Your PICkit 2

  1. 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.

  2. 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.

    1. I wish they would open up the pickit3. I had to get one to support some of the newer chips but wish I could still use the pickit2 instead. There is no reason for them not to open up the pickit3.

      1. Thanks SpiralBrain, i couldnt find your real name anywhere :(

        Someday i hope to be on HAD, just thinking of something cool to create… Going to make a post on my blog for idea suggestions.

        If you have one feel free to post it..

  3. HI,ALL
    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 to BogdanCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.