Hallo, habe mir ein neues Board zum Testen mit einem ATmega8 aufgebaut, nur leider kann ich die Software nicht auf den mega8 flashen. avrdude kann erfolgreich die fuses lesen, also denke ich, die Kommunikation sollte funktionieren. Hier der Output (habe schon von int. 1MHz auf 16MHz Quarz umgestellt): <log> avrdude -p m8 -c pony-stk200 -n -v avrdude: Version 5.4, compiled on May 21 2007 at 21:35:45 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ System wide configuration file is "/etc/avrdude.conf" User configuration file is "/home/anpu/.avrduderc" User configuration file does not exist or is not a regular file, skipping Using Port : /dev/parport0 Using Programmer : pony-stk200 AVR Part : ATMEGA8 Chip Erase delay : 10000 us PAGEL : PD7 BS2 : PC2 RESET disposition : dedicated 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 4 20 128 0 no 512 0 0 9000 9000 0xff 0xff flash 33 10 64 0 yes 8192 64 128 4500 4500 0xff 0x00 lfuse 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00 hfuse 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00 lock 0 0 0 0 no 1 0 0 2000 2000 0x00 0x00 calibration 0 0 0 0 no 4 0 0 0 0 0x00 0x00 signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00 Programmer Type : PPI Description : Pony Prog STK200 VCC = (not used) BUFF = 4,5 RESET = 9 SCK = 6 MOSI = 7 MISO = 10 ERR LED = 0 RDY LED = 0 PGM LED = 8 VFY LED = 0 avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.00s avrdude: Device signature = 0x1e9307 avrdude: safemode: lfuse reads as FF avrdude: safemode: hfuse reads as D9 avrdude: safemode: lfuse reads as FF avrdude: safemode: hfuse reads as D9 avrdude: safemode: Fuses OK avrdude done. Thank you. </log> Beim Schreiben der Test-SW kommt aber folgender Fehler, was hat das zu bedeuten? Nachdem Schreiben scheint er nur noch Nullen zu Lesen! <log> avrdude -p atmega8 -P /dev/parport0 -c pony-stk200 -E noreset -U flash:w:avr_test.hex avrdude: AVR device initialized and ready to accept instructions Reading | ################################################## | 100% 0.00s avrdude: Device signature = 0x1e9307 avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed To disable this feature, specify the -D option. avrdude: erasing chip avrdude: reading input file "avr_test.hex" avrdude: input file avr_test.hex auto detected as Intel Hex avrdude: writing flash (174 bytes): Writing | ################################################## | 100% 0.13s avrdude: 174 bytes of flash written avrdude: verifying flash memory against avr_test.hex: avrdude: load data flash data from input file avr_test.hex: avrdude: input file avr_test.hex auto detected as Intel Hex avrdude: input file avr_test.hex contains 174 bytes avrdude: reading on-chip flash data: Reading | ################################################## | 100% 0.09s avrdude: verifying ... avrdude: verification error, first mismatch at byte 0x0000 0x12 != 0x00 avrdude: verification error; content mismatch avrdude: safemode: lfuse changed! Was ff, and is now 0 Would you like this fuse to be changed back? [y/n] y avrdude: safemode: and is now rescued avrdude: safemode: hfuse changed! Was d9, and is now 0 Would you like this fuse to be changed back? [y/n] y avrdude: safemode: and is now rescued avrdude: safemode: Fuses OK avrdude done. Thank you. make: *** [program] Error 1 </log> Bin für jeden Hinweis dankbar! Grüße Andi
Probier mal, ein -i5 oder -i10 mit in die Kommandozeile aufzunehmen.
Hallo Jörg, danke für deine Antwort! Das hatte ich allerdings auch schon probiert, hilft leider nix. Könnte es denn noch an den Lock-Bits liegen, obwohl ich einen Chip erase vorher mache? Der ATmega8 ist brand neu. Vielen Dank Andi
Nein, mit Lockbits hat das nichts zu tun. Wie lang ist denn dein ISP-Kabel so? Hast du einen Treiber drin, oder muss das die Parallelschnittstelle selbst treiben?
Hallo, ich verwende diesen ISP hier (http://rumil.de/hardware/avrisp.html) mit 10poligem Anschluss. ISP hängt am Parrallel-Port mit ca. 1,5m Kabel und vom ISP zur Platine sind es ca. 15cm Flachband-Kabel. Grüße Andi
Die 1,5 m finde ich ziemlich viel. Probier mal, ob weiteres Runtersetzen des ISP-Taktes hilft (-i20 oder so). Dein Problem liegt irgendwo in der Hardware, entweder des ISP-Adapters oder der Zielschaltung.
Hallo, hab jetzt mal versucht die Delays sukzessive zu vergrößern und siehe da: bei -i [50..70] läuft die Kiste. Zwar nicht immer, aber spätestens beim 3ten Anlauf. Doch Kabel zu lang? Frag mich nur, warum ich beim mega16 da nie probleme hatte ?! Grüße Andi
Keine Ahnung. Ich würde dir ja zu einem aktiven Programmer raten, der selbst einen Controller besitzt. Irgendwas STK500artiges am Besten (da gibt's auch massig Clones davon, ich meine damit lediglich das Kommunikationsprotokoll).
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
Mit Google-Account einloggen
Noch kein Account? Hier anmelden.