How to decode IR remote control signals with your PICkit 2

posted Sep 26th 2011 5:01am by
filed under: tool hacks

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



13 Responses to How to decode IR remote control signals with your PICkit 2

  • 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!

  • Bogdan says:

    Anyway, why the transistor for the inverter?

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

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

    • cgimark says:

      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.

      • SpiralBrain says:

        Yeah that would be pretty cool. Same here I had to get the PICKit 3 for that reason. If its open source, clones would surface hitting sales, Microchip must be afraid of that.

  • 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

    http://www.sbprojects.com/knowledge/ir/index.php

    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!

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

  • Leave a Reply

    XHTML: You can use these tags: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

    Hack a Day serves up fresh hacks each day, every day from around the web as well as hacking related news.

    Send us your hacks






         




    Hacks

    Resources