Hi everyone,
I have an issue with trying - for the first time - to burn the bootloader on my smd ATMEGA328-AU.
I have a PCB on which I have soldered my smd components :
ATMEGA328-AU,
a crystal, on PIN PB6 // PIN PB7 - respectively PIN 7 and 8.
2 polarised capacitor - 47 pF as the 22pF couldn't be soldered i ordered them too small - between crystals pins and ground,
1 resistor - 1kOhms -, between RESET(PC6) and VCC(5V),
1 capa 47microF between AVCC(PIN 18) and VCC.
8 pin headers, with 6 for ICSP.
The schematics of the components are attached. Ignore the FTDI jumper, switch with Battery connection, or decoupling capacitor, I didn't put them in after first board didn't work.
Now the coding part :
I have an arduino Uno, which I'm trying to use to burn the bootloader on the ATMEGA.
For that I have modified my avrdude.conf file, so it includes the following :
part parent "m328"
id = "m328au";
desc = "ATmega328AU";
signature = 0x1e 0x95 0x14;
ocdrev = 1;
;
Then File->example->ArduinISP->ArduinISP.
I uploaded the file on the arduino Uno - no problems-.
Then when trying to burn the bootloader, it seems to not work.
I followed other posts on the forum, and from my terminal, I do - after cd to Arduino.app/Contents/Java/hardware/tools/avr/bin ) :
sudo ./avrdude -C../etc/avrdude.conf -v -patmega328p -cstk500v1 -P/dev/cu.usbmodem142101 -b19200 -e -Ulo
The output i get is :
Arduino: 1.8.13 (Mac OS X), Board: "Arduino Uno"
/Users/pierretardif/Downloads/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Users/pierretardif/Downloads/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -cstk500v1 -P/dev/cu.usbmodem142101 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDE:m -Ulfuse:w:0xFF:m
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/Users/pierretardif/Downloads/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf"
User configuration file is "/Users/pierretardif/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/cu.usbmodem142101
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.02s
avrdude: Device signature = 0x000000 (retrying)
Reading | ################################################## | 100% 0.02s
avrdude: Device signature = 0x000000 (retrying)
Error while burning bootloader.
Reading | ################################################## | 100% 0.02s
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.
After a couple of minutes, the ATMEGA starts fuming, then after unplugging it, i have a shortcut between VCC and GND, :(.
This has happened several times, and I have tripple checked my connections to make sure the second time that it does not occur again, but still it keeps happening.
I don't understand why.
The ATMEGA328-AU i used is this one :
For the next steps, I think I will buy an arduino nano, so the models are the same between the one on the PCB and the one burning it.
I will update my design as to fit all components, but I need guidance as I don't get :
1 why the device signature is 0x000000.
2 why the chip burns after a few minutes.
for 1 :
Do i need to have the exact capacitor of 22pf on each end of the crystal?
If yes, do they need to be polarised?
for 2 :
Could it be that I'm using polarised capacitor that does that?
They are all wired with the - towards the GND.
I'd appreciate any pointers, as I'm pretty lost right now.
Best,
KS