If you are looking for an extremely inexpensive way to decode infrared signals, well then look no further. By taking an IR sensor and hooking it up to an oscilloscope, I decoded the signals sent from a generic universal remote control. By counting the number of bits being sent it is easy to create a timer within the micro controller (PIC16F886) to determine if a '1' or '0' is being sent.
By enabling the positive going trigger (PGT) as my start and NGT as my stop, I could time the pulses within the µ-controller using the interrupt and a pretty intense 'if' statement . I counted the pulses, plugged them into an array and then printed them to an LCD screen first in binary, then in hex (for spacial reasons of course).
I then took it a step further and wired up a solid state relay so that I could control power directly from any wall socket from my pcb. By doing so, I can essentially control anything that is run from the standard 120AC 60 Hz power