ATmega328PB Bootloader Signature Error

Hi all,

I have an ATmega328PB and I am wiring it up as shown here but it gives me the error:

avrdude: Expected signature for ATmega328P is 1E 95 0F Double check chip, or use -F to override this check. Error while burning bootloader.

which is expected, because the signature for the ATmega328PB is a "0x16" instead of "0x0F" at the end. With verbose output checked, avrdude does indeed read a 16 at the end, so nothing mysterious there. I read online that I could just go to C:\Program Files (x86)\Arduino\hardware\tools\avr\etc and edit the avrdude.conf file and replace the "0F" with the "16". I tried that, but somehow Arduino is giving me the exact same error.

I am using the Arduino as ISP sketch on my Arduino Uno and setting the board as "Arduino Duemilanove" with ATmega328 before clicking "Burn Bootloader".

Any ideas?

Thanks!

Try one of these: https://github.com/ElektorLabs/Arduino https://github.com/watterott/ATmega328PB-Testing Seems much better to treat the ATmega328PB as an ATmega328PB instead of trying to somehow get it to work as an ATmega328P, if that's even possible.

The reason editing that avrdude.conf didn't work may be that there is another version of AVRDUDE installed that is being used instead of the one you edited. If you do File > Preferences > Show verbose output during: > upload (check) > OK then examine the output in the black console window at the bottom of the Arduino IDE window it will tell you the path to the avrdude.conf that is being used.

Seems much better to treat the ATmega328PB as an ATmega328PB instead of trying to somehow get it to work as an ATmega328P,

That would depend on whether your compiler toolchain is new enough to support the 328PB... (and the 328PB is a pretty proper superset of the 328P, so it should be possible. (and perhaps desirable because of pricing!))

Both the links in my previous reply provide their own toolchains so I'd assume that isn't a problem but I haven't used ATmega328PB so I can't say for sure.

Thanks for the reply! Yes, you were right, it was hiding under "C:\Users{Name}\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.0.1-arduino5/etc/avrdude.conf". I read that you can program the ATmega328PB with exactly the same binary as the 328P and it will work the same, so fooling avrdude is OK, although not the most ideal.

I had actually already tried the ATmega328PB-Testing as well as Optiloader which supports ATmega328PB. However, I couldn't get either one to work and they don't have very good readMe's on their github pages as far as step-by-step instructions are concerned.

For the link I gave above, I simply downloaded the zip folder, included the zip folder as a library, opened the sketch optiLoader.ino, and uploaded it to my Arduino. It uploaded fine, but when I hit Burn Bootloader with the ATmega328-PB attached, I think it timed out and gave me an error somewhere along the lines of "error 1/10... thru 10/10 not responding".

For the ATmega328PB-Testing one, I followed the instructions and added the hardware files provided ("atmega328pb" and "tools" folders), replacing the existing "tools" folder. I then added the .json link in preferences and downloaded the ATmega328PB boards in Boards Manager. However, it gave me an avrdude syntax error I believe.

Update: I changed the avrdude.conf file to trick avrdude, and it flashed the bootloader successfully with my Arduino Uno running the ArduinoISP sketch. However, when I try to upload the blink sketch (with Arduino Duemilanove under "Boards" and "ATmega328" for Processor, or really any board for that matter), I get the following error:

avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xf5 avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x1c avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x1c avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x1c avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x1c avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x1c avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x1c avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x1c Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions. avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x1c avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x1c

I also get this error when I use an FTDI programmer to upload code (it stalls for several minutes, then gives the same error message). I am using RX/TX of the FTDI as well as DTR to the RESET pin on the ATmega328PB via a 0.1uF capacitor.

Also, I installed the ElektorLabs board from Boards Manager and tried uploading the blink sketch to Elektor Uno R4 (which has ATmega328PB), and it also gave me a sync error.

Any ideas? This is really killing me lol.

Another update: I upgraded to Arduino 1.8.2 and using the ATmega328-Testing repo I was able to burn the ATmega328PB bootloader onto my chip and the code compiles fine for the 328PB, but when I try to upload blink.ino it gives me this error:

avrdude.exe: stk500_getsync() attempt 1 of 10: not in sync: resp=0x1c avrdude.exe: stk500_getsync() attempt 2 of 10: not in sync: resp=0x1c avrdude.exe: stk500_getsync() attempt 3 of 10: not in sync: resp=0x1c avrdude.exe: stk500_getsync() attempt 4 of 10: not in sync: resp=0x1c avrdude.exe: stk500_getsync() attempt 5 of 10: not in sync: resp=0x1c avrdude.exe: stk500_getsync() attempt 6 of 10: not in sync: resp=0x1c avrdude.exe: stk500_getsync() attempt 7 of 10: not in sync: resp=0x1c avrdude.exe: stk500_getsync() attempt 8 of 10: not in sync: resp=0x1c avrdude.exe: stk500_getsync() attempt 9 of 10: not in sync: resp=0x1c avrdude.exe: stk500_getsync() attempt 10 of 10: not in sync: resp=0x1c

I have the Arduino with the ArduinoISP sketch loaded in it, and I am connecting pins 10-13 and 3.3V/GND to the ICSP pins of the 328PB chip. I also tried uploading the code via the FTDI but it's not working either.

I'm in the same situation right now, were you able in the end to upload the sketch?

It's been a while now, but I think I was just missing a 0.1uF capacitor on the DTR line.