Forum: Mikrocontroller und Digitale Elektronik Kleines Programm für ATMega644


von Jörg H. (gustl)


Angehängte Dateien:

Lesenswert?

Hallo,

ich habe nun einen USBasp und eine kleine Platine gelötet nach dem 
hochgelandeten Schaltplan (Anhang).
Oben ist die Platine mit dem ATMega644, im Schaltplan aber Mega32.
Unten ist die Schaltung vom USBasp.
Jetzt habe ich beim Wannenstecker oben die Pins 4 und 6 nicht mit GND 
verbunden, sonder offen gelassen, da Pin 4(TXD) und Pin 8(RXD) auf dem 
Mega8 beim USBasp geht.

Ich hab nun folgendes Programm kompiliert:
1
$regfile = "m644def.dat"         
2
$crystal = 8000000
3
$baud = 19200
4
5
$hwstack = 128
6
$swstack = 128
7
$framesize = 128             
8
Config Portc.0 = Output          
9
10
Do
11
  Portc.0 = 1         
12
  Waitms 100
13
  Portc.0 = 0    
14
  Waitms 100
15
Loop
16
17
End

und die daraus erstellte hex-datei (test.hex) über
1
avrdude -c usbasp -p m64 -U eeprom:w:test.hex -F
daraufhin kommt in der Konsole folgende Meldung:
1
avrdude: warning: cannot set sck period. please check for usbasp firmware updat.
2
avrdude: AVR device initialized and ready to accept instructions 
3
Reading | ################################################## | 100% 0.04s
4
avrdude: Device signature = 0x1e9609
5
                                           
6
avrdude: Expected signature for ATMEGA64 is 1E 96 02                         
7
avrdude: reading input file "test.hex"                                        
8
avrdude: input file test.hex auto detected as Intel Hex                        
9
avrdude: writing eeprom (268 bytes):
10
11
Writing | ################################################## | 100% 3.90s
12
                                                                                                                                                                                                                                                   avrdude: 268 bytes of eeprom written                                         
13
avrdude: verifying eeprom memory against test.hex:                            
14
avrdude: load data eeprom data from input file test.hex:                      
15
avrdude: input file test.hex auto detected as Intel Hex                      
16
avrdude: input file test.hex contains 268 bytes
17
                                
18
avrdude: reading on-chip eeprom data:
19
Reading | ################################################## | 100% 1.20s
20
                                                                                                                                                                                                                                                   avrdude: verifying ...
21
                                                         
22
avrdude: 268 bytes of eeprom verified
23
avrdude: safemode: Fuses OK
24
avrdude done.  Thank you.

Danach blinkt aber die LED leider nicht. Könnte mir wer helfen und die 
LED zum blinken bringen? Wäre super.

Bin Anfänger in dem Bereich und mache gerade meine ersten Schritte.

Gruß

von Spess53 (Gast)


Lesenswert?

Hi

>avrdude: reading input file est.hex"
>avrdude: input file test.hex auto detected as  Intel Hex
>avrdude: writing eeprom (268 bytes):

Dein Programm gehört in den Flashspeicher, nicht in das EEPROM.

MfG Spess

von Thomas E. (thomase)


Lesenswert?

Jörg Häfner schrieb:
> avrdude -c usbasp -p m64 -U eeprom:w:test.hex -F
Kenne mich zwar mit diesem Kommandozeilenkram nicht sonderlich aus, aber 
die Zeile sagt mir, daß da etwas in Eeprom geschrieben wird. Programme 
gehören aber ins Flash.

mfg.

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.