I have been tinkering around with a new project that needs to send Extended NEC protocol over IR. The protocol uses a time based unit consisting of a pulse 2.25ms long with the first 560uS containing the 38khz modulation and the rest of the 2.25ms with no output. Similiarly a logical "0" is a 1.12ms pulse with the first 560uS containing the modulation. I have never used a hardware PWM port on the PIC before and am wondering if that is a more efficient way to go than to generate the 38khz in software. I have been looking specifically at the PIC16F628. I have 2 questions for the group. 1) Do you recommend using the hardware PWM for the modulation to simplify coding and 2) What is the "appropriate" way of turning the 38khz on and off? It looks like maybe enabling and disabling the associated TMR will do it, but is that the right way? Many thanks. -James -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist