pic microcontroller discussion list <> wrote on Monday, June 09, 2003 1:32 PM: > --- Anand Dhuru wrote: >> You can >> generate the 37 KHz carrier in PIC, use another pin for the data, >> and drive a simple IR LED directly between these two pins >> without any extra hardware. > > Why do you need TWO pins for transmit? Why not > just use one pin (for the carrier) and enable/disable > the carrier according to the data? That is what I do, my home IR repeater mentioned before uses the PWM module to generate a 38kHz pulse stream, then turns the PWM on and off (or sets the pin as an input or output, can't remember at the moment!) as the demodulated data goes on and off. It works very well. The PIC version is much easier than the 555-timer-based one it replaces, because the frequency is based on the internal 4MHz oscillator, so no setup is needed. It also allows some more sophistication to ignore received data from the local receiver while transmitting, and other 'features'. I can't think of many occasions where external gating of the carrier would be useful. Nigel -- Nigel Orr, Design Engineer nigel@axoninstruments.co.uk Axon Instruments Ltd., Wardes Road,Inverurie,Aberdeenshire,UK,AB51 3TT Tel:+44 1467 622332 Fax:+44 1467 625235 http://www.axoninstruments.co.uk -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! email listserv@mitvma.mit.edu with SET PICList DIGEST in the body