Now I can't load to ATtiny84

As the message subject says, I can't load a sketch to an ATtiny 84, specifically using ICSP.

I had this problem earlier with some ATtiny841, but thanks to DrAzzy sorted the problem and all is well. However, I turned my attention to some ATtiny84 boards and didn't expect problems as I've uploaded to them before with no problems. Now, I can't. I'm now using IDE 1.6.5 whereas before I was using an earlier version (sorry, can't remember which one), but nothing else has changed.

Using UNO as ISP, the error message is as per attached file UNOError.txt.

Using a USBasp gives the error message as per attached file ASPError.txt

If I select the USBasp (ATtiny Modern) as programmer it just says it can't find the avrdude.cfg file.

Am I going to have to revert back to an earlier IDE again, or am I missing something obvious?

TIA for any pointers.

Bernie

UNOError.txt (6.97 KB)

USBaspError.txt (2.5 KB)

menu.JPG

The ATTiny 84 is not supported by my ATTiny Modern core, so don't use a programmer marked as ATTiny Modern - it's not expected that those would work. It should work using the normal programmers (if you're using my ATTiny core for the x4/x5/x61/x7/x8/x313, you can use programmer marked ATTiny Classic, but the normal ones will work for the 84).

Those errors look like a wiring issue, not a software issue, to me - I'm inclined to suspect a wiring problem.

Hi,

I am using IDE 1.6.5 and USBasp to upload sketches to attiny84 at the moment. It’s working fine.

I used the core downloaded from here and for my particular project I am using the i2c slave library from here.

I agree it sounds like a wiring issue. Do you have a 10K pullup on the tiny’s reset pin? Do you have a 0.1uF bypass cap connected?

1442266588584.jpg

Paul

Hi Guys, and many thanks for the responses.

@DrAzzy, the IDE settings I used are as per the menu.jpg file, although I did actually try the AT Modern programmer as well (just in case!) :slight_smile:

@PaulRB yes, the attiny84 does have the pullup resistor, and when trying to program using a UNO as ISP, yes I do use a 10uF cap. I did double check the wiring; its simply an ICSP cable from the UNO to to an ICSP header on the ATtiny84 board when trying to program using the UNO, and a 10 way cable to a 10 to 6way ICSP adapter when using the USBasp.

The odd thing about all this is that it all worked before I changed the IDE. I even added the following comment in my sketch to remind me how to program this particular board using the UNO:

SOFTWARE LOAD INSTRUCTIONS
a. Connect ICSP cable from UNO or Boardstuff Shield to pcb
b. Set Board to 'ATtiny84 (internal 8MHz clock)'
c. Set Serial Port as reqd
d. Set programmer to 'Arduino as ISP'
e. Select 'Burn Bootloader' (this sets the internal fuses to use the 8MHz internal clock)
f. Select Upload Using Programmer
g. Check for confirmation of upload (four flickering pulses of green indicator led)

The only recourse I can see is to reload my ATtiny cores again, in case I screwed them up at sometime (not likely I think) and/or revert back to an earlier IDE. I do note the error reports say that I'm using Windows 8.1, although I'm not - its Windows 10 but I'm sure that's not relevant.

I'll triple check all my connections as well. Other than that I'm out of ideas :frowning:

Bernie

On step a, you do NOT just connect the ISP header to ISP header - the reset pin of the target board has to go to pin 10, so you could use the ISP header of the programmer arduino for the other pins, but the reset pin has to go to pin 10 (as opposed to reset of the programmer)

Is this an assembled board you're working with, that you need to program? Or is it on a breadboard?

when trying to program using a UNO as ISP, yes I do use a 10uF cap

That's not what i meant. You are talking about the reset-blocking cap needed when using ArduinoISP. I am talking about a 0.1uF bypass cap close to the tiny's power pins, in any circuit. Without it the tiny could badly misbehave. When I first put the tiny on the breadboard in my picture above, i forgot the bypass cap. The "blink" sketch uploaded fine but went crazy when it began to run. As soon as i added the bypass cap, it started behaving normally.

@DrAzzy - It is an assembled board (surface mounted components) with an ICSP pin header. OK, I'll try again programming using the UNO, but this time I'll wire from the UNO pin headers rather than the UNO ICSP header.
Thinking about it, that's the way I used to program these boards before I bought a 6way ICSP cable and subsequently a USBasp.
So, when programming with a USBasp, I assume the reset pin is controlled by the programmer (as the programmer does work perfectly when uploading to my ATtiny841 boards)? If so, I wonder why I'm getting the error when using it?

@PaulRB - Ah, sorry I misunderstood. Yes, the board does have a bypass cap across the the power pins as close as physically possible.

The puzzle to me is trying to work out what of the changes to the programming methods I'm using has caused the process to no longer work. As I mentioned, I used to use a UNO as ISP before the ICSP cable or USBasp programmer and that used to work.

As DrAzzy has intimated, I'll try programming as I did before, wiring from the UNO o/p pins rather than the ICSP header to see if that method will still work.

I still can't see why the USBasp isn't successful though.

Bernie

Yes, on USB Asp (and any other ISP programmer) the reset pin must be controlled by the programmer. Reset on the target board is held low during ISP programming.

Programming using the USB Asp should absolutely work, I don't know why it doesn't. Do you even know that the board you have is actually working?

Could they have screwed up? If there were some assembly steps left for you to do, could you have screwed up? I've put ISP headers on the wrong side of the board.... Doublecheck that the wiring on the board actually matches what it should be.

Well, this gets curiouser and curiouser :o

I rewired from scratch to use a UNO as ISP, and lo and behold, I was able to reset the fuse to change the internal clock frequency (burn bootloader) and also upload the sketch perfectly. Great I thought, problem solved, I'm an idiot and so now I'll simply substitute the UNO for the USBasp, change the programmer in the IDE and we're laughing - errr, no! It wouldn't upload to the ATtiny84 at all from the USBasp (error message attached).

I tried the UNO again with success, but this darned USBasp wouldn't upload. Now, I know the hardware itself is fine, because I can go back and use it to upload to my ATtiny841 boards with no problems (thanks to DrAzzy's invaluable help in an earlier thread).

So what on earth is going on here :confused: ? Any ideas anyone?

Bernie

Attiny84blerror.txt (5.26 KB)

Sorry for bumping this thread guys :-* , but it disappeared over the page quite quickly, and I still haven't solved the problem.

I can upload to my ATtiny84 boards using a UNO as ISP ok, so I'm not stuck for a programming method, but I would like to find out what could be the reason for the USBasp being unable to upload the same sketch. I assume it must be something in the settings I'm using, but can anyone suggest what?

Thanks
Bernie

This thread? Did you make changes to either of those files DrAzzy mentions in post #1 to make the tiny841 work, that now need undoing?

Other than that, sorry, I've no other specific ideas. But IDE 1.6.5 and USBasp works fine for me with tiny84, so you are not "flogging a dead horse".

So fall back on the usual techniques. Try another tiny84, try another PC/laptop, try another breadboard...

Hi PaulRB,

Yes, I did change the settings from one board to another.

If you don't mind me asking, which parameters in the IDE are you using successfully? Ie, which cores, programmer etc?

I think you're right about rechecking everything. I'll go back tonight and reload all the latest ATtiny cores (these here) and double check every thing again.

I'll let you know!

Cheers
Bernie

I can't fathom what it could be, at this point.

That error log looks like it's getting nothing from the chip... Is the ribbon cable okay? I had one of mine start to come loose at one end, and make poor connection.

Worth noting that I once had a very similar problem when developing the 841 core. I just couldn't get the asp to talk to it at all. The problem reproduced consistently, I gave up and switched to arduinoasisp, and then when I went back to try to fix it, I couldn't reproduce it anymore.

I agree DrAzzy - its a real headscratcher. I did suspect the cable initially, but when I use it with the 841 board - no problem. I'll keep worrying away at it until it fixes itself - in the meantime I'll use the trusty UNO as ISP.

Might be interesting to try a different USBasp - just to eliminate another variable

STDummy:
If you don't mind me asking, which parameters in the IDE are you using successfully? Ie, which cores, programmer etc?

See post #2.

My settings are:
Board: "ATtiny"
Processor: "ATtiny84"
Clock: "1MHz (internal)"
Programmer: "USBasp"

I do get a awful lot of compiler warnings because of that TinyWireS library. But it seems to work OK.

I had success using my core this weekend on an 84 with USBAsp and ArduinoAsISP (both stock and ATTiny Classic versions - the stock version works with the 84, but not more exotic attiny's) at 1mhz and 8mhz internal (didn't use w/ext crystal, but no reason that shouldn't work - at the time I was experimenting with tuning, or trying to - but I discovered none of the tinies I had soldered down was out of tune).

When I was having my mysterious USBAsp problems I just made a dedicated ArduinoAsISP from a pro mini - soldered the wires directly on, and globbed lots of hotglue on them for strain relief. It's served me well since.