PIC16 Infrared receiver with Nec code
no vote
This project use a generic 38KHz infrared riceiver to decode standard nec codification used in the most popular tv remote control, i test this code on PIC 16F873 but it's suitable for a lot of different PIC, like PIC12,16,18,dsPic,33.
The signal received is demodulated by infrared receiver connected to RB0, the change of state of this port, generate an interrupt.
At the same time the TMR0 is used to check the timing of signal and understand if reciving a 0 or 1.
In this firmware the code received is write directly into the PORT C, but you can change it to activate relay or led.
The code is portable to other microcontroller with external interrupt end timer capabilities.