0

TV-B-Gone Firmware onto a Blank ATTINY85
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

TV-B-Gone Firmware onto a Blank ATTINY85

by chadbone on Thu Sep 04, 2014 12:57 pm

I own two TV-B-Gone Kits and love them!

I am trying to burn the firmware onto a blank ATtiny85V-10PU purchased from mouser and am having trouble and would greatly appreciate it if you could tell me where I am going wrong.

I removed resistor R1 from the TV-B-Gone board.
I am using a Pocket AVR Programmer from https://www.sparkfun.com/products/9825
I downloaded the drivers from https://github.com/sparkfun/Pocket_AVR_Programmer/tree/master/Drivers and used the Zadig Driver with the libusb-win32 driver and named the programmer "USBtiny".
I downloaded the firmware v1.2 from https://learn.adafruit.com/tv-b-gone-kit/download
I downloaded WinAVR from http://sourceforge.net/projects/winavr/files/latest/download?source=files
I instilled WinAVR and opened the MAKEFILE using the Programmer's Notepad and on line 99 I verified it said "usbtiny" which it did on line 104 I changed the "-B" to a "-F" I have no idea what that did but I read somewhere I had to in order for it to work... with it as a "-B" I get an error when trying to upload and with the "-F" I don't get the error.
I didn't change the com port because my program is not showing up as a com port...???
I then clicked "Tools/[WinAVR] Make All" which posted the below reply and seemed to work.
Code: Select all | TOGGLE FULL SIZE
Make All
> "make.exe" all

-------- begin --------
avr-gcc (WinAVR 20100110) 4.3.3
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or F;TNESS FOR A PARTICULAR PURPOSE.

Size before:
tvbgone.elf  :
section            size      addr
.text              7934         0
.data                 2   8388704
.bss                  4   8388706
.debug_aranges       32         0
.debug_pubnames    7431         0
.debug_info        9520         0
.debug_abbrev       656         0
.debug_line        1285         0
.debug_frame        144         0
.debug_str         6167         0
.debug_loc          799         0
Total             33974


Size after:
tvbgone.elf  :
section            size      addr
.text              7934         0
.data                 2   8388704
.bss                  4   8388706
.debug_aranges       32         0
.debug_pubnames    7431         0
.debug_info        9520         0
.debug_abbrev       656         0
.debug_line        1285         0
.debug_frame        144         0
.debug_str         6167         0
.debug_loc          799         0
Total             33974

Errors: none
-------- end --------

> Process Exit Code: 0
> Time Taken: 00:03

I then clicked "Tools/[WinAVR] Program" which posted the below reply and seemed to work.
Code: Select all | TOGGLE FULL SIZE
> "make.exe" program
avrdude -p attiny85 -P com3         -c usbtiny -F 1 -U flash:w:tvbgone.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e930b
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "tvbgone.hex"
avrdude: input file tvbgone.hex auto detected as Intel Hex
avrdude: writing flash (7936 bytes):

Writing | ################################################## | 100% 23.20s

avrdude: 7936 bytes of flash written
avrdude: verifying flash memory against tvbgone.hex:
avrdude: load data flash data from input file tvbgone.hex:
avrdude: input file tvbgone.hex auto detected as Intel Hex
avrdude: input file tvbgone.hex contains 7936 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 11.91s

avrdude: verifying ...
avrdude: 7936 bytes of flash verified

avrdude done.  Thank you.


> Process Exit Code: 0

> Time Taken: 00:35


If I unhook the cable from the TV-B-Gone board and try the same procedure it fails, so I assume it is communicating with the board.

I tried the same procedure with Make All and Program with the main.c file as well.

If I then try the TV-B-Gone with R1-Hooked back up (or put that chip in my other TV-B-Gone kit) it doesn't turn off TVs and the green light flashes a few times but steady and with a long delay not like the flashing that happens with the Adafruit chip. If I put the Adafruit chip back into either of the kits it works fine.

I have verified that the markings on both the Adafruit chip and the one I got from Mouser are identical.

What am I doing wrong? Am I supposed to load some other libraries somehow? Is there a tutorial anywhere on how to flash a blank chip with this firmware?

I admittedly have no idea what I am doing, but was able to successfully flash a controller before with the same programmer.

If it is not listed above I probably didn't do it. Can anyone please help?
Last edited by chadbone on Mon Oct 13, 2014 2:51 pm, edited 1 time in total.
chadbone
 
Posts: 34
Joined: Thu Sep 12, 2013 5:06 pm

Re: TV-B-Gone Firmware onto a Blank ATTINY85

by chadbone on Tue Sep 09, 2014 3:30 pm

Anybody?
chadbone
 
Posts: 34
Joined: Thu Sep 12, 2013 5:06 pm

Re: TV-B-Gone Firmware onto a Blank ATTINY85

by se on Mon Sep 15, 2014 11:29 am

You could try running "make full" instead of "make program". As you can see in the makefile, that will include "make burn-fuse" (i.e. writing some "configuration bits" on the ATTiny), which you possibly are lacking with the factory-new chip.
se
 
Posts: 4
Joined: Sat Jul 12, 2014 11:32 am

Re: TV-B-Gone Firmware onto a Blank ATTINY85

by chadbone on Thu Oct 09, 2014 7:05 pm

Thanks so much for giving me something to try! I still haven't gotten this to work and I know it is something simple.

Forgive my ignorance but I don't see how "Make Full" it is not an option in tools... is there a way to run that manually or to add that to the tools tab in Programmer's Notepad?

THANKS!
chadbone
 
Posts: 34
Joined: Thu Sep 12, 2013 5:06 pm

Re: TV-B-Gone Firmware onto a Blank ATTINY85

by chadbone on Mon Oct 13, 2014 2:23 pm

se, THANKS SO MUCH! I got it working thanks to you!

For everyone else who may not know (as I didn't); here is what I had to do...

In Programmer's Notepad I opened the makefile that I made the previous changes to.
I went to Tools>Options>Tools and the "Make" Scheme was selected but I think "(None-Global Tools)" would work too.
I clicked add to add a new tool.
Name = "[WinAVR] Make Full"
Command "make.exe"
Folder =
Parameter = "full"
Shortcut = "None"
Save = "None"
Checkbox = Uncheked

Then I clicked "OK" and "OK" and the tool was added.

From there I went to Tools>[WinAVR] Make Full

BAM! awesomeness! Solved!

Hope this helps someone.
chadbone
 
Posts: 34
Joined: Thu Sep 12, 2013 5:06 pm

Please be positive and constructive with your questions and comments.