Hi. Standard UART communication isn't very well suited for IR comm at all. The possibility of a long sequence of "0" or "1" without any level shift can mess up things more or less depending on what type of receiver used. Better to use "pulses" of different length to represent "start", "one", "zero" and maybe "stop" bits. A kind of PWM. In one solution I made, I made the length of the different pulses such as when measured with a timer (zerod on the rising edge and read on the falling edge) running at a specific speed, each type of pulse was represented by a single bit in the timer. Made the logic quite simple, just a single btfss or btfsc to check what bit is was. Regards Jan-Erik. -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads