Attiny85 not working

Hello,

I am trying to program one of my attiny85s (I have programmed them in the past) using a programmer from Sparkfun:

My problem is that when I try to upload my sketch to my attiny, I get errors. Here they are from the last few lines:

Programmer Type : USBtiny
Description : USBtiny simple USB programmer, USBtinyISP - Inexpensive USB AVR Programmer
avrdude: programmer operation not supported

avrdude: Using SCK period of 10 usec
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

Here are my configurations under the tools menu:

Board: "ATtiny25/45/85"
Timer 1 Clock: "CPU"
B.O.D: "B.O.D. Disabled"
LTO (1.6.11+ only): "Disabled"
Chip: "ATtiny85"
Clock: "8 MHz (internal)
Port: THIS IS GRAYED OUT. I CAN'T SELECT IT (But in the bottom right corner of the IDE it says COM3)
I also plugged my programmer into the port so it is on COM3 in device manager to match the IDE

Programmer: "USBtinyISP (ATtiny)"

I am using arduino IDE version 1.8.1 and ATTinyCore version 1.1.2. I downloaded ATTinyCore from the boards manager. (Just trying to provide as much information)

As mentioned above, the port option is grayed out so I can't select it. I tried to use Sketch> Upload Using Programmer, but that didn't work either. I just get the same error as I do when I press the upload button.

However, when I plug in my arduino UNO, I can change the port and it's not grayed out

Let me know if you need any more information!
Thanks!

nick13579:
Port: THIS IS GRAYED OUT. I CAN'T SELECT IT

This is normal and to be expected because you're using the programmer instead of uploading via serial as on the Uno. That is not the cause of your problem.

Did you install the driver from the sparkfun page?

I did install the driver, but that was a while ago. Could you link me to it so I can download it again?

nick13579:
I did install the driver, but that was a while ago. Could you link me to it so I can download it again?

Is the internet broken where you are?

HINT: Driver is on the product page that you linked to ...

// Per.

Do you mean the link in the error message to USBtinyISP - Inexpensive USB AVR Programmer ?

nick13579:
Do you mean the link in the error message to USBtinyISP - Inexpensive USB AVR Programmer ?

No.

You linked to Sparkfun

// Per.

Oh yes,I have that driver

I used that same programmer. Did you first use the "Burn Bootloader" command in the Tools menu? I always do this before doing "Upload Using Programmer". Of course it's not really burning a bootloader, it's setting the 'fuses' for the configuration you have selected.

Are you plugging your 85 directly into the socket on the programmer board, or connecting via the little pin header sockets outside of the chip socket? I found that one of the little feet of the header was broken off the solder pad, so it did not work that way. I ended up getting Sparkfun's slightly larger (and slightly cheaper) Pocket Programmer.

1 Like

I get an error every time I try to burn the bootloader:

avrdude: Version 6.3, compiled on Dec 16 2016 at 13:33:19
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Users\Nick1\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.1.2/avrdude.conf"

Using Port : usb
Using Programmer : usbtiny
Setting bit clk period : 5.0
avrdude: usbdev_open(): Found USBtinyISP, bus:device: bus-0:\.\libusb0-0001--0x1781-0x0c9f
AVR Part : ATtiny85
Chip Erase delay : 400000 us
PAGEL : P00
BS2 : P00
RESET disposition : possible i/o
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


eeprom 65 12 4 0 no 512 4 0 4000 4500 0xff 0xff
flash 65 12 32 0 yes 8192 64 128 30000 30000 0xff 0xff
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 2 0 0 0 0 0x00 0x00

Programmer Type : USBtiny
Description : USBtiny simple USB programmer, USBtinyISP - Inexpensive USB AVR Programmer
avrdude: programmer operation not supported

" Programmer Type : USBtiny
Description : USBtiny simple USB programmer, USBtinyISP - Inexpensive USB AVR Programmer
avrdude: programmer operation not supported"

I get the same "avrdude: programmer operation not supported", but it still writes the bootloader(fuses).

 Programmer Type : USBtiny
         Description     : USBtiny simple USB programmer, http://www.ladyada.net/make/usbtinyisp/
avrdude: programmer operation not supported

avrdude: Setting SCK period to 5 usec
Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0xFF:
avrdude: load data efuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip efuse data:

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

avrdude: verifying ...
avrdude: 1 bytes of efuse verified
avrdude: reading input file "0xD7"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xD7:
avrdude: load data hfuse data from input file 0xD7:
avrdude: input file 0xD7 contains 1 bytes
avrdude: reading on-chip hfuse data:

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

avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xE2"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.00s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xE2:
avrdude: load data lfuse data from input file 0xE2:
avrdude: input file 0xE2 contains 1 bytes
avrdude: reading on-chip lfuse data:

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

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified

avrdude done.  Thank you.
avrdude: AVR device initialized and ready to accept instructions


Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e930b (probably t85)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: Setting SCK period to 5 usec
avrdude: reading input file "/home/kprims/.arduino15/packages/ATTinyCore/hardware/avr/1.1.2/bootloaders/empty/empty_all.hex"
avrdude: writing flash (2 bytes):

Writing | ################################################## | 100% 0.11s

avrdude: 2 bytes of flash written
avrdude: verifying flash memory against /home/kprims/.arduino15/packages/ATTinyCore/hardware/avr/1.1.2/bootloaders/empty/empty_all.hex:
avrdude: load data flash data from input file /home/kprims/.arduino15/packages/ATTinyCore/hardware/avr/1.1.2/bootloaders/empty/empty_all.hex:
avrdude: input file /home/kprims/.arduino15/packages/ATTinyCore/hardware/avr/1.1.2/bootloaders/empty/empty_all.hex contains 2 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.11s

avrdude: verifying ...
avrdude: 2 bytes of flash verified

avrdude done.  Thank you.

Could you tell me what you have selected under your tools menu?

"Could you tell me what you have selected under your tools menu?"

Looks like he's selected tiny85 with internal oscillator at 8mhz. Edit: Yup, now I see he's posted a pic of it (I was thrown off because he didn't use quote tags, and didn't see the attachment on the new posts screen)

nick13579:
I get an error every time I try to burn the bootloader:

Is that the only output you get?

It looks like the bottom of that output is cut off - it should end with an error of some sort, or an indication of success. Can you confirm that that really is the entirety of the output, or post the complete output if not?

People seem to have a lot of weird problems with USBTinyISP and clones thereof - I recommend USBAsps instead, I've had very good luck with them.

That "operation not supported" message can be safely ignored in this case - the operation in question is "display detailed info about the programmer".

avrdude-6.3.0/pgm.c

void programmer_display(PROGRAMMER * pgm, const char * p)
{
  avrdude_message(MSG_INFO, "%sProgrammer Type : %s\n", p, pgm->type);
  avrdude_message(MSG_INFO, "%sDescription     : %s\n", p, pgm->desc);

  pgm->display(pgm, p);  // <<-- usbtiny does not change this from the default
}


PROGRAMMER * pgm_new(void)
{
...
  pgm->display        = pgm_default_6;
...
}

static void pgm_default(void)
{
  avrdude_message(MSG_INFO, "%s: programmer operation not supported\n", progname);
}

static void pgm_default_6 (struct programmer_t * pgm, const char * p)
{
  pgm_default();
}

I have the same exact things selected under the tools menu.

Sorry, here is the entire error message:

Arduino: 1.8.1 (Windows 10), Board: "ATtiny25/45/85, Disabled, CPU, ATtiny85, 8 MHz (external), B.O.D. Disabled"

C:\Users\Nick1\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino8/bin/avrdude -CC:\Users\Nick1\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.1.2/avrdude.conf -v -pattiny85 -cusbtiny -e -Uefuse:w:0xFF:m -Uhfuse:w:0xD7:m -Ulfuse:w:0xFF:m

avrdude: Version 6.3, compiled on Dec 16 2016 at 13:33:19
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch

System wide configuration file is "C:\Users\Nick1\AppData\Local\Arduino15\packages\ATTinyCore\hardware\avr\1.1.2/avrdude.conf"

Using Port : usb
Using Programmer : usbtiny
Setting bit clk period : 5.0
avrdude: usbdev_open(): Found USBtinyISP, bus:device: bus-0:\.\libusb0-0001--0x1781-0x0c9f
AVR Part : ATtiny85
Chip Erase delay : 400000 us
PAGEL : P00
BS2 : P00
RESET disposition : possible i/o
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack


eeprom 65 12 4 0 no 512 4 0 4000 4500 0xff 0xff
flash 65 12 32 0 yes 8192 64 128 30000 30000 0xff 0xff
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 2 0 0 0 0 0x00 0x00

Programmer Type : USBtiny
Description : USBtiny simple USB programmer, USBtinyISP - Inexpensive USB AVR Programmer
avrdude: programmer operation not supported

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

avrdude done. Thank you.

Error while burning bootloader.

oqibidipo, I'm not sure what you want me to do with that code...

I think he's just providing proof of why it can be ignored from the avrdude source.

The real error is this:

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

(Don't bother with -F )

That indicates that the chip did not respond to an attempt to enter programming mode. Normally this is a wiring problem.

nick13579:
oqibidipo, I'm not sure what you want me to do with that code...

DrAzzy:
I think he's just providing proof of why it can be ignored from the avrdude source.

That's right, I showed where the message comes from.

So do you think my attiny is broken?

I can get the same error by by removing the chip from the dip connector or having the chip reversed in the dip connector.

The other day I replaced a 328p-pu chip in a clone Uno and just plugged in using the notch on the dip connector which just happened to be installed backwards. Double check everything on your programmer including checking for voltage on the reset lead as well as Bat and Gnd being where it is supposed to be.

Looking at this schematic, I don't see how the reset lead on pin 1 of the target attiny85 works without a 10k ohm resistor connected to vcc. Also there are no .1uF connected on the target attiny. I must be jumping to conclusions and would welcome somebody setting me straight.

You get that error from most wiring problems (though shorting MISO to Vcc or Gnd, or leaving it unconnected will give signature errors. Check continuity as well as pins shorted to eachother or ground.

kprims: The 10k resistor on reset is optional. It's recommended, particularly in high EMI environments, and is required for the DTR reset trick, but the reset pin's internal pullup is enabled by default. And it's 0.1uF you want, not 0.01