New! Improved! Multi-Mode Firmware Upgrade Available

by PorkRhombus on Sun Dec 09, 2012 5:30 pm

I have developed a new firmware version and thought I'd post about it in case anyone is interested to try it out. I am calling it v2.0 since it is based on v1.2 but it introduces a lot of new functionality and it also involves a small hardware change (described further down with a photo).

The main feature of the new firmware is the fact that it has three modes of operation which are selected at initial power-up.

The modes are as follows:

Mode 1: Default mode. Pressing the button causes all codes to be transmitted just like before.
However the LED is now solid ON because the blinking draws too much unwanted attention.
Also, the pause between codes has been reduced to 75ms. There are no region blinks or end-of-run blinks
as I didn't find these remotely useful, nor indeed could I tell the difference between 3 and 4 rapid blinks.

Mode 2: Codes are transmitted as long as the button is held down.
Each time it is pressed, transmission restarts from the top of the list.
This is nice because often you hit your target within the first few seconds.

Mode 3: Codes are transmitted one at a time. Each code is accompanied by a flash (double flash every multiple of 10). In this way one can determine which code is switching off a particular TV and the WORLDcodes.c file can then be edited, and the program recompiled, to change the transmission sequence. This mode is of interest mainly to, er.., developers, though hopefully they will share the results of their investigations in the form of new, enhanced software builds that have more of the popular codes near the start of the sequence. My desire to identify the code(s) for LG TVs was the main impetus behind this new firmware. LG TVs are everywhere and yet they are not among the first codes broadcast. ** STOP PRESS ** I have already made some changes to the transmit order.

After power-up, the LED flashes for 2 seconds during which time any further press will cause the device to enter the mode selection 'screen'. Subsequent presses at this time cause the modes to be cycled through. To enter your selection, wait a few seconds after the last button press. In case it's not already obvious, I love maximizing what can be done with one button/one LED interfaces! Oh, and in case you want to change modes without disconnecting the power, you can do so by using a key, coin etc to briefly connect the bottom two pins of the 6-pin connector.

Note: The mode (and region) selection is maintained for as long as the device has power and as long as a low battery condition does not trigger a reset. Since I am using a rechargeable Li-ion battery which I charge through the 6-pin connector, I can maintain my settings indefinitely. Even if you are using primary cells (i.e. non-rechargeables), you may find that if you are quick with your battery change, the 220uF capacitor offers enough power reserve to avoid loss of data.

The hardware change:

You have to cut one track (use a sharp X-Acto knife because it's a thin track) and solder a link from the switch to a pad that was originally meant for the region selecting resistor (R3). I recommend that after you cut the track as shown, you should verify that there is no continuity between the left hand side of the switch and the RESET pin (pin 1 of the IC or the bottom left pin on the 6-pin header). Also verify that there is no continuity between the left side of the switch and ground (battery negative connection), nor between RESET and GND.

TVbG_v2_hw_mod_sml.JPG
TVbG_v2_hw_mod_sml.JPG (45.17 KiB) Viewed 3206 times


The reason for this modification is to change the pushbutton's function from resetting the device to simply waking the device from sleep. Once the device is awake, the pushbutton is also used to provide control input to the software, something which is practically impossible if the device resets each time the button is pressed. Because it's now pin 6 of the IC, not pin 1 (RESET) that goes to the switch, we don't have the option of installing a region setting resistor. The default region is US, but if you use the dual-region software and want to boot up in EU mode, just hold the pushbutton down when you power-up the device and then immediately release it. If you use the region specific software version (either US-only or EU-only), it defaults to the correct region and no button-holding is necessary.

The software can be found at https://sourceforge.net/projects/tvbgone/files/

The readme.txt contains a lot more information about this release as well as tips for those who may not be 100% confident with programming their chip (you do need a programmer). Please note: I recommend you program your chip out of the TVbG, not in-circuit. The readme explains why.

I hope you enjoy it! Please share your experiences here.

< < < < < < < P 0 r K _ r H 0 m B U 5 > > > > > > >
User avatar
PorkRhombus
 
Posts: 29
Joined: Sun Jun 28, 2009 3:29 am
Location: Wet Coast

Re: New! Improved! Multi-Mode Firmware Upgrade Available

by adafruit on Tue Dec 11, 2012 10:35 pm

yum pork rhombus! we'll blog this up!
User avatar
adafruit
 
Posts: 11645
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: New! Improved! Multi-Mode Firmware Upgrade Available

by PorkRhombus on Wed Jul 03, 2013 5:37 pm

Hello again Adafruities.

For your delectation and delight version 2.1.1 is now available for download at https://sourceforge.net/projects/tvbgone/files/

I have only put up the US version at this point. If you want euro or uni, leave a comment here.

v2.1.1 has push-to-transmit as the default mode as it's so much better than legacy mode. It also improves the detection and handling of brownout conditions (i.e. when the battery voltage drops under load to a point where the microcontroller resets itself).

If you haven't yet upgraded to v2, the main advantages are:

* Transmit codes faster. 75ms gap between codes rather than 250ms.
* Only transmit as long as necessary. Push-To-Transmit means you can release the button as soon as you hit your target. The batteries last a lot longer this way.
* Super Mega Hacker Modes and super snazzy region select mechanism (read the manual!)
* LED does not flicker during transmit. Draws less attention this way.

Honestly, you will wonder how you lived without it!

BTW I'm getting some v2 PCBs made so in future the hardware mod will not be necessary. Plus the ergonomics will be improved. Watch this space.

Bye for now,

PR
User avatar
PorkRhombus
 
Posts: 29
Joined: Sun Jun 28, 2009 3:29 am
Location: Wet Coast