Go Down

Topic: Atmega328p error burning bootloader (Read 1 time) previous topic - next topic

skyfly200

May 02, 2013, 04:43 pm Last Edit: May 02, 2013, 08:32 pm by skyfly200 Reason: 1
I have been trying for a while now to burn the bootloader to this chip and another of the same. I keep getting an error and I have not found a solution on google.
I am running the most recent arduino IDE and using sparkfun's tiny programer. I am running windows seven.
I have the right programer and serial port selected and I have arduino uno selected as the board.
I attached a picture of how I have it wired.
This is my errors verbose output:
Code: [Select]
C:\Program Files\Arduino\arduino-1.0.3\hardware/tools/avr/bin/avrdude -CC:\Program Files\Arduino\arduino-1.0.3\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega328p -cusbtiny -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xde:m -Ulfuse:w:0xff:m

avrdude: Version 5.11, compiled on Sep  2 2011 at 19:38:36
        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\arduino-1.0.3\hardware/tools/avr/etc/avrdude.conf"

        Using Port                    : lpt1
        Using Programmer              : usbtiny
avrdude: usbdev_open(): Found USBtinyISP, bus:device: bus-0:\\.\libusb0-0001--0x1781-0x0c9f
        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
                                 Block Poll               Page                       Polled
          Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
          ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
          flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
                                 Block Poll               Page                       Polled
          Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
          ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
          lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                 Block Poll               Page                       Polled
          Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
          ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
          hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                 Block Poll               Page                       Polled
          Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
          ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
          efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                 Block Poll               Page                       Polled
          Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
          ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
          lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
                                 Block Poll               Page                       Polled
          Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
          ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
          calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
                                 Block Poll               Page                       Polled
          Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
          ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
          signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

        Programmer Type : USBtiny
        Description     : USBtiny simple USB programmer, http://www.ladyada.net/make/usbtinyisp/
avrdude: programmer operation not supported

avrdude: Using SCK period of 10 usec
CMD: [ac 53 00 00] [00 00 00 00]
CMD: [ac 53 00 00] [00 00 00 00]
avrdude: initialization failed, rc=-1
        Double check connections and try again, or use -F to override
        this check.


avrdude done.  Thank you.

CrossRoads

The programmer needs to control Reset also to put the chip into ICSP programming mode.  You do not seem to have it connected that way. Nor power & Gnd.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

skyfly200

Oh sorry I forgot to add those wires in the diagram, I have updated it now!

hiduino

Make sure your crystal capacitors are 22 pF each.  Some others have had the wrong value which could cause this error.



skyfly200

I have tried:
burning the bootloader with the Sparkfun tiny avr programer and arduino as isp
successfully tested the tiny avr programer on a attiny85(bootloading and uploading blink)
burn the bootloader in arduino
using avrdude in command line to bootload with the tiny avr programer following this:
https://www.sparkfun.com/tutorials/247
bootloading with and without 16MHz crystal and 22pF caps to ground on xtal 1 and 2

afremont

#6
May 03, 2013, 01:55 am Last Edit: May 03, 2013, 01:57 am by afremont Reason: 1
Usually those buttons like you have for the reset have the diagonal terminals connected.  Wired like it is might prevent a manual reset.  Do you have the grounds connected between the programmer and the breadboard?  You do know that you have the LED connected to DP9, right?
Experience, it's what you get when you were expecting something else.

LarryD

Just a note, sending a picture of the actual wired circuit shows us if you have overlooked something.
The way you have it in your schematic isn't the same as how you have it wired up!

westfw

Quote
Using Port                    : lpt1
         Using Programmer              : usbtiny

Are those even compatible?

hiduino

If you don't explicitly have the -Pusb it will show the lpt1, however it still uses the usb port for usbtiny programmers.  I see that also on my usbtiny programmer.


skyfly200

here are some images of my circuit

skyfly200

and two more.
my programer works in arduino with tiny 85s on port 1!

afremont

#12
May 03, 2013, 09:51 pm Last Edit: May 03, 2013, 09:56 pm by afremont Reason: 1
I'm still suspicious of how that reset button is hooked up.  Those buttons tend to have adjacent terminals permanently shorted and connect those sets when the button is pressed.  You could be holding the chip in constant reset, or at least you're going to be unable to reset it when you push the button.  What is that diode for on the reset pin of the chip on the breadboard?  Do you have a common ground?
Experience, it's what you get when you were expecting something else.

hiduino

I believe the diode is to prevent the voltage overshoot from the auto-reset circuit.  Without, it has caused chips to go into high voltage mode and wiping out the memory.  This has been added to all newer versions of Arduino boards.


westfw

Hmm.  If that board is an actual device programmer, you want it's RESET signal connected directly to the target's RESET pin, and not through the "auto-reset" capacitor.

Go Up