Massive update to firmware.

Get help and show off your TV-B-Gone kit!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
AsmDemon
 
Posts: 2
Joined: Fri Nov 12, 2010 10:52 pm

Massive update to firmware.

Post by AsmDemon »

Hello all. First, I would like to thank all those who worked on such a funny and educational device. With that said, i soldered the kit together about 1 week ago. The first thing i did was try it out at Walmart. LOL.

Then i started digging. First, as always, i backed up all original data. Habit. Connected an AVR programmer and Dumped all Flash, eeprom, fuses ect. That way if i screw it up, i can always revert to the original as it was shipped. Love the compressed version of the code table vs 1.0/1.1, But, i know it can be compressed further. After some reasearch on the web about IR protocols, i have started converting the database to use a more highly compressed format that allows reverse compatibility with ver 1.2 code tables.

I have already saved 1k and counting, and i'm only at code NA012. If desired, i can upload my work thus far, so you can abuse it at will. But be warned, when the entire database is converted, i will remove the compatibilty feature (due to unneeded size addition) and convert the entire program to Highly compressed format.


One dark side, as my name implies is that i strive for perfection through ASseMbly (ASM) debugging. Squeezing every clock cycle or byte out of a given code. I analyze the hell out of it. Why? pride for the work i do. I have decided to make this project my mission for Code Cleanliness, and maximum number of codes possible. I also have compiled an assortment of components for the downloading of codes from my COX universal remote. http://www.BANNED/html.php?page_id=334 I have already used it to verify my setup and the codes in the worldcodes.c file. Armed with this info, and that of LIRC http://lirc.sourceforge.net/remotes/ i will hopefully have this project done shortly after turkey day.


If it does take longer, i'm sorry; I have a wife, a 2yearold son and a 40hr/wk job to fight with for time.

So fear not, those with few codes, i will expand to the latest codes for televisions that are not included, remove duplicates (sony and rca as i have noticed), and make it the Ultimate Prank Device, sorta.

And, if i have time, i will also rewrite the code for ver 1.0 and 1.1 people as they won't be left in the dust.

User avatar
richms
 
Posts: 558
Joined: Tue Jan 20, 2009 3:05 am

Re: Massive update to firmware.

Post by richms »

Being limited to assembly will really limit the amount of future hacking that will be able to be done by others IMO.

One thing I want to do but have so much on at the moment is to make some graphical front end to make code for the tvbgone hardware with a list of codes to make it end user editable, and reorderable, since the codes that are in it are clearly limited in what they do (power command) and which brands are controlled (many I have never ever heard of)

I would love to have a tv-b-mute or similar some of the time, car-stereo-b-gone, random make peoples cameras take pictures device etc.

AsmDemon
 
Posts: 2
Joined: Fri Nov 12, 2010 10:52 pm

Re: Massive update to firmware.

Post by AsmDemon »

When i stated assembly, i was refering to the the actual commands run by the atmel chip. tvbgone.lss is a great example of this. by examining the code for the 10uS delay i found that it was off by 36 cycles every 50uS. i learned that from the clock cycles listed in the Atmel documentation for the chip and worked through the code from the call to the function to the return. by adding 1 NOP to the end before the us--; statement you will increase the loop from 79 to 80 cycles. for the same 50uS you now have a total of 4009 cycles. and the 9cycles is the overhead for calling the function and for the return as well as the different 1 or 2 cycle for branch on equals. the end code will not be in assembly so as to keep it simple for those who are not accustomed to looking at code in such a way. the 9 cycle overhead is not cumlative as the older 79cycle version (the one currently listed as don't modify) is a cumulative loss for each iteration. this would also help in the better reproduction of the codes sent out of the IR. I know it's petty to look at that sorta thing, but thats just what i do.

And along the same line as you stated, i have already begun the simplistic way of compiling a single set of code, with only the specific brands, in the specific order you desire for the output. If others would desire a tv-b-mute, i see no problem in me doing the required programming and capturing and testing of the codes to allow for that.
a simple #define in the header file and an associated #ifdef decleration in the codes file. or even seperate files each with power, mute etc.

Code cleanliness, is next to awesomeness.
Attachments
Delay uS.txt
The assembly of the current Delay_ten_us
(768 Bytes) Downloaded 297 times

User avatar
richms
 
Posts: 558
Joined: Tue Jan 20, 2009 3:05 am

Re: Massive update to firmware.

Post by richms »

I was going to use it as an excuse to relearn some form of gui programming since I have not done any since delphi back in 1997 or so.

Ideally a list box that could be populated, and a save as to spit out a file ready to flash, or else inbuilt execution of avrdude would be my desired end goal of it.

Locked
Please be positive and constructive with your questions and comments.

Return to “TV-B-Gone Kit”