TV Tuner IR remote with a PIC16F684


Tahmid built a TV tuner IR remote with a PIC16F684:

I then proceeded to write an IR transmitter using the PIC16F684 (using the MPLAB X IDE and XC8 compiler), following the timing information from the extended NEC protocol. In order to connect all the keys, I connected them in matrix keypad form.
In order to power the remote off 2xAA batteries, it is necessary to use sleep mode – otherwise the battery will be drained extremely quickly. So, in order to detect when a button is pressed, an interrupt is used. After the IR command is sent, the microcontroller goes to sleep. The interrupt wakes up the microcontroller when a button is pressed. Debouncing is achieved using simple software delays. When a button is held down, the NEC command repeat sequence is not sent. Instead, the remote relies on releasing the button and pressing it again.

More details at Tahmid’s blog.

Join the Conversation

1 Comment

  1. He had qualms about electrolytic cap leakage impacting sleep current. I think such leakage is very low and hard to measure using hobby equipment, so caps are fine, it’s easy to sleep a PIC around 1-2uA once you get the hang of it.
    Wiring the IR LED like the red LED would limit its drive current and range. When alkalines gets weaker, one might possibly see reduced IR range. Usually circuits on the ‘net have a low-side NPN or NFET to switch more current; one can also add a separate tank cap for this high current portion. And in doing so, the duty cycle is often reduced say to 1/3 to keep average current under control.

Leave a comment

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.