Hey guys, I'm trying to burn bootloader to a new Atmega 328p PU. I followed this tutorial :
I'm using an Arduino Uno R3. In the tutorial it was mentioned to select "Arduino Duemilanove or Nano w/ ATmega328". Does that mean I should select Arduino Duemilanove or Nano w/ ATmega328 even though I'm using Arduino Uno?
I selected arduino uno from boards and burnt the bootloader. It was successfully burnt (I got a warning about some fuse) but when I replaced the original Atmega on the Uno with the one I burnt the bootloader to, and tried to upload a sketch, the sketch was not uploaded and I got programmer not responding error.
So I tried to bootload the new Atmega by selecting the board as arduino Nano. The bootloader was successfully burnt without any warning. Again I replaced the original Atmega on the Uno with the newly bootloaded chip and tried to upload a sketch (since I'm using Uno I changed the board to arduino uno before uploading the sketch). The upload failed and I got not in sync error. But then I changed the board to arduino Nano and tried uploading the sketch. The upload was successful without any warnings and the code ran without any problems. So can I know what I did wrong and why I should be selecting arduino Nano from boards menu even though I'm using Arduino Uno?
I bootload all my 328P chips as Uno, and then select Uno as the board type.
DIP or SMD, I do them all the same. They also all have external 16 MHz crystal or resonator.
Only benefit to selecting Nano is for the extra A6 & A7 inputs, and I believe you can modify the Uno section of boards.txt and get those enabled for an Uno also.
Select Uno when you burn the bootloader. Then the chip will have the Uno bootloader on it, and can be communicated with as an Uno.
The board you select when uploading to the microcontroller needs to match the board you had selected when you did 'burn bootloader'
A lot of us bootload anything with a '328p as an Uno (including our nanos/pro mini's etc - selecting Uno as board type when uploading) - the Uno bootloader is strictly better; it takes up less space and uploads faster.
LarryD:
Does bootloading a 'Pro Mini' to UNO still allow A6 and A7 access?
.
Looking at the source, I can't see that the Uno or Nano are treated any differently.
I think you can use A6 and A7 if you have uno selected (though on an actual Uno, you can't connect to them...). I have definitely seen versions of wiring_analog where they tested for trying to use a channel that doesn't exist - but I don't see that test in current official core.
Is the following warning common when uploading bootloader as uno?
avrdude: WARNING: invalid value for unused bits in fuse "efuse", should be set to 1 according to datasheet
This behaviour is deprecated and will result in an error in future version
You probably want to use 0xfd instead of 0x05 (double check with your datasheet first).