Issues burning Bootloader on atmega328P-AU custom PCB

Hi,
I have made some custom pcbs with atmega328P chip and using a Nano at ISP but I am struggling to get the bootloader on.

I have installed MiniCore into my IDE and tried burning a bootloader onto the blank chips and i get the error

avrdude main() error: expected signature for ATmega328P is 1E 95 0F

The verbose output is below along with my circuit. After some searching, it seems if the device signiture is listed as device signature = 0xffffff, that suggests its not detecting the chip and maybe I have connection problems but I think my circuit is correct.

Can anyone spot something I have not?
Kind regards

avrdude: Version 7.2-arduino.1
         Copyright the AVRDUDE authors;
         see https://github.com/avrdudes/avrdude/blob/main/AUTHORS

         System wide configuration file is /home/brian/.arduino15/packages/MiniCore/hardware/avr/3.0.1/avrdude.conf
         User configuration file is /home/brian/.avrduderc
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyUSB0
         Using Programmer              : stk500v1
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : possible i/o
         RETRY pulse                   : SCK
         Serial program mode           : yes
         Parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                           Block Poll               Page                       Polled
           Memory Type Alias    Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- -------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom                 65    20     4    0 no       1024    4      0  3600  3600 0x00 0x00
           flash                  65    10   128    0 yes     32768  128    256  4500  4500 0x00 0x00
           lfuse                   0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
           hfuse                   0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
           efuse                   0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
           lock                    0     0     0    0 no          1    1      0  4500  4500 0x00 0x00
           signature               0     0     0    0 no          3    1      0     0     0 0x00 0x00
           calibration             0     0     0    0 no          1    1      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
avrdude: device signature = 0xffffff (probably .xmega) (retrying)
avrdude: device signature = 0xffffff (probably .xmega) (retrying)
avrdude: device signature = 0xffffff (probably .xmega)
avrdude main() error: Yikes!  Invalid device signature.
avrdude main() error: expected signature for ATmega328P is 1E 95 0F
        Double check connections and try again, or use -F to override
        this check.


avrdude done.  Thank you.

Failed chip erase: uploading error: exit status 1

Seems you are not using PB5 as SCK pin but PB0.

2 Likes

Good spot!
bit of a blunder there by me.

Soldered some wire straight to PB5 and successfully transfered the bootloader,
Attempted a sketch upload and failed,
Realised I had a bad xtal GND pins
Wired in a good earth and now I can neither install the bootloader again or contact the board with an attemp to write a sktech via ISP.

Would it be fair to assume I have bricked the chip?

cheers
Brian

What crystal is that? I see 4 pins, so check if you don't have an active crystal (example) by accident. You need a passive crystal.

Thanks for the reply.
The crystal I am using is this one here, an YXC X322516MLB4SI. I had chosen it after some googling suggested it was suitable.

Could it be, I have chosen incorrect capactiors to pair with this crystal?

Kind regards
Brian

That's a passive crystal and should work with the 20pf caps you selected.
So either your crystal or caps or pcb is wrong. If you just used minicore to burn bootloader I don't think there is something wrong with setting the fuses in your AT328
Fresh from the factory it was running at 1MHz from it's internal resonator, but now after burning the bootloader it expects an external crystal. If that is not working it won't start.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.