Go Down

Topic: Atmega 328 bootloader or not? (Read 1 time) previous topic - next topic

sisterlimonpot

I have what seems like an easy question to answer however, I am tired of looking for the answer, so I will just ask it.

I have an Arduino Uno and want to take the already programmed chip that's on the Uno and place it on another PCB. Never take it off.

The question is:

What chip do I purchase to replace the one that went on the Uno? Do I have to get the AtMega328 with a bootloader or can I purchase the one without it?


CrossRoads

ATMega328P-PU.
With or without, your call.
If without, there are myriad ways to reprogram it.
Such as: use the existing chip to program the new chip, put the new chip in your application.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

sisterlimonpot

Can you expand on that? I'm still a bit confused.

If I were to get one without the bootloader can I place it on the Uno (without using the other chip) and upload a program to it? Once it's uploaded, can I then remove the chip and solder it to a PCB that is set to recieve the Atmega328 with the 16Mhz crystal and capacitors and have it work?

CrossRoads

Get a solderless breadboard, put the new chip on it.
Add the 16 MHz, xtal, 22 pf caps, 10K pullup resistor.

Load the optiloader sketch into the Uno:
https://github.com/WestfW/

Now connect Uno pins to breadboard uC pins:
+5 to +5, Gnd to Gnd, D13 to D13, D12 to D12, D11 to D11, D10 on Uno to Reset on breadboard uC.

Power up the Uno, the sketch will run and put a bootloader on the blank chip, see the video in the link here:
http://arduino.cc/forum/index.php/topic,68183.0.html

Put the newly bootloaded part in your Uno and download your sketch into it. Or leave it there for your next project.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

westfw

In order for a new chip to function on an Arduino board as an Arduino, it WILL need to have a bootloader.

It is a relatively simple task to put the bootloader onto a completely blank chip, especially if you already have an existing Arduino.  You set up a relatively simple circuit with the new chip on a breadboard, and use your existing Arduino as a "device programmer" to burn the bootloader.

CrossRoads

Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

westfw

@Crossroads: yep.  I was clarifying/rewording, rather than correcting.  I guess it would have worked better if I had SAID that!

Go Up