Attiny85 mit avrdude und USBASP programmieren

Gast #5694324
Lesenswert?

Was kommt in die Arguments rein bei avrdude um ein Attiny85 mit dem 
USBASP Programmer zu flaschen? Ich benutze Ateml Studio 7
und ist t85 richtig für Attiny85?
das habe ich drin:
-p t85-cusbasp -P usb -U 
flash:w:"$(ProjectDir)Debug\$(TargetName).hex":i


Das kommt als Ausgabe:
avrdude.exe: no programmer has been specified on the command line or the 
config file
             Specify a programmer using the -c option and try again
Gast #5694456
Lesenswert?

Er findet aber das Gerät nicht. Obwohl Treiber installiert und im 
Gerätemanager wird er auch angezeigt.

avrdude.exe: error: could not find USB device with vid=0x16c0 pid=0x5dc 
vendor='www.fischl.de' product='USBasp'
Gast #5694665
Lesenswert?

Stefanus F. schrieb:
> Hast du den libusb Treiber installiert? Siehe
> http://stefanfrings.de/avr_tools/index.html#avrdude

Nee, habe es jetzt gemacht!

Jetzt habe ich diesen fehler:


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


avrdude.exe done.  Thank you.
Gast #5694699
Lesenswert?

Die Kommunikation zwischen PC und Programmieradapter läuft jetzt. Nun 
prüfe die Verbindungen zwischen Mikrocontroller und Programmieradapter.

Wie hast du sie verbunden (Schaltplan+Foto)?

> warning: cannot set sck period. please check for usbasp
> firmware update.

Das bedeutet, dass die Firmware deines USBASP die Änderung der 
Taktfrequenz (mittels -B Parameter) nicht unterstützt. Avrdude macht 
trotzdem weiter. Meiner ermittelt die Taktfrequenz automatisch. Es gibt 
aber auch welche, die über einen Jumper (JP3) auf "langsam" eingestellt 
werden.

Falls dein Target nicht mit 5V versorgt wird erlaube mir die Frage ob 
Dir bewusst ist dass die meisten USBASP ausschliesslich 5V Signale 
unterstützen (auch die mit 3,3V Jumper)?

Siehe http://eecs.oregonstate.edu/education/docs/ece375/USBASP-UG.pdf
Gast #5694724
Lesenswert?

Stefanus F. schrieb:
> Die Kommunikation zwischen PC und Programmieradapter läuft jetzt. Nun
> prüfe die Verbindungen zwischen Mikrocontroller und Programmieradapter.
>
> Wie hast du sie verbunden (Schaltplan+Foto)?

Ich habe:
VCC an Pin5
GND - P4
MOSI - P5
MISO - P6
SCK - P7
Reset - P1 angeschlossen.

Soll ich den USBISN auf 3.3v oder 5v schalten?

Ich hatte außerdem den GND Pin eine Zeile zu tief auf dem Breadboard, 
jetzt wieder dran und kriege nun dies:
1
avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.
2
avrdude.exe: AVR device initialized and ready to accept instructions
3

4
Reading | ################################################## | 100% 0.00s
5

6
avrdude.exe: Device signature = 0x000000 (retrying)
7

8
Reading | ################################################## | 100% 0.00s
9

10
avrdude.exe: Device signature = 0x000000 (retrying)
11

12
Reading | ################################################## | 100% 0.00s
13

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

19

20
avrdude.exe done.  Thank you.
Gast #5694743
Lesenswert?

1
avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.
2
avrdude.exe: AVR device initialized and ready to accept instructions
3

4
Reading | ################################################## | 100% 0.00s
5

6
avrdude.exe: Device signature = 0x1e930b (probably t85)
7
avrdude.exe: NOTE: "flash" memory has been specified, an erase cycle will be performed
8
             To disable this feature, specify the -D option.
9
avrdude.exe: erasing chip
10
avrdude.exe: warning: cannot set sck period. please check for usbasp firmware update.
11
avrdude.exe: reading input file "D:\xxxxxyz.hex"
12
avrdude.exe: writing flash (98 bytes):
13

14
Writing | ################################################## | 100% 0.12s
15

16
avrdude.exe: 98 bytes of flash written
17
avrdude.exe: verifying flash memory against D:\xyxyx.hex:
18
avrdude.exe: load data flash data from input file D:\yxyx.hex:
19
avrdude.exe: input file D:yxyx.hex contains 98 bytes
20
avrdude.exe: reading on-chip flash data:
21

22
Reading | ################################################## | 100% 0.07s
23

24
avrdude.exe: verifying ...
25
avrdude.exe: 98 bytes of flash verified
26

27
avrdude.exe: safemode: Fuses OK (E:FF, H:DF, L:62)
28

29
avrdude.exe done.  Thank you.

So Programmierung läuft. Sieht das so ok aus, was würdest du noch 
ändern?
Gast #5695006
Lesenswert?

Ja sieht Ok aus.
Warum hatte es vorher nicht geklappt?

Den ATtiny kann man mit 3,3V und 5V programmieren. Aber wenn er mit 3,3V 
versorgt wird, die Signale aber 5V haben, freut er sich gar nicht. 
Kontrolliere das mal an deinem Programmieradapter, dann weißt du für die 
Zukunft bescheid, ob die 3,3V richtig funktionieren. Man soll die Mängel 
seiner Werkzeuge kennen.

Antwort schreiben

Bitte melde dich an, um einen Beitrag zu schreiben.

oder

Mit Google-Account einloggen

Die Registrierung ist kostenlos und dauert nur eine Minute.

Jetzt registrieren