Go Down

Topic: ATTiny85 upload error (Read 209 times) previous topic - next topic

hcccs

I'm getting "An error occurred while uploading the sketch" when uploading a simple sketch to an ATTiny85 connected to my pc through a Sparkfun Tiny Programmer. The compilation goes through fine but there is no extra error info why this happens. Any clues?

Code: [Select]
int blinkPin = 0;

void setup()
{
  pinMode(blinkPin, OUTPUT);
}

void loop()
{
  digitalWrite(blinkPin, HIGH);
  delay(500);
  digitalWrite(blinkPin, LOW);
  delay(500);
}

WattsThat

Turn on verbose output for upload and post the results here using [code][/code] tags.

Vacuum tube guy in a solid state world

hcccs

Here's the code. In the Forum I found a guy who solved the problem by changing the programmer from AVRISP mkII to ArduinoISP but it gave me another error. I also tried to change to USBTinyISP which gave some errors but did blink the LED on the programmer.

Error code with AVRISP mkII:
Code: [Select]
avrdude: Version 6.3-20171130
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : usb
         Using Programmer              : stk500v2
An error occurred while uploading the sketch
avrdude: usbdev_open(): did not find any USB device "usb" (0x03eb:0x2104)

avrdude done.  Thank you.


Error code with USBTinyISP:
Code: [Select]
avrdude: Version 6.3-20171130
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : usb
         Using Programmer              : usbtiny
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     6    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          1    0      0     0     0 0x00 0x00

         Programmer Type : USBtiny
         Description     : USBtiny simple USB programmer, https://learn.adafruit.com/usbtinyisp
avrdude: programmer operation not supported

avrdude: Using SCK period of 10 usec
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: Using SCK period of 10 usec
avrdude: reading input file "C:\Users\hans\AppData\Local\Temp\arduino_build_521023/Blink_ATtiny.ino.hex"
avrdude: writing flash (910 bytes):

Writing | ################################################## | 100% 2.53s

avrdude: 910 bytes of flash written
avrdude: verifying flash memory against C:\Users\hans\AppData\Local\Temp\arduino_build_521023/Blink_ATtiny.ino.hex:
avrdude: load data flash data from input file C:\Users\hans\AppData\Local\Temp\arduino_build_521023/Blink_ATtiny.ino.hex:
avrdude: input file C:\Users\hans\AppData\Local\Temp\arduino_build_521023/Blink_ATtiny.ino.hex contains 910 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.91s

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

avrdude done.  Thank you.


BJHenry

Error code with USBTinyISP:
(snip)
It looks like the upload process has completed successfully there, what makes you think there has been an error?

hcccs

I just saw a possible error in the listing:

" Description     : USBtiny simple USB programmer, https://learn.adafruit.com/usbtinyisp
avrdude: programmer operation not supported"

It doesn't say what operation it is but if it's just a comment I'm happy that it works now.

BJHenry

Given the rest of the message I'd say that it has written correctly.
Incidentally, if you look at the Sparkfun hookup guide you'll see that USBTinyISP is the correct programmer selection to use.

hcccs

I read it again and I noticed that. Thanks.

Go Up