I wanted to modify v1.2 of the TV-B-Gone firmware. I was excited when I finally succeeded in re-compiling the code and flashing the ATtiny85 chip, but when I tested I couldn't get any TVs to turn off. (The device worked fine if I flashed with the original hex code, but not with the hex code that I created by recompiling.) User kandizzy's post referenced above pointed to a likely cause of the problem--timing differences in the transmitted signal. I made the following code change which seems to solve the problem (but I've only done limited testing, so I don't know if it will make all the IR codes work as well as with the original firmware).
In main.h line 22, I increased the delay count constant from 11 to 13 as follows:
Code: Select all
#define DELAY_CNT 13
For what it's worth, the compiler I used was the AVR-GCC build 10.1.0 x64 found at
Code: Select all
https://blog.zakkemble.net/avr-gcc-builds/
I should also note that in order to get the firmware to compile in the first place, I had to make the code changes in main.c related to constants, also referenced in kandizzy's post, and also get rid of references to sizebefore and sizeafter in Makefile.