Help. Atmega328P-AU Bootloader

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I've spent many hours trying to debug bootloading. I tried the Arduino Uno and Pro Mini as the ISP. Most of the time the error prompts to check connection or simply check chip type. I checked my connections even with a DMM continuity and all wires and pins work accordingly. Please see the schematic that I used from youtube:  https://www.youtube.com/watch?v=... as a snap shot is attached. 

 

I also attached my wiring and what it looks like with the DIP Socket to load the Atmega328P-AU chip. 

 

After trying many things according to my research:

 

  • Add capacitor from reset to ground
  • Check the label of the chip (I have 3 manufacturers with the "MEGA328P AU" followed by 4 digits. 
  • I made sure the chip pins were pressed tightly to the DIP Socket for good contact
  • I tried increasing the resistor from 10k down to 160 ohms for the reset pin
  • The first attempt was using longer wires, so I cut them down and attempted a pro mini as the ISP instead
  • I tried to upload from Arduino Uno bootload as Arduino Uno and Pro Mini
  • I tried upload from Pro Mini bootload as Pro Mini and from Pro Mini bootload as Arduino Uno
  • Because my chip is not a P-PU, no need to change any settings
  • Typical digital signature would have zeros, f's, and a mixture of zeros and f's and yes, they change each time. 

 

Anyone have any suggestions that will finally bootload the Atmega328P-Au's?

 

From the most recent upload, I get the following error:

 

Arduino: 1.6.5 (Windows 7), Board: "Arduino/Genuino Uno"

C:\Program Files (x86)\Arduino\hardware\tools\avr/bin/avrdude -CC:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf -v -patmega328p -cstk500v1 -PCOM6 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m 

 

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 (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf"

 

         Using Port                    : COM6

         Using Programmer              : stk500v1

         Overriding Baud Rate          : 19200

         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 : STK500

         Description     : Atmel STK500 Version 1.x firmware

         Hardware Version: 2

         Firmware Version: 1.18

         Topcard         : Unknown

         Vtarget         : 0.0 V

         Varef           : 0.0 V

         Oscillator      : Off

         SCK period      : 0.1 us

 

avrdude: AVR device initialized and ready to accept instructions

 

Reading | ################################################## | 100% 0.07s

 

avrdude: Device signature = 0x000000 (retrying)

 

Reading | ################################################## | 100% 0.06s

 

avrdude: Device signature = 0x000000 (retrying)

 

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

 

avrdude: Device signature = 0x000000

avrdude: Yikes!  Invalid device signature.

         Double check connections and try again, or use -F to override

         this check.

 

 

avrdude done.  Thank you.

 

Error while burning bootloader.

 

Thanks

 

Joshua

  •  

Attachment(s): 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

20uF for the crystal load caps is a million times too big. You want 20 pF (pico farads). As well, a 47uF electro is useless for power supply bypassing - you want a 100nF ceramic. The resistor on reset should be 4K7 or greater.

Last Edited: Sat. Dec 2, 2017 - 10:51 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are you sure that your DIP/QFP adapter maps the pins the way that you think it does?

This site: http://www.logicalsys.com/qfp-pr... has at least THREE different mappings (1:1 by "signal", 1:1 by pin-number, and ATmega328-specific) - only the "1:1 by pin-number" adapter connects the way that I would expect!

 

Also, you're missing bypass caps on the target chip, and 120ohms for the pullup is MUCH too low - go back to 10k

 

 

 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks all for the help!

 

It dawned upon me that the capacitors were the wrong size as it was 0.22uF instead of 22pF. It worked afterwards.

 

Thanks!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Welcome to the Forum.

 

What do you fly?

 

Now, back on topic:

 

You might well already know this, but I'll mention it anyway.

 

The M328 has MULTIPLE power supply pins.

 

There are TWO sets of Vcc & Ground pins, and also an AVcc & Ground pin, (for the Analog section of the micro).

ALL of these must be connected to Vcc and Ground for the chip to work reliably.

 

Additionally, across each of the three pairs of pins you need a by-pass cap, typically a 0.1 uF cap, mounted as close to the chip as possible, (which isn't very close, when one uses one of those adapters...).

 

Good luck with your projects!

 

JC

 

Edit: Typo

Last Edited: Sun. Dec 3, 2017 - 12:24 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

the capacitors were the wrong size as it was 0.22uF instead of 22pF

 You know .... when I was boy, that would have been obvious by looking at them!

22pF disc capacitor0.22uF film capacitor