Pages: [1]   Go Down
Author Topic: Atmega 328 bootloader or not?  (Read 1027 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27081
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27081
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 133
Posts: 6752
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 538
Posts: 27081
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Isn't that what I described?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

SF Bay Area (USA)
Offline Offline
Tesla Member
***
Karma: 133
Posts: 6752
Strongly opinionated, but not official!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1]   Go Up
Jump to: