prev. bought ATtiny841's not programming

Go To Last Post
16 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

I have a project I've been working on for a few years.  I resumed working on it after a few years (~3) break.  It's based on the 14-pin ATtiny841-SSU chip, and I have a PCB designed for it and assembled some 3 years ago.

 

The problem is I have a tube of ~50 ATtiny841 chips remaining and I can't program them, I've tried 4 so far.  I'm using Arduino IDE and the error is:  

 

avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

An error occurred while uploading the sketch

I am able to program some of the original PCBs (2 of 4) with chips soldered on them through a ICSP programming header.  The 2 that don't program also didn't program 3 years ago so I think there's other issues with those PCB assemblies.  I have a fixture for programming the raw ATtiny841 chips, and I'm using a USBTinyISP programmer, one from AF and one from Sparkfun, they both work.  Any chip I take from the tube of chips and place into the programming fixture will not program or accept a bootloader and give the above error when programmed from Arduino IDE.  However, I desoldered the chip from one of the PCB assemblies that programmed through ICSP and it did program when placed into the programming fixture so I know it's not the programming fixture setup that's causing a problem.  

 

It appears that the remaining 'new' ATtiny841s I have will no longer program.  Is this something that would be 'expected' after sitting in the original shipping tube in an airconditioned room for 3 years?

 

Thanks.

 

P.S.  I also soldered the ATTiny841s to prototyping DIP adapter boards and could not program those, but I was able to do that with the chips 3 years ago.  I attached some photos of the setups.

 

 

Attachment(s): 

This topic has a solution.
Last Edited: Tue. Sep 22, 2020 - 07:35 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Looks like a power issue or communication issue looking at avrdude response

I have a USBtiny and use it to load hex from terminal or CMD window. You might try command line avrdude to see if you get a response from the chip otherwise you need to update your "arduino" IDE and use updated libs.

The only thing that I've noticed about Arduino IDE since 2012 is that it changes  a lot and your code/Libraries sometimes never compile again. 

Adafruit has a good tutorial on using avrdude.  

 

EG:       avrdude -c usbtiny -p t84 -U lfuse:r:low_fuse_val.hex:h       

  

The low fuse read should give you something like:

 

;------------------------------------------

avrdude: AVR device initialized and ready to accept instructions

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

avrdude: Device signature = 0x1e930c (probably t84)
avrdude: reading lfuse memory:

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

avrdude: writing output file "low_fuse_val.hex"

avrdude: safemode: Fuses OK (E:FF, H:DF, L:C2)

avrdude done.  Thank you.

;------------------------------------------

 

The chips are usually pretty stable under normal conditions... if you hook power up backwards, they will die.

good luck!
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Looking at your breadboard...where are you capacitors?  Any AVR being programmed should have caps in place (perhaps they aren't so visible).

 

Also, watch any programmer cable lengths don't get too long (maybe 8 inches max to be safe).

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Thu. Aug 27, 2020 - 05:45 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


Your programming cables are very long. Treat your self to one of these...

 

 

 

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes thank you all I will set up the proper programming circuit as indicated in AVR042 and in Brian Fairchild's schematic and some AVRDUDE commands but it's my first time using AVRDUDE commands.

 

 

 

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

 

(Possum Lodge oath) Quando omni flunkus, moritati.

"I thought growing old would take longer"

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There has been some miracle and now all of the ATTiny841 chips will program with either of the 2 USBTinyISP programmers without issue.  I don't know what happened, the setup seems the same, I really wish I knew what happened I tried a few more chips and they are all good now.  Even without the external components they will program.  I will try another breadboard!  I'll let you know if I find the reason. 

 

Thanks for your help.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It's a different issue, ki0bk.  The Titles clearly state different issues as well.  Projects can have multiple issues do you not agree?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am glad that it works, but for reliable operation, as mentioned above, shorten up those looooong programming cables, and add by-pass caps to the micro.

There should be a 0.1 uF cap across the V+ and Ground pins, as close to the micro's pins as possible.

 

JC

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I assume (maybe wrongly) that you have a pullup on the reset pin?  This can cause issues... glad you're not dead in the water.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,

 

I am posting to this thread again because it seems my original problem has returned.

 

None of the ATTINY841-SSU will program now, except for 2 that I have previously soldered to SMT to DIP adapters 3 years ago.  

 

These 2 soldered to DIP adapters will accept a bootloader and program successfully with and without a reset pullup and capacitor using either USBTinyISP programmer.

 

Using a SMT programming fixture I tested 5 from the original batch (I received 3 years ago) and they will not program with or without reset pin components, I tried with 2 different USBTinyISP programmers.  I received 10 new chips from Digikey a week ago, and these have the same problem and will also not program under any condition.  I soldered one to a DIP adapter by hand and it will also not program under any condition.

 

I have a breadboard to 6pin IDC connector now, but that's likely not an issue since the 2 chips soldered to DIP adapters will program successfully with this same setup.  I'm going to try to bake some at 125C overnight per IPC/JEDEC J-STD-033.

 

I am looking for any assistance please.

 

Thanks.

 

FYI in photo #6 I noticed I had the PU resistor going to pin 1 not pin 0 by mistake, but when I fixed it it was the same result.

 

Attachment(s): 

Last Edited: Sun. Sep 20, 2020 - 11:00 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


May you post signals and power?

Reason : unstable power?

Protocol decoders - sigrok

[before 1/3 page]

AVR ISP

Atmel AVR ATtiny441/841 Datasheet

[page 226]

 

via ATtiny841 - 8-bit AVR Microcontrollers

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

First, put the Vcc decoupling capacitor in the circuit and keep it there.  As close to the IC power and ground connections as possible.

 

Second, does thee problem solve itself if you move wires around or wiggle them?

 

You have something very unstable or marginal going on.  Maybe mechanical, maybe electrical.  Push, pull, move your cable and/or your circuitry and see if you have another miracle.

Last Edited: Mon. Sep 21, 2020 - 12:37 AM
This reply has been marked as the solution. 
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for your replies again.  The issue is solved now, when I chose a different programmer option from the ATTinyCore menu.  There is USBTinyISP FAST and SLOW options.  The SLOW option works for all the chips I've tried that didn't work before.  I think this is a marginal problem, as Spence Konde explained (Author of ATTinyCore), some chips can do fast and some can't.  It had slipped my mind completely, with all of the possible reasons for a chip not programming.  Posting to the forum ultimately really makes you think things through very critically, I really appreciate the opportunity to ask for help here.  In the mean time I have really increased my confidence in the programming setup and procedure and know some more things to do in the future.  Thanks again.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

WHERE are you caps?  Whether it programs or not, you simply must have a Vcc cap.   Do you hope it now mysteriously fails to operate 2 weeks from now?   It's appears as though you are too lazy,  or simply don't care about the results or reliability.  Thne you will instead be scratching your head, saying it worked yesterday!

 

 It had slipped my mind completely, with all of the possible reasons 

You must pay attentuion to details. 

 

I am looking for any assistance please.

You don't take it seriously, it will end soon. 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Mon. Sep 21, 2020 - 01:18 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

some chips can do fast and some can't.

Not really true, all chips are the same. HOWEVER the programming clock MUST BE 1/4 or less than the main clock.

 

New, unprogrammed chips come with a default 1MHz main clock, so you need a 250KHz or a little less programming clock (I keep the ISP speed at 125KHz)

 

If the fuses have been changed, say to 8MHz, then you could have a 2MHz (never tried) or at least a 1MHz programming clock.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly