0

Which Bootloader to use with Arduino Uno
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Which Bootloader to use with Arduino Uno

by tryoung on Tue Dec 06, 2016 11:52 am

I have a blank Mega328P board I made. It is Identical to the Arduino Uno except for the USB port. I was able to program a bootloader to it using the USBTinyISP, but I am unable to program a sketch to it using the FTDI Friend. I'm not sure if I have the correct bootloader loaded for this device.

I had to use avrdude from the command line using the -F option to program the bootloader, as the Arduino IDE kept giving me a device signature error when trying to program the bootloader using the USBTinyISP.

Also what programmer should I select when programing a sketch using the FTDI Friend? I don't see an option for it in the Arduino IDE. The Arduino IDE gets no response from the FTDI Friend.

tryoung
 
Posts: 14
Joined: Tue Nov 01, 2016 2:46 pm

Re: Which Bootloader to use with Arduino Uno

by hiduino on Tue Dec 06, 2016 4:35 pm

You will need to also burn the fuse bits on the m328P so that it is configured correctly for the correct boot parameters and clocking.
The easiest way to burn both the fuse bits and bootloader is to do it from the IDE. If your board is identical to the Uno then you should select from the IDE Uno board type. Then select your USBtinyISP programmer type. Then from the IDE Tools menu select Burn Bootloader. This should program the fuse bits and the correct bootloader for the Uno board type.

hiduino
 
Posts: 860
Joined: Sat Sep 01, 2012 7:05 pm

Re: Which Bootloader to use with Arduino Uno

by tryoung on Tue Dec 06, 2016 4:41 pm

I have tried that, but I get a device signature error when I try to burn the bootloader from the Arduino IDE.

This is the error I get:

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

How can I use the -F parameter from the IDE. I don't see any way of modifying the avrdude command from the IDE.

tryoung
 
Posts: 14
Joined: Tue Nov 01, 2016 2:46 pm

Re: Which Bootloader to use with Arduino Uno

by hiduino on Tue Dec 06, 2016 10:14 pm

Ignore the -F parameter that is not going to help. Most often these issues are connection or clocking issues to the m328P.
Do you have anything else connected to the pins?

I have a USBtinyISP programmer that I was able to program the bootloader and fuses correctly using the IDE. So this should work.

hiduino
 
Posts: 860
Joined: Sat Sep 01, 2012 7:05 pm

Re: Which Bootloader to use with Arduino Uno

by tryoung on Tue Dec 06, 2016 11:14 pm

I think I may have the wrong ATmega328 on my board. The one I have is a ATmega328PB which is different than the ATmega328P that is on the Arduino Uno. That may be why I'm getting a different device signature and the USBTinyISP won't program the bootloader thru the Arduino IDE. Does that make sense?

tryoung
 
Posts: 14
Joined: Tue Nov 01, 2016 2:46 pm

Re: Which Bootloader to use with Arduino Uno

by hiduino on Wed Dec 07, 2016 2:13 am

Yes, unfortunately the m328PB is different enough to not be supported with the current AVR tools included with the IDE. There are some people trying to make it work with limited success.

Check this Atmel note: http://www.atmel.com/Images/Atmel-42559-Differences-between-ATmega328P-and-ATmega328PB_ApplicationNote_AT15007.pdf.

If you are feeling adventurous you can check out this, http://forum.arduino.cc/index.php?topic=380575.msg2685570#msg2685570.

hiduino
 
Posts: 860
Joined: Sat Sep 01, 2012 7:05 pm

Please be positive and constructive with your questions and comments.