How to Make an Energy Efficient Remote to Turn Off Any TV

Firmware Modification

4 of 8
tv-b-gone energy efficient make diy

credit: Jinseok Jeon

4 of 8

First of all, download the original firmware, v1.2, from Adafruit from this link.

Open the main.c from any text editor like Notepad and find the end of the DO loop where the 250ms delay before the next code generation.

// delay 250 milliseconds before transmitting next POWER code
delay_ten_us(25000);

Just before these lines, add these two lines (three lines including the comment starting with //).

// exit do loop if REGIONSWITCH is pressed
if ((region == US && !(PINB & _BV(REGIONSWITCH)))
|| (region == EU && (PINB & _BV(REGIONSWITCH)))) break;

Now it will look like this together.

// exit do loop if REGIONSWITCH is pressed
if ((region == US && !(PINB & _BV(REGIONSWITCH)))
|| (region == EU && (PINB & _BV(REGIONSWITCH)))) break;

// delay 250 milliseconds before transmitting next POWER code
delay_ten_us(25000);

Save and quit the text editor.

Now compile and create the .hex file and upload it to an ATtiny85v chip using your favorite programmer. There are many commercial programmers but I have used one using the Arduino-ISP. If you are interested, please visit my blog and see this post and this.