Go Down

Topic: "virgin Atmega328PU" to "chip in ArduinoUNO REV3" with only Arduino? (Read 780 times) previous topic - next topic

Unfortunatelly I have some trouble understanding the following help:
http://arduino.cc/en/Tutorial/ArduinoToBreadboard
I come here to you so much more experienced folks and hope you can help me!

I would like to turn a "virgin nothing on ATMega328PU" µC into one that is loaded so to replace the one in the Arduino Uno Rev3. But I am stuck with the tutorial.

My main doubts/troubles in understanding are:
A) Do I need to get 2 Arduino boards to be able to do that? (I think not)
B) Do I need an external clock crystal? (B1)if so...Why? ) (B2)any disadvantage (i.e. different result) if I dont have that?)
C) The site linked says:
Quote
Note that these techniques only work with the Arduino Duemilanove w/ an ATmega328, not the Arduino Uno (or older Arduino boards w/ an ATmega168).

But (confusion?) continues with explaining about the Uno board? => is the uno(rev3) or is it not possible to be done with it?

I am hopeful you can give me some insights and quick help.. As for the experienced people it is often "so laughably easy", but for me as a newbie.... really tough. => hence your help is appreciated very much. Thank you

BACKGROUND
Just a quick intro. My setting:
1) I load a sketch to the Arduino UNO REV3 and hence its original Atmega328PU quite frequently (say ~100 a day, because I often work "learning by doing" and "trial and error". Please do not judge me. Its just plain 1 avrdude quite often.
2) I think (1) will be over time kill my Atmega (~10'000 write cycles only)
3) It is time to get myself a backup Atmega328PU.
4) I have only this:

  • The Arduino UNO REV3

  • PC-USB-connection to the arduino

  • a breadboard

  • a 12V power suply I can plugin at the Arduino.


5) I do not have:

  • a second Arduino

  • a ISP-specially made device

  • a external clock crystal

  • very experienced background in electronics





Msquare

You can buy a spare chip with the "standard" Arduino boot loader on it.


You can buy a spare chip with the "standard" Arduino boot loader on it.


;) I bet I could.  Are you selling those?
Well I still hope there is also a way to respond to the doubts and question I have still. This way I would learn quite some more. But I will keep your suggestion in mind, thanks

AlxDroidDev


A) Do I need to get 2 Arduino boards to be able to do that? (I think not)


No, just one, to which the ArduinoISP sketch will be flashed.

The blank/virgin (or even non-blank) Atmega328P will be in the breadboard.

Quote
B) Do I need an external clock crystal? (B1)if so...Why? ) (B2)any disadvantage (i.e. different result) if I dont have that?)


I believe you need them. The way I understand, before flashing the bootloader, you need to set the fuses (the IDE does this for you), and the fuses specifically ask for an external crystal or oscillator. Even if you pass this first step, from that moment on, you'll need the crystal to flash the bootloader because the uC has been programmed to need it.

Besides the crystal, you'll also need 2 x 22pF ceramic capacitors. All the three together should not cost more than 50 cents. Even in Brazil - where I live - this is very, very cheap.

Quote

C) The site linked says:
Quote
Note that these techniques only work with the Arduino Duemilanove w/ an ATmega328, not the Arduino Uno (or older Arduino boards w/ an ATmega168).

But (confusion?) continues with explaining about the Uno board? => is the uno(rev3) or is it not possible to be done with it?


Forget about that. Just flash the Arduino UNO bootloader to your Atmega328P.

Let me tell a story:
I got 5 blank Atmega328 (non-P, actually), and I followed the tutorial and flashed the Duemilanove bootloader to them. Last night I was working on a project-specific board I made, using it as an Arduino, but I had the UNO selected in the IDE. However there was no way I could upload any sketch to it with an FTDI basic attached to the serial port in my custom board. I checked my project entirely, both in DipTrace and in the physical board. Everything seemed ok.

then I remembered to change the board in the IDE to the Duemilanove, and voilá! My custom board started receiving uploads. I took my cheap chinese USBasp-close, flashed the UNO bootloader to my custom board (it also has an ICSP header) and it started working as an UNO in the IDE.

The greatest advantage of flashing your blank 328 as an UNO is that you don't need to remember what board you are using at the moment.

I strongly advise you to get a xtal and a couple of 22pF ceramic caps.

About buying bootloaded Atmega328P: I am about to buy a few from www.baligena.com (found them on Amazon)
Learn to live: Live to learn.
Showing off my work: http://arduino.cc/forum/index.php/topic,126197.0.html

Msquare


Are you selling those?
Nope. But that is what I bought, at my local RS webstore. Already replaced one. Careless with a 24V wire that briefly touched the chip...

CrossRoads

So go out and get some parts.
www.dipmicro.com
Board to work on
http://www.dipmicro.com/store/ZY-60 or
http://www.dipmicro.com/store/ZY-101 (more room to experiment with later)
crystal
http://www.dipmicro.com/store/XC7-16000
two 22 pF caps
http://www.dipmicro.com/store/C1K22-50
two 100nF caps
http://www.dipmicro.com/store/C5K10-50
10K resistor
http://www.dipmicro.com/store/R4F10-4
some connecting wires
http://www.dipmicro.com/store/BBJ-12 or
http://www.dipmicro.com/store/ZY-800-65 (much better deal)

So for like $8 you can have a nice little collection to work with for programming parts or experimenting with.
Add a couple 330 ohm resistors, some LEDs, some push buttons, be on the way!
Buy a couple of sets and some header pins and start your own standalone project.

additional blank part
http://www.dipmicro.com/store/ATMEGA328P-PU

Or, buy a bootloaded part
http://www.dipmicro.com/store/CPU-ARD328P
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.

mmoscz


kup Atmega328PU.
4) I have only this:

  • The Arduino UNO REV3

  • PC-USB-connection to the arduino

  • a breadboard

  • a 12V power suply I can plugin at the Arduino.


5) I do not have:

  • a second Arduino

  • a ISP-specially made device

  • a external clock crystal

  • very experienced background in electronics






If now you have one ARDUINO UNO, you can burn a VAtmeag328 (virgin ATMEGA328) with UNO bootloader without cristal, using the sketch on this link http://www.gammon.com.au/forum/?id=11637
Upload the sketch to your UNO, follow the conections on http://arduino.cc/en/Tutorial/ArduinoToBreadboard.
After connect pins 13, 12, 11, and 10 to reset, connect pin 9 of UNO to pin 9 of ATMEGA (XTAL1 pin).
Open the SERIAL CONSOLE e follow the instructions.

4x Duemilanove (clone)
Uno torrado (clone)
Amiga 1200 40MB
Windows XP

Go Up