MSP430 Infrared Remote Decoding

I wanted to fool around some more with the MSP430 and an IR receiver IC I’ve been sitting on for awhile. I have a few TSOP3823 receivers ordered from Mouser some weeks ago and haven’t done anything with them yet. So I dug out an old IR remote from the junk box, one that came with an Hauppauge video card that I built my MythTV box around years ago and didn’t need. It happens, I discovered, to use the Philips RC5 data protocol.

The RC5 commands are made up of fourteen bits. The first two are start bits, which are always high. The next is a toggle bit that, well, toggles, with each keypress to make a distinction between holding a key down and letting it auto-repeat, or two presses of the same button. Next come five address bits, for controlling different devices that may all use the same RC5 commands. A remote that is capable of controlling a TV and other components would use this to target one device specifically, though they may all use the same command set. Lastly comes the six command bits. This is just a six-bit binary number indicating which button was pressed on the remote.

The TSOP receivers detect the IR output of the remote control and strip away the (in this case) 36kHz carrier signal, and output the stream of 14 bits at logic levels, so they can be decoded by a microcontroller directly. They can operate at up to 5 volts and below 3.3 volts, which is where I will use it for the MSP430.

My code for parsing the IR data and switching a couple of LEDs on and off can be found here.


  1. angelditi says:

    I am using msp430f5438A for IR decoding receiver working on rc 5 protocol but I am not getting that how to read data on port10 i/o pin as it is not decoding the command on the pin i have used.
    there is no port1.6 available on the board so can you please give some basic idea as I am beginner to used these experiment board.

  2. JJ says:

    Good stuff Jerry. Keep it up !

Leave a Reply

Your email address will not be published. Required fields are marked *

* Copy This Password *

* Type Or Paste Password Here *