Go Down

Topic: can't upload bootloader/sketch to my attiny85 through my UNO (as ISP device) (Read 550 times) previous topic - next topic

SUPERWESTER

Error:
Code: [Select]
Arduino: 1.8.5 (Windows 10), Board: "ATtiny25/45/85, ATtiny85, Internal 1 MHz"

WARNING: Spurious .vs folder in 'DallasTemperature' library
Sketch uses 5976 bytes (72%) of program storage space. Maximum is 8192 bytes.
Global variables use 227 bytes (44%) of dynamic memory, leaving 285 bytes for local variables. Maximum is 512 bytes.
C:\Users\wester\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/bin/avrdude -CC:\Users\wester\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf -v -pattiny85 -cstk500v1 -PCOM7 -b19200 -Uflash:w:C:\Users\wester\AppData\Local\Temp\arduino_build_970479/TEMP_ATTINY.ino.hex:i

avrdude: Version 6.3, compiled on Jan 17 2017 at 12:00:53
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\wester\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9/etc/avrdude.conf"

         Using Port                    : COM7
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         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 : STK500
         Description     : Atmel STK500 Version 1.x firmware
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000 (retrying)

An error occurred while uploading the sketch
Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.



i managed to upload a program the first time, no problem at all, but i forgot to upload a bootloader before uploading the sketch, maybe that's a issue?

i've been trying to erase the memory on the attiny directly throw avrdude but i'm really inexperience with it and i think it doesnt recognize the attiny neither.

all the wiring and programmer/target-board have been checked and re-checked.

i've tried everthing i was able to find, with no luck :(

if you're willing to help i would be so grateful :) :)


ballscrewbob

I will presume you have the "Arduino as ISP" sketch installed on the UNO as without it you wont get too far.

A schematic of how you have it hooked up (not a cut and paste from elsewhere) would be nice to see.
Even hand drawn works.

Any pictures you have (decent and no blurry cockroach with coloured blurry lines coming from it. attached).

If everything is correct it is possible to burn the bootloader again (make sure the correct chips is selected)

Occasionally you may also need something to reset the chip fuses like an HVP but I have not needed that yet even with a mistake on the bootloader on my part.

It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

SUPERWESTER

indeed, the programmer is set to arduino as ISP.

im working on the IDE v1.8.4


A schematic of how you have it hooked up (not a cut and paste from elsewhere) would be nice to see.
Even hand drawn works.

Any pictures you have (decent and no blurry cockroach with coloured blurry lines coming from it. attached).

schemtaic of my setup attached.

thanks for replying :)

ballscrewbob

I cannot see the capacitor in the blurry cockroach.

BTW that's not really a schematic.
Hard to tell but possibly VCC or ground wrong way around ? (too blurry)

Its a start but not quite good enough just yet to make any real assumptions.

It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

SUPERWESTER

I cannot see the capacitor in the blurry cockroach.

Hard to tell but possibly VCC or ground wrong way around ? (too blurry)

Its a start but not quite good enough just yet to make any real assumptions.


are this pictures more useful? :)

the positive of the capacitor is connected to the reset. negative to ground.



BTW that's not really a schematic.


my bad, im still learning the correct terms.
is diagram  more apropriate?



ballscrewbob

The only thing I can see is where you have the 5V supply as that is normally AREF it should not make a big difference but it might. Try putting that on the actual 5V pin instead.
Its a clone so maybe its correct but having it on the correct 5V wont harm it.

It is possible you burnt the fuses wrong with the bootloader.
Also which cores are you using as that could also make a difference.
Not all bootloaders are the same for the ATTINY (as I found out with some ATTINY13)


It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

SUPERWESTER

The only thing I can see is where you have the 5V supply as that is normally AREF it should not make a big difference but it might. Try putting that on the actual 5V pin instead.
Its a clone so maybe its correct but having it on the correct 5V wont harm it.


yes it's a clone. I've tried it on the "normal" 5v output. I started trying with my original UNO, same result.


It is possible you burnt the fuses wrong with the bootloader.
Also which cores are you using as that could also make a difference.
Not all bootloaders are the same for the ATTINY (as I found out with some ATTINY13)



for the cores i used the ones specified in this guide http://highlowtech.org/?p=1695

how can i fix the fuses?
also... is there a way to erase the memory on the attiny? any way of doing it using avrdude directky?

ballscrewbob

Those cores are quite old.

I found THESE quite useful too.

There are a few variant cores and by accident I think one of them fixed my ATTINY bootloader mistake although I would not know how to replicate it apart from trying different cores and clock speeds.

The memory on the ATTINY is erased when a new sketch is uploaded so uploading something simple such a "bare minimum" example would clear it out.

It may not be the answer you were looking for but its the one I am giving based on either experience, educated guess, google or the fact that you gave nothing to go with in the first place so I used my wonky crystal ball.

SUPERWESTER

Those cores are quite old.

I found THESE quite useful too.

There are a few variant cores and by accident I think one of them fixed my ATTINY bootloader mistake although I would not know how to replicate it apart from trying different cores and clock speeds.

The memory on the ATTINY is erased when a new sketch is uploaded so uploading something simple such a "bare minimum" example would clear it out.

just tried them but same result :(

i think i will have to try with an programmer board to make this work :/
i really didnt want to spend those extra bucks but it seems its the only way

thanks for all the help!!!

Go Up