As part of an (academic) project, I need to implement point-to-point IR transmission using an async serial format. As I understand it, IR transmissions must use a carrier for preventing ambient IR interference. 38 KHz seems to be pretty common. I will be using a 16F877 [mandated :-( ]. The AUSART would be ideal for baseband stuff, and with an external 38 KHz clock and an AND gate, this would be simple. But we need to do as much in software as possible, so I was wondering if there was some clever way to directly let the USART control the IR LED, since the modulation is simply ASK. I thought the PWM module could be used to generate the 38 KHz carrier, but how would I use the USART to switch the duty cycle between 0 and 50%, without some sort of external feedback connection? Another approach might be to run the USART at ~38.4 KHz and "send" 0xAAs and 0x00s to emulate 38 KHz ASK.... Of course, if I just used the PWM and wrote a bit-banged custom USART these questions wouldn't arise, but I would love to use the hardware USART..... FYI, the source data is from a PC parallel port. Cheers, Ishaan -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics