logo elektroda
logo elektroda
X
logo elektroda
REKLAMA
REKLAMA
Adblock/uBlockOrigin/AdGuard mogą powodować znikanie niektórych postów z powodu nowej reguły.

Problem z zaprogramowaniem atmegi8

20rafalo 14 Wrz 2009 12:40 2278 13
REKLAMA
  • #1 7016110
    20rafalo
    Poziom 19  
    Witam
    Mam poroblem z zaprogramowaniem atmegi8. Na tym samym programatorze programuję bez problemu Atiny 2313
    Po włożeniu Atmegi8 (oczywiście program pod atmegę8) są problemy.
    Załączam komunikaty:
    make jest ok:
    > "make.exe" all
    
    -------- begin --------
    avr-gcc (WinAVR 20090313) 4.3.2
    Copyright (C) 2008 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    
    Size before:
    AVR Memory Usage
    ----------------
    Device: atmega8
    
    Program:     172 bytes (2.1% Full)
    (.text + .data + .bootloader)
    
    Data:          0 bytes (0.0% Full)
    (.data + .bss + .noinit)
    
    
    
    
    Size after:
    AVR Memory Usage
    ----------------
    Device: atmega8
    
    Program:     172 bytes (2.1% Full)
    (.text + .data + .bootloader)
    
    Data:          0 bytes (0.0% Full)
    (.data + .bss + .noinit)
    
    
    
    -------- end --------
    
    
    > Process Exit Code: 0
    > Time Taken: 00:01


    program- są błędy:

    > "make.exe" program
    avrdude -p atmega8 -P com2 -c stk500v2    -U flash:w:kurs2008cz_2_6.hex 
    avrdude: stk500_2_ReceiveMessage(): timeout
    
    avrdude: stk500v2_command(): command failed
    avrdude: stk500v2_command(): command failed
    avrdude: stk500v2_program_enable(): cannot get connection status
    avrdude: initialization failed, rc=-1
             Double check connections and try again, or use -F to override
             this check.
    
    
    avrdude done.  Thank you.
    
    make.exe: *** [program] Error 1
    
    > Process Exit Code: 2
    > Time Taken: 00:17
    
  • REKLAMA
  • #2 7016491
    mazomen
    Poziom 16  
    Atmega jest nowa czy używałeś ją wcześniej? Próbowałeś programować innym programatorem lub programem?
  • REKLAMA
  • #4 7016646
    robi667
    Poziom 18  
    Może ma ustawione fuse-bity na zewnętrzny kwarc lub kolega ma programator równoległy i np. wyłączył pin RESET? Zrób wywiad, na jakich ustawieniach jej ostatnio używał.
  • REKLAMA
  • #6 7016765
    robi667
    Poziom 18  
    Możliwe, że nie musisz. Jeśli kolega używał ATmegi z zewnętrznym kwarcem, podłącz takowy wraz z kondensatorami 18-33pF i jeśli tego dotyczył problem, zaprogramujesz ją bez problemu. Możesz też ponownie zmienić fuse-bity na pracę z wewnętrznym oscylatorem.
  • REKLAMA
  • #7 7434671
    Pawel365
    Poziom 11  
    Witam ja dopiero zaczynam zabawie z uC. złożyłem sobie pierwszy układ z kursu http://www.kursc.dioda.com.pl/str001.html program jest już gotowy. kompilacja przebiegła ok ale po zakończeniu programowania uC w avrdude pojawia ma się komunikat avrdude.exe: AVR device initialized and ready to accept instructions

    Reading | ################################################## | 100% 0.05s

    avrdude.exe: Device signature = 0x1e9307
    avrdude.exe: reading input file "C:\Users\Paweł\Desktop\led.hex"
    avrdude.exe: input file C:\Users\Paweł\Desktop\led.hex auto detected as Intel Hex
    avrdude.exe: writing flash (810 bytes):

    Writing | ################################################## | 100% 4.57s

    avrdude.exe: 810 bytes of flash written
    avrdude.exe: verifying flash memory against C:\Users\Paweł\Desktop\led.hex:
    avrdude.exe: load data flash data from input file C:\Users\Paweł\Desktop\led.hex:
    avrdude.exe: input file C:\Users\Paweł\Desktop\led.hex auto detected as Intel Hex
    avrdude.exe: input file C:\Users\Paweł\Desktop\led.hex contains 810 bytes
    avrdude.exe: reading on-chip flash data:

    Reading | ################################################## | 100% 4.04s

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

    avrdude.exe done. Thank you.

    diody nie świeca i nie wiem co zrobić. Wie ktoś co to za błąd??
  • #8 7436043
    OlekM
    Poziom 17  
    Do: Pawel365

    Sprawdź napięcia zasilające mikrokontroler. Taki problem zwykle wynika stąd, że mikrokontroler pobiera zasilanie z linii danych (np. z programatora). Wówczas wykrywa się i "udaje", że się programuje, ale weryfikacja nie przechodzi (bo FLASH nie zostaje zaprogramowany).
  • #9 7436830
    Pawel365
    Poziom 11  
    sprawdziłem napięcie. Na nóżkach uC mam 4.99v wszędzie tam gdzie powinno być i każda masa też się styka.A no i dodam iż cały układ zasilam tylko ze stabilizatora.
  • #10 7436998
    OlekM
    Poziom 17  
    Nadal obstawiam problemy z zasilaniem. Kilka kolejnych pytań / sugestii:
    - czy przy stabilizatorze są kondensatory elektrolityczne "po obu stronach"?
    - czy jest kondensator rzędu 100nF w pobliżu zasilania mikroprocesora?
    - AVCC i AGND też są podłączone ?
    (wiem, że praktycznie już otrzymałem odpowiedź na to pytanie - dla pewności proszę jednak potwierdzić, że mówiliśmy także o tych nóżkach)
    - czy masa "przechodzi" pomiędzy układem a programatorem
    - jaki to programator?
    - jeśli programator wymaga zasilania z układu, to czy otrzymuje je?
    - jeśli programator wymaga zewnętrznego zasilania, to czy otrzymuje je?
  • #11 7437270
    Pawel365
    Poziom 11  
    no jednak to były problemy z zasilaniem a mianowicie gdy zamiast ze stabilizatora podałem napięcie z programatora to wszystko chodzi. A co do stabilizatora to jest złożony wg tego schematu
    Problem z zaprogramowaniem atmegi8
    więc zostaje podawania zasilania przynajmniej podczas wgrywania wsadu przez programator. A czemu na stabilizatorze wskazuje błąd ??
    dodam że programator to http:/

    Moderowany przez Mirek Z.:

    Link usunąłem - p.10.11 regulaminu.

  • #12 7437732
    OlekM
    Poziom 17  
    Możliwe, że na wejściu stabilizatora jest zbyt małe napięcie. Optymalnie było by około 9V - 15V.
  • #13 7439325
    Pawel365
    Poziom 11  
    Jest 12V (zasilacz antenowy) no ale mówię na wyjściu mam 4.99v
  • #14 7814220
    berbel12
    Poziom 11  
    Witam
    Mam dokłądnie ten sam problem (ukazuje sie identyczny komunikat), plytke pod uC mam zrobioną wg tego samego schematu co podal pawel365. Z tym ze u mnie problem nie znika bezwzgledu na to czy zasilam go z zasilacza czy z programatora (z portu usb). uC to Atmega8. Gdzie szukac przyczyny?
    Pozdrawiam
REKLAMA