How to flash the firmware

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

Moderators: adafruit_support_bill, adafruit

How to flash the firmware

Postby bastard » Fri Nov 13, 2009 1:04 pm

I'm writing this because I was screwed about flashing my TV-B-Gone. What happened? I connected my programmer and did a make and a make program. I spare you the details and several error messages - it did not work. However something happened - my TV-B-Gone got very hot! So I pulled out the batteries and grieved about my died attiny.

I did not look into this forum before flashing because what could get wrong by connecting a programmer to the isp header and start flashing ...

As others had this experience too - and this special behaviour is still not mentioned in the documentation - I want to mention it here: It is not possible to flash a fully assembled TV-B-Gone. At 29 Apr 2009 "lz3060" had explained this already:

lz3060 wrote:You cannot use the on-board ICSP header to talk to the microcontroller once you have mounted the IR transmitter parts -- the loads on MISO and MOSI drive the voltage and cannot be used for communication. If you want to re-program the chip you either shouldn't mount the IR transmitter section (R1-R4 and/or the transistors and/or the IR leds) or come up with a breadboard setup with power and clock to place the chip on and speak to it.


And I totally agree with his/her proposal:

lz3060 wrote:This should go into the tutorial or FAQ, or at least a topic with a good explanation of the problem should be made a sticky here. I should have found these topics before posting mine, true, but you should have mentioned the problem somewhere. Why provide an "optional" ICSP header that takes like 30% of the board area if it isn't usable?! Why not mention that "minor" detail somewhere?!


Now to my "solution". I ordered a Tiny25 Header, put the died attiny into its socket and connected the programmer to it. And surprise, surprise it wasn't dead. The flashing ended well and after putting the attiny back to its socket on the TV-B-Gone it worked again.

@ adafruit - would you please make this part of the documentation. And if possible, make this post sticky - or take it out and put it into a faq. Thank you very much.

Stefan
bastard
 
Posts: 54
Joined: Tue Aug 25, 2009 6:10 am
Location: Germany, Bavaria

Re: How to flash the firmware

Postby ebeneblau » Fri Jul 02, 2010 10:58 pm

I bought the TV-B-Gone at Chaos Communication Congress a few years ago, where the microcontroller was allready programmed.

Yesterday I built the new version without a kit and soldered it together. I tried to programm it, didn't work. And now I read this and I am angry. :evil:

Why is this Information hidden?

Thanks to the OP. Now I know at least, that I'm not stupid.
ebeneblau
 
Posts: 1
Joined: Fri Jul 02, 2010 10:46 pm

Re: How to flash the firmware

Postby franklin97355 » Sat Jul 03, 2010 10:06 am

Not sure why it is not mentioned more prominently but I'm glad you got it figured out. Perhaps in the next revision of the docs ?
User avatar
franklin97355
 
Posts: 1706
Joined: Mon Apr 21, 2008 1:33 pm

Re: How to flash the firmware

Postby adafruit » Sat Jul 03, 2010 2:39 pm

its in the faq, last question. there is no 'easy' way to program the kit without removing at least one part
User avatar
adafruit
 
Posts: 10491
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: How to flash the firmware

Postby franklin97355 » Sat Jul 03, 2010 7:27 pm

I just went to the FAQ, the last question was
I want more range! How can I make the kit more powerful?
Sorry but I found nothing there about flashing the chip. Perhaps it is in another FAQ?
User avatar
franklin97355
 
Posts: 1706
Joined: Mon Apr 21, 2008 1:33 pm

Re: How to flash the firmware

Postby adafruit » Sat Jul 03, 2010 7:30 pm

you have an older version cached
User avatar
adafruit
 
Posts: 10491
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: How to flash the firmware

Postby Agent24 » Mon Jul 05, 2010 8:18 am

Luckily I knew this before I started on my TV-B-Gone, and I programmed before I attached the LED circuitry... :)

I learnt a while ago it is best to try to actively seek out known design quirks\bugs\issues etc before you do anything, than wonder why it doesn't work afterwards...
User avatar
Agent24
 
Posts: 307
Joined: Sun Jan 24, 2010 5:48 am
Location: New Zealand

Re: How to flash the firmware

Postby vxbinaca » Thu Jul 22, 2010 4:56 pm

So let me see if I get this right, because I have an extra board I want to turn into a target board:

- No LED's, resistors, transistors or battery socket.
- Keep the crystal, the ISCP and IC socket, the two capacitors and switch?

Am I getting that right?
vxbinaca
 
Posts: 28
Joined: Thu Jul 22, 2010 4:52 pm


Re: How to flash the firmware

Postby vxbinaca » Fri Jul 23, 2010 1:22 am

Fresh out of electrolytics and switches so all thats on the PCB now, along with a shielded and key'd ISCP interface. Too bad they don't make ZIF sockets this small :( I'll have to wait for Mouser to ship the parts I need in a few weeks.

Thanks adafruit for the wonderful kits and advice!
vxbinaca
 
Posts: 28
Joined: Thu Jul 22, 2010 4:52 pm

Re: How to flash the firmware

Postby Agent24 » Fri Jul 23, 2010 1:52 am

I used a programmer which takes power from the target board (5 volts) of course with the AA cells such a programmer does not work.

Luckily the AVR in the TV-B-Gone operates up to 5.5volts, I powered both from the USB port and the programming worked fine.

Just something to consider...
User avatar
Agent24
 
Posts: 307
Joined: Sun Jan 24, 2010 5:48 am
Location: New Zealand

Re: How to flash the firmware

Postby vxbinaca » Sat Jul 24, 2010 3:51 pm

I'll make one with perf board eventually but for now I can use a spare PCB, and if I want finish it out later and make another TVBG.
vxbinaca
 
Posts: 28
Joined: Thu Jul 22, 2010 4:52 pm

Re: How to flash the firmware

Postby jedidove » Mon Dec 27, 2010 12:42 am

Having read the FAQ for the newest version, I'm left scratching my head as to why there isn't a small switch in series with R1 that way you could turn it toggle a "programming mode". Like mentioned above, it seems pointless to waste all that space in the PCB layout for a ICSP header if it's not going to be easy to program. It just gives a false illusion. Cutting the LED isn't "easy" because then it has to be replaced or half-assed fused with solder after programming and after a few times it's going to be very shoddy or a total nightmare.

I installed the header anyway since I'm a devout utilitarian and you never know when I might be out and want to reprogram it for some other prank or something (yeah slim chance but whatever), plus the space was already wasted so might as well make some use of it instead of leaving the header to sit in a parts bag.

I definitely think some solution needs to be made for this, and I don't see what's wrong with just a simple switch. If one is never implemented then it's probably better just to remove the ICSP header from the design to save space and prevent accidents from occuring.
jedidove
 
Posts: 9
Joined: Mon Jan 19, 2009 7:31 pm

Re: How to flash the firmware

Postby Agent24 » Mon Dec 27, 2010 2:24 pm

I think they don't bother because most people only just learn to solder when making this kit, and most probably won't be reprogramming it anyway.

A 1-way DIL/DIP switch would probably be the best option. A jumper on some pins could be used but the jumper would get lost quickly I imagine.

If you want one with a switch, you could always design your own board. I made a pretty nice board design which I uploaded here. You could easily modify it to add a switch or jumper for programming.

(In fact maybe I should add a switch to it myself...)
User avatar
Agent24
 
Posts: 307
Joined: Sun Jan 24, 2010 5:48 am
Location: New Zealand

Re: How to flash the firmware

Postby jedidove » Mon Dec 27, 2010 5:22 pm

I agree, but then it doesn't make sense why its included in the first place. I'll definitely consider adding one myself in the future, though if I'm going to make my own board I'd go all out and add an extra button and add IR jamming code to the device which might require a different chip.
jedidove
 
Posts: 9
Joined: Mon Jan 19, 2009 7:31 pm


Return to TV-B-Gone Kit

Who is online

Users browsing this forum: mibignistinly and 2 guests

Stuff to buy from the Adafruit store and links to product documentation!


New Products [108]

Raspberry Pi[80]
 
FLORA[23]
 
Bunnie Studios[9]
 
FPGA[1]
 
mbed[11]
Arduino[60]
 
NETduino[14]
 
Android[6]
 
BeagleBone[24]
 
XBee[10]
More Dev Boards[31]


 
BoArduino[8]
 
SpokePOV[4]
 
TV-B-Gone[4]
 
MiniPOV[3]
 
SIM reader[3]
 
Microtouch[5]
 
Clocks & Watches[18]
 
Drawdio[4]
 
Brain Machine[1]
 
Game of Life[2]
 
MintyBoost[2]
More DIY Kits[16]


 
MaKey MaKey[3]
 
Tweet-a-Watt[5]
 
Young Engineers[33]
 
Discover Electronics[2]
 
Snap Circuits[4]
 
littleBits[3]
 
Project packs[8]


 
Breakout Boards[34]
LCDs & Displays[48]
Components & Parts[70]
Batteries & Power[49]
EL Wire/Tape/Panel[52]
LEDs[111]
 
Wireless[14]
Cables[62]
 
Lasers[6]
Sensors/Parts[145]
 
Enclosures/Cases[11]
 
Solar[11]
 
RFID / NFC[13]
Prototyping[70]
 
iDevices[13]
Tools[71]
 
Wearables[39]
 
CNC[37]
 
Robotics[29]
 
3D printing[1]
 
Materials[24]


 
Stickers[41]
 
Skill badges[55]
 
Books[25]
 
Circuit Playground[7]
 
Gift Certificates[4]