Go Down

Topic: Bootloading problem on atmega 328 (Read 353 times) previous topic - next topic

spiker15

Oct 03, 2015, 07:20 pm Last Edit: Oct 03, 2015, 07:21 pm by spiker15
hello,
I am trying to put the bootloader on my atmega 328, and using the 8mhz internal oscillator.

So, i followed that guide :
[link]https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard[/link]

Hoping that it gonna work, but unfortunately, it doesn't work ..

It tells me :
Code: [Select]
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.


I think there is a connection problems between my Mega2560 and my atmega 328
I check all my connection and evrything is ok ..
Can you please help me ?

johnwasser

If you go to Preferences and turn on "Show verbose output during upload" you'll be able to see what signature is being received.

If the signature is 1E 95 0F (ATmega328p) then the board you selected is for a different processor.

If the signature is 1e 98 01 (ATmega2560) then you did not successfully disable Auto Reset on the MEGA you are using as an ISP.

If the signature is 1E 95 14 (ATmega328, not 328p) you got the wrong processor.  All of the Arduinos that use a 328 use a 328P.

If the signature is 00 00 00 or FF FF FF then either the wiring is wrong or the processor is set to require a crystal for its system clock and doesn't have one.  The system clock has to be running for serial programming to work.
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp

spiker15

Finally, i found the way how to write the bootloader using this guide :
http://www.gammon.com.au/breadboard

But now, i am trying to upload a sketch (blink) using Tx, Rx and reset and it fails.
Here is the result :

Code: [Select]
avrdude: Version 6.0.1, compiled on Apr 15 2015 at 19:59:58
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2009 Joerg Wunsch

         System wide configuration file is "C:\Program Files\Arduino\hardware\tools\avr/etc/avrdude.conf"

         Using Port                    : COM6
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 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        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0xfc
         Hardware Version: 2
         Firmware Version: 1.16

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0xfc

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0xfc
avrdude: stk500_recv(): programmer is not responding


I read somewhere that i should add a 0.1uF capacitor between Reset and GND, but i don't have capacitor yet, i ordered some and i am waiting for it ..

johnwasser

I read somewhere that i should add a 0.1uF capacitor between Reset and GND, but i don't have capacitor yet, i ordered some and i am waiting for it ..
What you should have read is the need to put a 100nF capacitor between the DTR line of your FTDI cable and the Reset pin of the target processor.  That's how you get auto-reset to work.
You can try a manual reset by holding the reset button until the compiler finishes.  If you have an FTDI cable with an RX light you can release Reset when the RX light blinks.
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp

Go Up