How to transmit RC5 signals?

I need to make a remote, the codes are “0 x 15” system (not sure what that means.) For example, one of these codes is 0x61

They are all listed here http://www.cinemateq.de/uploads/43.pdf

What do you think would be the cheapest way to do this? I have a TI MSP430. I’m also considering universal remotes and programmable remotes, even if I have to mod them. I have experience with circuitry and soldering but admittedly no experience with microcontrollers. I’ve tried to search on the internet a lot but the little I do find, I don’t understand. Thanks a lot!!

This is the RC5 protocol:

http://en.wikipedia.org/wiki/RC-5

The 0x15 codes look like they are simply numbers in hexadecimal system: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F,10,11,12,13, etc.

Have you read this?

www.ti.com/lit/an/slla175/slla175.pdf

Though you might want to start with a more simpler project first to get your feet wet in the world of microcontrollers. Using interrupt-routines is a quite advanced topic.

Thanks for the reply Valen. I’ve read that project sheet a lot! Even downloaded the sample code here http://www.ti.com/general/docs/litabsmu … er=slla175

What I don’t understand is how how the rc5 code # gets translated to the 0s and 1s in the actual signal. Is it just translated to binary?

I believe the sample code uses the actual signal high and signal low times in ms. Even if I could calculate those times, I don’t understand how to put them in, and it says something in the code about times being adjusted for software lag. Not sure what that means.

Metafight:
Thanks for the reply Valen. I’ve read that project sheet a lot! Even downloaded the sample code here http://www.ti.com/general/docs/litabsmu … er=slla175

What I don’t understand is how how the rc5 code # gets translated to the 0s and 1s in the actual signal. Is it just translated to binary?

I believe the sample code uses the actual signal high and signal low times in ms. Even if I could calculate those times, I don’t understand how to put them in, and it says something in the code about times being adjusted for software lag. Not sure what that means.

Do you understand that each press of a button results in a 14 bit packet being sent ? That each packet has a start bit, then a feild bit, then a toggle bit, then 5 bits that denote the specific device the message is intended for and finally 6 bits that make up the command to be executed by the device. That each bit is really a sequence of some pulses of IR light, that sequence and timings are depicted in the wiki and the top of this diagram.

http://upload.wikimedia.org/wikipedia/c … etails.jpg

A bit = 1 would be 889 usec of no IR followed by 32 cycles of IR on/off. A bit = 0 would be 32 cycles of IR on/off followed by 889 usec of no IR. Note that the TI coding used a IR modulation frequency of 40 kHz vs the above 36 kHz so the times are slightly different. Most consumer IR and receivers for IR use a mod frequency of 38 kHz. Go figure !

Say your device had an ID or address = 5 and you wanted to send it a 7. The resulting 14 bits would be (MSB to LSB) 11000101000111. Another example but this time sending a power on per your PDF. Power on is 61 hex or 97 decimal or 1100001b. You’ll note this is 7 bits long and so you need to use the expanded RC5 coding that uses the feild bit as part of the command. The feild bit is set to the complement of the MSB, in this case the MSB=1 gets you a feild bit=0. So the 14 bits sent would now be 10000101100001.

You have 2 choices in making the modulated IR output. You can have the MCU do all the timings or you can have another device do the modulation of the IR, pulsing the IR diode on/off with the desired 25-33% duty cycle (and thus freeing the MCU from having to do this “fine” timing") and then have the MCU just enable or disable this device every 889 usec. I mention this because some MCUs, most really, don’t have enough current source or sink capability to drive an IR LED as hard as you might want. Since you’ll have to have some external circtuitry to do this you might as well have a little more and do the 36-40 kHz modulation with hardware vs software and thus simplifiy the coding.

Software lag (in this case) is the time it take the software to run. Say you want to time a pulse of IR light to be on for 25% of 27.8 usec (= 6.95 usec, let’s call it 7 usec). If you set a timer to go off every 7 usec, there’s some additional time is takes the sofware to run and set a digital output to on or off. You want to take this time (really the time differences down the various paths) into account and adjust your timer according.