This circuit receives the signal from a IR remote control, like those used to control your TV or DVD player and allows the signal to be repeated in another location.Β Β
To get a 40Khz carrier requires an output to be toggled on and off 40,000 times a second, which means the code needs to execute in 1,000,000/40,000 instruction cycles; this gives a very tight 25 instructions in which to do the job. Fortunately itβs an easy job to do so most of the instructions are just used to waste cycles.Β Itβs not easy to get an accurate frequency with so little time andΒ few instructions cycles to play with but the IR receiversΒ will work several Khz either side of their design detection frequency so itβs not a problem.
This code can generate a 40Khz, 38.4Khz or 37Khz carrier with a ~15% duty cycle.Β The frequencies are configurable in the source code such that once programmed GPIO5 input on the PIC allows the selection of two frequencies.Β By default the code is set to produce 40Khz and 37Khz carriers which are modulated by the logic level on GPIO2.Β This would generally be connected to a IR decoder IC.
One thing I did find with the Sony equipment (I havenβt tested it with anything else), 875nM IR LEDs donβt seem to work, but the 950nM one specified works well. (TSUS5400, Mfg Vishay. Available from Farnell, part number 178302)
- Source Code (supports 12F629, 12F675, 12F683 21/06/2009)
- Hex (right-click Save As) for 12F675 / 12F629.
- Hex (right-click Save As) for 12F683
- Schematic
For more detail: IR Remote Control Repeater using PIC12F629