Can`t upload a code to ATtiny85 with USBasp

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

I try to see if everything is ok with ATtiny85 and usbasp via command line,avrdude gives this error:

C:\Users\Eldar>avrdude -p t85 -c usbasp

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: programm enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

I just want to upload this code via atmel studio 7,when uploading via atmel studio it gives the exact output as mentioned above

#define F_CPU 8000000UL
#include <avr/io.h>
#include <util/delay.h>
#include <avr/wdt.h>
int main(void)
{
    DDRB |= (1 << PB1);
    while(1)
    {
        PORTB|=(1<<PB1);
        _delay_ms(100);
        PORTB&=~(1<<PB1);
    }
}
       

I`ve checked the wiring, have installed the libusk driver,my OS is windows 10 and it doesn`t give any driver error,recognizes usbasp

Furthermore, arduino IDE doesn`t clarify com  port  for usbasp here is the output:

Sketch uses 280 bytes (3%) of program storage space. Maximum is 8192 bytes.
Global variables use 9 bytes (1%) of dynamic memory, leaving 503 bytes for local variables. Maximum is 512 bytes.
avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: program enable: target doesn't answer. 1 
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

the selected serial port 
 does not exist or your board is not connected
 

Any answer is appreciated,thanks beforehand 

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

Does the target t85 have power? 

Can you read the signature bytes of the t85?

Does the t85 have a 100nf cap mounted close to the vcc/gnd pins?

 

Please post a picture of your setup (pcb)!

 

Jim

 

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274

 

 

 

Last Edited: Tue. Feb 5, 2019 - 09:46 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I can`t get device signature either:

C:\Users\Eldar>avrdude -c usbasp -p t85 -F

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: programm enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0x000000
avrdude: Yikes!  Invalid device signature.
avrdude: Expected signature for ATtiny85 is 1E 93 0B

avrdude done.  Thank you.

t85 gets power,I`ve checked with multimeter

Here is the connection:Wires attached to USBasp:

white -MISO

orange-SCK

yellow -RST

blue-GND

green-MOSI

red-VCC

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

Plug boards suck, most likely a bad connection between pin and board, try moving the chip to another place on the board and try again!

Arduino nano's are SO much easier ( and cheaper too) to use on a BB.

PS: your cap is useless located where it is, to be useful it must be placed as close to the chip as possible, in this example, solder it directly to the vcc/gnd pins with it laying across the top of the chip!

 

Jim

 

Click Link: Get Free Stock: Retire early! PM for strategy

share.robinhood.com/jamesc3274

 

 

 

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

Hey Eldar, If you haven't got this working yet try disconnecting the LED from PB0 and programming.

I have had problems with components connected preventing programming. 

 

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

Thanks all for responses, I`ve done what you`ve said but still no result.Any ideas?

Last Edited: Fri. Feb 8, 2019 - 08:21 AM