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.