Forum: Mikrocontroller und Digitale Elektronik Atmel Studio und Arduino Uno als Programmer


von David (Gast)


Lesenswert?

Hallo Leute,

habe ein Problem da sitze ich schon seit 2 Tagen dran. Ich programmiere 
über Atmel Studio 6 mein Arduino Uno.

Nun möchte ich den Arduino Uno als Programmer nutzen um einen Attiny44 
bzw. andere zu programmieren. Mit der Offiziellen Software geht das ohne 
Probleme. Nur ich möchte Ihn mit Atmel Studio 6 Programmieren.

Angeschlossen habe ich Ihn so:

Arduino 5V an ATtiny44 Pin 1 (VCC +)
Arduino GND an ATTiny44 Pin 14 (GND -)
Arduino Pin 10 an ATtiny44 Pin 4 (Reset)
Arduino Pin 11 an ATTiny44 Pin 7 (Pin 6, PWM, Analog Input 7)
Arduino Pin 12 an ATTiny44 Pin 8 (Pin 5, Analog Input 5, PWM, MISO)
Arduino Pin 13 an ATTiny44 Pin 9 (Pin 4, Analog Input 4, SCK)

Meine Befehle für den Arduino UNO sind:

Befehl:
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avrdude.exe
Argumente:
-C"C:\Program Files (x86)\Arduino\hardware\tools\avr\etc\avrdude.conf" 
-v -v -patmega328p -carduino -P\\.\COM4 -b115200 -D 
-Uflash:w:"$(ProjectDir)Debug\$(ItemFileName).hex":i

Wie schreibe ich die um damit der Arduino UNO den ATTiny44 programmiert?

bzw. wie geht das Arduino as ISP?

Danke schon mal vor raus.

von Arduino (Gast)


Lesenswert?


von Draco (Gast)


Lesenswert?

Probiere mal die Argumente:
1
-c arduino -p t2313 -P COM4 -b 115200 -U flash:w:$(ProjectDir)Debug\$(ItemFileName).hex:i


Ansonsten gib mal die Ausgabe von AVRDUDE her.

von David (Gast)


Lesenswert?

Danke für die schnelle Antworten:

@Arduino

http://www.instructables.com/id/AVR-Programming-wi...
bei der Hilfe ist der Parameter "-P /dev/tty.usbmodemfd121" 
unverständlich. Da bekomme ich nur ne Fehler Meldung das es den Pfad 
nicht gibt.

Bei https://tbspace.de/arduinoalsispprogrammer.html
bekomme ich ein schreibfehler.

avrdude -p attiny44 -P com4 -c stk500v1 -b 19200 -F -v -v -e 
-Ulock:w:0x3F:m -Uefuse:w:0x00:m -Uhfuse:w:0xdd:m -Ulfuse:w:0xff:m

================================================================

avrdude.exe: Version 5.10, compiled on Jan 25 2013 at 15:23:10
             Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
             Copyright (c) 2007-2009 Joerg Wunsch

             System wide configuration file is "C:\Program Files 
(x86)\Atmel\AVR Tools\AVR Toolchain\bin\avrdude.conf"

             Using Port                    : com4
             Using Programmer              : stk500v1
             Overriding Baud Rate          : 19200
             AVR Part                      : ATtiny44
             Chip Erase delay              : 4500 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     6     4    0 no        256    4 
0  4000  4500 0xff 0xff
               flash         65     6    32    0 yes      4096   64 
64  4500  4500 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.exe: please define PAGEL and BS2 signals in the configuration 
file for part ATtiny44
avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 
0.06s

avrdude.exe: Device signature = 0x1e9207
avrdude.exe: safemode: lfuse reads as 62
avrdude.exe: safemode: hfuse reads as DF
avrdude.exe: safemode: efuse reads as FF
avrdude.exe: erasing chip
avrdude.exe: please define PAGEL and BS2 signals in the configuration 
file for part ATtiny44
avrdude.exe: reading input file "0x3F"
avrdude.exe: writing lock (1 bytes):

Writing |  ***failed;
################################################## | 100% 0.16s

avrdude.exe: 1 bytes of lock written
avrdude.exe: verifying lock memory against 0x3F:
avrdude.exe: load data lock data from input file 0x3F:
avrdude.exe: input file 0x3F contains 1 bytes
avrdude.exe: reading on-chip lock data:

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

avrdude.exe: verifying ...
avrdude.exe: verification error, first mismatch at byte 0x0000
             0x3f != 0xff
avrdude.exe: verification error; content mismatch

avrdude.exe: safemode: lfuse reads as 62
avrdude.exe: safemode: hfuse reads as DF
avrdude.exe: safemode: efuse reads as FF
avrdude.exe: safemode: Fuses OK

avrdude.exe done.  Thank you.

===================================================================
===================================================================

@draco

bei dein Argument bekomme ich die ausgabe:

avrdude.exe: AVR device initialized and ready to accept instructions

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

avrdude.exe: Device signature = 0x1e950f
avrdude.exe: Expected signature for ATtiny2313 is 1E 91 0A
             Double check chip, or use -F to override this check.

avrdude.exe done.  Thank you.

Gibt es eine Seite wo jeder Parameter von Avrdude genau beschrieben ist? 
ich glaube ich brauche ein befehl -c "Arduino as ISP".

PS: Und ja ich habe weit aus mehr als 15h gegoogelt. nur jeder nutzt 
andere Programme oder die offizielle Software.

von Draco (Gast)


Lesenswert?

David schrieb:
> @draco
>
> bei dein Argument bekomme ich die ausgabe:
>
> avrdude.exe: AVR device initialized and ready to accept instructions
>
> Reading | ################################################## | 100%
> 0.00s
>
> avrdude.exe: Device signature = 0x1e950f
> avrdude.exe: Expected signature for ATtiny2313 is 1E 91 0A
>              Double check chip, or use -F to override this check.
>
> avrdude.exe done.  Thank you.

Jaja das passt schon... nun nur noch dein Target richtig setzen... in 
meiner Zeile wars ein Tiny2313... du willst ja ein Tiny44 - ergo::
1
-p t44

Bissle mitdenken muss de scho...

von Draco (Gast)


Lesenswert?

David schrieb:
> http://www.instructables.com/id/AVR-Programming-wi...
> bei der Hilfe ist der Parameter "-P /dev/tty.usbmodemfd121"
> unverständlich. Da bekomme ich nur ne Fehler Meldung das es den Pfad
> nicht gibt.

Das ist für Linux... unter Windows einfach -P und der Com Port dazu... 
-P COM5 z.b.

von David (Gast)


Lesenswert?

Ich habe die Lösung gefunden es klappt jetzt. Tagelanges kombinieren 
aller Parameter :)

Mein Ergebnis ist für Atmel Studio 6:

Befehl:
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avrdude.exe

Argument:
avrdude -p attiny44 -P com4 -c avrisp -b 19200 -F -v -v -e  -D 
-Uflash:w:"$(ProjectDir)Debug\$(ItemFileName).hex":i



Danke nochmal für eure Hilfe :)

Bitte melde dich an um einen Beitrag zu schreiben. Anmeldung ist kostenlos und dauert nur eine Minute.
Bestehender Account
Schon ein Account bei Google/GoogleMail? Keine Anmeldung erforderlich!
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.