0

Reprogramming Issue
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Reprogramming Issue

by CCarlson on Wed Oct 10, 2007 9:43 am

I recently completed my first real AVR project (the Jar of Fireflies found on Instructables), and everything worked like a charm.

However, I can't seem to reprogram the ATtiny45V with a slightly-modified program. My USBtinyISP is configured to power the circuit via USB, and when I attach the SOIC test clip the LEDs light up as though I'd installed a battery (note that I've stuck a wad of paper in the battery holder, to prevent a short-circuit).

Then, when I run avrdude from my MacBook, I get the 'initialization failed, rc=-1' message, and the firefly circuit resets (that is, I see two of the LEDs flash, and it performs its normal 'power on' LED test before falling back into normal operation).

Is there something special I should be doing to a fully-operational circuit before trying to reprogram the chip? I've tested continuity through the test clip to the circuit traces, to make sure that the clip is seating properly on the ATtiny45V, and I can use the clip as wired to program an ATtiny45V that isn't soldered to a circuit board.
CCarlson
 
Posts: 35
Joined: Mon Sep 24, 2007 11:55 am
Location: Hewitt, TX

by adafruit on Wed Oct 10, 2007 1:11 pm

you can program it once correctly using the usbtinyisp but not a second time?

adafruit
 
Posts: 12149
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

by CCarlson on Wed Oct 10, 2007 6:27 pm

Exactly so--but I only have this problem with the chip that's in the circuit already. The clip and USBtinyISP work perfectly with un-installed chips.

I've tested continuity on all the clip's pins, just to be sure that it has good contact, and I'm positive that I have pin 1 identified properly.
CCarlson
 
Posts: 35
Joined: Mon Sep 24, 2007 11:55 am
Location: Hewitt, TX

by adafruit on Wed Oct 10, 2007 6:38 pm

can you program a soic chip that's not in circuit, twice?

adafruit
 
Posts: 12149
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

by CCarlson on Wed Oct 10, 2007 6:44 pm

Yep.
CCarlson
 
Posts: 35
Joined: Mon Sep 24, 2007 11:55 am
Location: Hewitt, TX

by adafruit on Wed Oct 10, 2007 8:09 pm

hmm, can you post a link to the schematic?

adafruit
 
Posts: 12149
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

by CCarlson on Wed Oct 10, 2007 8:22 pm

Certainly!

A picture of the completed circuit is here: http://www.instructables.com/id/EHKW1C3NRUEWP86SH6/

The schematic is on this page: http://www.instructables.com/id/EITCRQFB2JEWP86TYK/
CCarlson
 
Posts: 35
Joined: Mon Sep 24, 2007 11:55 am
Location: Hewitt, TX

by adafruit on Wed Oct 10, 2007 8:40 pm

try taking out the jumper from the usbtiny and using the battery power instead.

adafruit
 
Posts: 12149
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

by CCarlson on Wed Oct 10, 2007 9:21 pm

Excellent--that did the trick!

Why did the power source make a difference?
CCarlson
 
Posts: 35
Joined: Mon Sep 24, 2007 11:55 am
Location: Hewitt, TX

by adafruit on Wed Oct 10, 2007 9:34 pm

shortly: the LED's are overpowered by the 5V line and are pinning the programming pins.

yay

:)

adafruit
 
Posts: 12149
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

by CCarlson on Wed Oct 10, 2007 10:16 pm

You know, you could have said 'magic', and it would have sounded as reasonable to me. I obviously have a long way to go to round out my body of electronics knowledge.

Thanks a ton, Limor!
CCarlson
 
Posts: 35
Joined: Mon Sep 24, 2007 11:55 am
Location: Hewitt, TX

Please be positive and constructive with your questions and comments.