Go Down

Topic: Trouble burning the bootloader onto ATmega328P from Arduino Uno. (Read 324 times) previous topic - next topic

eavery6156

I sampled some microcontrollers from Atmel not too long ago and I picked up some of what I thought were the Arduino Uno uCs.

Turns out, instead of grabbing the ATmega328P-PU, I got the P-PN. I did some digging around and the general consensus is that the P-PU one refers to pico-power. I also read that operating temps were a little different but other than that, it shouldn't be any different.

So, here is my problem: I have been trying to burn the bootloader onto them but, alas, to no avail.

I am using my Arduino Uno R3 wired up through pins 10, 11, 12, & 13 to a standalone ATmega328P-PN using its own internal oscillator on a breadboard.

I have added this to my /boards.txt file:

##############################################################
atmega328bb.name=ATmega328 on a breadboard (8 MHz internal clock)
atmega328bb.upload.protocol=stk500
atmega328bb.upload.maximum_size=30720
atmega328bb.upload.speed=57600
atmega328bb.bootloader.low_fuses=0xE2
atmega328bb.bootloader.high_fuses=0xDA
atmega328bb.bootloader.extended_fuses=0x05
atmega328bb.bootloader.path=arduino:atmega
atmega328bb.bootloader.file=ATmegaBOOT_168_atmega328_pro_8MHz.hex (strikeout is the incorrect part)
atmega328bb.bootloader.unlock_bits=0x3F
atmega328bb.bootloader.lock_bits=0x0F
atmega328bb.build.mcu=atmega328p
atmega328bb.build.f_cpu=8000000L
atmega328bb.build.core=arduino:arduino
atmega328bb.build.variant=arduino:standard


I know that there are some incorrect settings in there and I can see them but I don't know what the valid corrections would be. I didn't try too much with this method; at least not until I know the information is correct.

I tried my hand at optiLoader which uses a sketch to burn the bootloader onto the blank microcontroller. I uploaded the sketch to my Uno and then hit the reboot to initiate the burn. I didn't get any error message but every time I try to upload a sketch (Blink, even), I get this error code:

avrdude: stk500_getsync(): not in sync: resp=0x00


When I tried to do the conventional "Arduino as ISP" and then "Burn Bootloader" under the Tools menu but I got these two different error codes (one code at one attempt and the second during another attempt):

avrdude: stk500_getsync(): not in sync: resp=0x30


...and...

avrdude: stk500_getsync(): not in sync: resp=0x98




I am using Windows 7 Professional and I am using the Arduino IDE version 1.0.5-r2. Please someone tell me what I am doing wrong or could someone point me in the right direction.

Is it simply that it won't work with the ATmega328P-PN?


Thank you for reading through this and thanks for helping out.

mart256

#1
Sep 04, 2014, 12:05 am Last Edit: Sep 04, 2014, 12:12 am by mart256 Reason: 1
Shouldn't matter if it's P-PN or P-PU. The protocol has been upgraded to arduino (not stk anymore for UNO).
Try this (8mhz internal clock).

Code: [Select]

unobb.name=Arduino Uno
unobb.upload.protocol=arduino
unobb.upload.maximum_size=32256
unobb.upload.speed=115200
unobb.bootloader.low_fuses=0xE2
unobb.bootloader.high_fuses=0xDE
unobb.bootloader.extended_fuses=0xFF
unobb.bootloader.path=optiboot
unobb.bootloader.file=optiboot_atmega328.hex
unobb.bootloader.unlock_bits=0x3F
unobb.bootloader.lock_bits=0x0F
unobb.build.mcu=atmega328p
unobb.build.f_cpu=8000000L
unobb.build.core=arduino
unobb.build.variant=standard



Peter_n

Please don't cross-post http://forum.arduino.cc/index.php?topic=264861.0
Octal is 7 bits. Octet is 8 bits. An Octopus has four pairs of arms. October is the tenth month. An Octillion can be 10^27 or 10^48. An Octave is the interval between notes of half or twice the frequency. And last but not least: Octyl on its own is not really something.

raschemmel

I use these . I buy em by the dozen along with all the crystals and 18 pF caps.
They come with bootloader intalled.

I got started with this, and I have used them for about six different projects.

http://arduino.cc/en/Main/Standalone  
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,
DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

Coding Badly


raschemmel

Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,
DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

raschemmel

I can't see anything in your post about what equipment you are trying to use to burn your bootloader .

What do you have ? (an UNO as ISP , or a programmer)
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,
DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

eavery6156

@raschemmel 4th paragraph, first sentence:

"I am using my Arduino Uno R3 wired up through pins 10, 11, 12, & 13 to a standalone ATmega328P-PN using its own internal oscillator on a breadboard."

I was careful to include as much info as I could so that others that had some insight on my issue could help.

I'm curious: what would a part number have to do with it? Do you mean model number, instead?

Btw, sorry about the x-post; I didn't know where it would belong best.

Coding Badly

I was careful to include as much info as I could...


Power?  Ground?  Capacitors?  Pull-up on RESET#?


# I have never needed it when programming a breadboarded target but the cost to include it is essentially zero so there is no excuse not to include when faced with trouble.

kieran_shrestha

You can change the protocol for protocol to arduino  and it seems you are using internal clock. Here's the link  http://shortedwire.blogspot.com/2014/09/cheap-standalone-arduino-14.html for help.

Go Up