To transmit a long distance, you will need to use an external transistor to boost the drive current of the output pin. The PIC's output is current limited. The code is simply a variant of the bit bang serial communication routine. What is harder to come by is the actual codes, baud rates, and encoding schemes that need to be transmitted. Manufacturers are very tight with this info. Several years ago I needed to decode a SONY IR signal. SONY was no help at all. I ended up using a logic analyzer to capture the output and then wrote my code mimic it. Universal remotes are available for cheap these days. If you are making only a few of these devices, I would suggest that you purchase a universal remote as your IR engine and use the PIC to fake out the key closure on the universal remote. That would be the quickest way to get it up and running. stevem@tanisys.com ---------- From: pic microcontroller discussion [SMTP:PICLIST@MITVMA.MIT.EDU] Sent: Tuesday, September 24, 1996 2:11 PM To: Multiple recipients of list PIC Subject: Need code to generate RC-5 infra red commands To: Multiple recipients of list PICLIST Hello all, I am trying to find suitable code to allow me to connect and infra-red LED to a port on a 16C84 so that I can remote control a Philips VCR. I need to be able to generate the relevant infra-red output for the following commands: POWER ON, RECORD, STOP. If anyone's already done something like this I'd appreciate any advice and especially some code too :-) I expect there's a project lurking on a Web page somewhere that would solve my problem but so far I haven't found one. Thanks. /\_/\ / o o \ (== ^ ==) ) - ( ( ) ( ) ( ( ) ( ) ) (_(_)_(_)_)