Adafruit - THE MUSICAL - is here! Get a musical tour of Becky's favorite tools around the Adafruit factory (video) and subscribe!

Can no longer program ATTiny84, but could earlier today.
Moderators: adafruit_support_bill, adafruit

Can no longer program ATTiny84, but could earlier today.

by inventorjack on Tue Jul 31, 2012 11:30 pm

Problem synopsis: I've been working on a prototype project built on custom PCBs utilizing the ATTiny84. I have 3 separate prototype boards. Two have external power source (lithium battery with boost converter), one does not. Other than that they are all exactly the same. I have successfully programmed the tiny84's on these boards dozens of times each, and have not had problems. This evening I was writing new code and programmed one board, and there was a mismatch (sadly, didn't get a screenshot, but it was something like 0x00 != 0x01). I started over, and then began getting 'initialization failed' errors, which I was unable to account for or resolve.

Considering that my code may have (somehow?) damaged the chip, I switched to another known-good board and tried to simply reach the chip via avrdude with the following command:

avrdude -c usbtiny -p attiny84

I got 'initialization failed' on this board as well. Both boards are externally powered. So, moving on, I applied the jumper to my USBtinyISP and tried reaching the non-externally-powered prototype board. Same result. All three of these boards were able to accept programming earlier in the day, and no physical changes had been made since.

I have on hand some boards from a different project which use the ATTiny44, so I tried the same thing with these, and AVRDude was able to talk to this chip no problem. Likewise, I was able to communicate with an ATMega16 on another board.

It seems I only have problems programming the ATTiny84.

1. USBtiny from kit. I've used it hundreds of times successfully.

2. Windows 7 Pro. I've had no problems using this computer for AVR programming over the past several months

3. I'm using Atmel Studio 6, but programming via AVRDude. The target chip is ATTiny84.

4. The USBtinyISP has worked without problem for a few years (since 2007!)

5. The attached screenshot shows several failed attempts to reach my chip on 3 different boards, and then a successful attempt to reach an actual ATTiny44 on a completely different target board. As you'll see on the screenshot, I'm typing in ATTiny44, vice 84, but I should still get a message that there's a chip address mismatch if everything were working correctly.

6. I don't have a camera on hand, but the kit has worked without problem for years, and there is no visible damage or faults. The USBtinyISP can currently program an ATTiny44 or ATMega16, but not an ATTiny84.

Any ideas? I was on such a roll tonight, and then this came up :(

Thanks,

- Jack
Attachments
AVRDude.png
AVRDude.png (81.24 KiB) Viewed 1937 times
inventorjack
 
Posts: 17
Joined: Sun Nov 08, 2009 4:13 pm
Location: Beaufort, SC

Re: Can no longer program ATTiny84, but could earlier today.

by inventorjack on Wed Aug 01, 2012 12:04 am

As an added check, I also tried the above steps on a different computer (Laptop running Win 7 Home), and got the same results. I am able to see other chips via AVRDude, but not the 84's.
inventorjack
 
Posts: 17
Joined: Sun Nov 08, 2009 4:13 pm
Location: Beaufort, SC

Re: Can no longer program ATTiny84, but could earlier today.

by adafruit_support_rick on Wed Aug 01, 2012 8:06 am

LadyAda has the following to say on the subject:
Stuff that can go wrong: AVR initilization failed
If the programmer is not properly connected to the chip, you'll get the following message: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check

Don't use -F to override the check, even though it is suggested!

This means that the programmer couldn't talk to the chip. If you are using a "simple" programmer such as a serial or parallel port bitbang programmer, it could mean the programmer is at fault. Otherwise, it usually means the programmer is OK but it couldnt find the chip.

Check that the chip is powered, plugged into the socket or programmer properly, the programming cables are plugged in correctly, the header is wired correctly, etc. 99% of the time, it is a problem with wiring.

adafruit_support_rick
 
Posts: 14479
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY

Re: Can no longer program ATTiny84, but could earlier today.

by inventorjack on Wed Aug 01, 2012 6:51 pm

driverblock: I appreciate you taking the time to post something, but I don't quite get the goal of your post. I didn't mention using the '-F' option anywhere in my post.
inventorjack
 
Posts: 17
Joined: Sun Nov 08, 2009 4:13 pm
Location: Beaufort, SC

Re: Can no longer program ATTiny84, but could earlier today.

by adafruit_support_rick on Wed Aug 01, 2012 7:38 pm

Didn't say you did. Just pointing it out. The purpose of the post was to identify stuff that can go wrong. Maybe I should have highlighted this part:
99% of the time, it is a problem with wiring.


You probably want to check that you've got good power going to the chips.

adafruit_support_rick
 
Posts: 14479
Joined: Tue Mar 15, 2011 11:42 am
Location: Buffalo, NY