>I have used 2 pins of a pic to do this job: (PIC16F872) at 4Mhz >One was a PWM output at 38kHz, 1:2 duty cycle Second was I have a transmitter that only uses one pin (no 555 either). No pwm or interrupts, just synchronize your code with timer2. It's not sending actual tv codes (note the parity bit), but it could by just changing the loop counter to send 12 data bits and then deleting the parity code. I use three Vishay TSAL6200 LEDs in series (5V) driven by a ZVN4306AV N-FET, and a Sharp GP1UD28YK or GP1UD26XK receiver. Here is part of the program in ccs c: -------------------------------------------------------------- #define T2_TICS_25US 25 //(0.000025/(1/CLK_HZ*4)) 4 megs = (0.000025/(1/4000000*4)) = 25 setup_timer_2(t2_div_by_1, T2_TICS_25US, 1); // setup the ir data timer // ---------------------------------- // timer2 is much simpler than timer0 // ---------------------------------- #define eX_WAIT_FOR_TMR2() PIR1.TMR2IF = 0; while (!PIR1.TMR2IF); // location of TMR2IF varies // ---------------------- // Send 25uS 40kHz pulses // ---------------------- void IRSndPulses(int8 pulses8) { do { eX_WAIT_FOR_TMR2(); // (macro!) wait for the beginning of the next clock period #use fast_io(IR_LED_PORT) output_low(_IR_LED); // turn on our ir led delay_us(12); // (max at 4mhz) on for 12uS is 50% of the 25 uS clock period output_high(_IR_LED); // turn off our ir led #use standard_io(IR_LED_PORT) } while (--pulses8); // if more pulses, loop return; } // --------------------------------------- // go dark for 600 uSec (24 clock periods) // --------------------------------------- void IRGoDark(void) { int8 xx8; for (xx8 = 0; xx8 < 24; ++xx8) { // 600uS is 24 clock periods eX_WAIT_FOR_TMR2(); // (macro!) wait for the beginning of the next clock period } return; } // -------------------------------------------------------- // send the odd-parity, sony-tv-type command via our ir led // -------------------------------------------------------- void IRSndCmd(void) { int8 xx8, yy8; // work areas int16 xx16; // shift work area xx16 = eX_sonyTVCmd16 | (myAddr8+1);// move the tv code to a work area IRSndPulses(96); // send header: 96 periods on = 2400 us IRGoDark(); // go dark for 600 us (24 periods) for (xx8 = 0, yy8 = 0; xx8 < 11; ++xx8) { // send 11 data bits if (shift_right(&xx16, 2, 0)) { yy8++; // add one to the "one" bit counter IRSndPulses(48); // send one bit: 48 periods on = 1200 us IRGoDark(); // go dark for 600 us (24 periods) } else { IRSndPulses(24); // send zero bit: 24 periods on = 600 us IRGoDark(); // go dark for 600 us (24 periods) } } // --------------------------------------- // now, send the parity bit to keep it odd // --------------------------------------- if (!bit_test(yy8, 0)) { IRSndPulses(48); // send one bit: 48 periods on = 1200 us IRGoDark(); // go dark for 600 us (24 periods) } else { IRSndPulses(24); // send zero bit: 24 periods on = 600 us IRGoDark(); // go dark for 600 us (24 periods) } return; } -- 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