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.

    1. You can use an AM radio connected to a sound card. The AM radio will pick up the crystals output that most IR remotes use internally.

  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. Yeah thats true. All in all its a good post! I wish i could get some of my older post on here.

        Hey in fact, ill try making something neat today and see if it can be placed on HAD! Would be cool!

      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

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

WordPress.com Logo

You are commenting using your WordPress.com 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