Go Down

Topic: Newbie question on Standalone ATMega (Read 2 times) previous topic - next topic

Hello All,
  I have been interested in electronics for years but never quite become proficient.
My interest has been rekindled by the discovery of the Arduino system.
I have ordered the Uno R3 and while I am still waiting for it I have a simple question:

Once I am done with the first sketch (say, something fancy like blinking an LED) can I unplug the ATmega from the Arduino board and put it on a standalone breadboard (with the addition of the needed  LED, resistor(s) power supply ecc.) and have the LED blink away happily, while I plug a NEW ATmega on the Arduino board and work on my next great project (say, blink TWO LEDs)?


Thanks

Luca

 
There are three kind of people in the world: Those who can count, and those who can't

CrossRoads

Yes.
Need 16 MHz xtal, two 22pf caps, 10K reset pullup resistor, 3 0.1uF (100nF) caps, and 3 AA batteries for power.
All can be obtained from www.dipmicro.com pretty inexpensively with low shipping costs.

Maybe this kit with a couple of extra bits will do you nice.
http://www.dipmicro.com/store/SET-START2
On sale too.
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.

Thanks man,
   That was fast!  :)

Is the second part of my question also true?
I.e. can I just buy a bunch of ATmegas and plug them (one at a time of course) into the Arduino board for my next projects?

TIA

Luca
There are three kind of people in the world: Those who can count, and those who can't

SirNickity

Yep.  That's sort of the idea.  To be "an Arduino" (as opposed to "an AVR"), you need the Arduino bootloader programmed onto the blank chips.  This is possible via the "Arduino as ISP" sketch, which deflowers the virgin chips.  All it takes is one pre-made board to clone an army of DIYs.

CrossRoads

Here's pretty much the bare minimum you need:
ATMega328P-PU or -PN
16 MHz Xtal
two 22pF caps
three 0.1uF caps (100nF)
10K resistor
connectorize as your needs demand.
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.

BillO

You can even eliminate the crystal and 22pC caps too.  There is a bootloader that works without them, but the chips runs at half speed.  If you do not need the full 16mHz, you can save a bit of money and construction time.
Facts just don't care if you ignore them.

#6
Apr 26, 2012, 01:35 pm Last Edit: Apr 26, 2012, 02:34 pm by Thot Reason: 1
Thanks all for all the info!

I also ordered the kit from dipmicro as suggested.

After "talking" to you I found this tutorial, that details what you have been explaining:
http://arduino.cc/en/Tutorial/ArduinoToBreadboard

What bothers me is that it says: "Note that these techniques only work with the Arduino Duemilanove w/ an ATmega328, not the Arduino Uno (or older Arduino boards w/ an ATmega168)."

Now, the one I just ordered is precisely an Arduino Uno R3, but it has an ATmega328P.
http://www.amazon.com/gp/product/B006H06TVG/ref=oh_details_o02_s00_i01

I am puzzled, will it work?

Thanks


Luca
There are three kind of people in the world: Those who can count, and those who can't


The Note comes just before the paragraph: "Burning the Bootloader" but after that you find the paragraph "Uploading Using an Arduino Board".
http://arduino.cc/en/Tutorial/ArduinoToBreadboard
In the latter, they instruct you to remove the Microprocessor from the Arduino board and in both cases 'To program the microcontroller, select "Arduino Duemilanove or Nano w/ ATmega328" '.

So, the exclusion of the Uno appears to refer to both situations.

Thanks for your help.

Luca

There are three kind of people in the world: Those who can count, and those who can't

xl97

I knwo I have read many peopel post dis-regard that as the UNO is usable..

I just cant recall if it was for BOTH applications.. or just one

I recall some saying use v22/v23 for something (burning bootloader?).. as v1.0 has a delay or something that gets in the way?

and for uploading a sketch.. you CAN use an UNO.. (I may have these backwards though).. I dont have an UNO.. =(




CrossRoads

I've posted this a gazillion times I think:

Download the Optiloader sketch into your Uno:
https://github.com/WestfW/OptiLoader

Put your new part on a solderless breadboard, with 16 MHz xtal, 22 pf caps, 10K reset pullup resistor.

Connect Uno's +5 to VCC/AVCC pns, Gnd to Gnd, D13 to D13, D12 to D12, D11 to D11, Uno's D10 to blank chip's reset.
Or make these connections to your standalone board if there is no conflict on the pins.

Run the sketch, see the video in this thread:
http://arduino.cc/forum/index.php/topic,68183.0.html

Put newly bootloaded part in your Uno and download a sketch, or download on your new hardware if it supports that, maybe using an FTDI Basic or CP2102 USB/Serial adapter if not.
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.

VccDood

You should take a look at http://www.sparkfun.com/products/10422 for how to build a breadboard arduino.  Look at the links halfway down the page for directions for assembly.  There is also a printable overlay to put on your breadboard to make assembly very easy.  You don't have to order the kit, use your own components if you have them.

I use this to make a "sacrificial" arduino for testing where the unit may be damaged or lost.  Worst case, I'm out $12, but I have a fully functional and programmable arduino.

In addition to what CrossRoads mentioned, you'll need an FTDI breakout or cable for programming.  I tried the remove/program/reinstall route.  It isn't convenient and you end up breaking chip leads.  Buy the FTDI programmer and make the breadboard programmable.  The FTDI is $15 or $10 if you buy the female adapter separate and solder it on (http://www.sparkfun.com/products/9873 and http://www.sparkfun.com/products/10009).  You'll also need a few inches of 26 gauge hookup wire or use your breadboard jumpers if they aren't too long.

mrburnette

This is not really all that difficult, I would suggest using a protoboard with a ZIF socket... small price to keep pins straight.

If you wish to work with the ATtiny, just for fun, you can even bypass the crystal and use the internal oscillator... really cheap projects.

Here is the main article:
http://hlt.media.mit.edu/?p=1229

You can solder-up a ZIF protoboard:
http://www.adafruit.com/products/462 (before hyperventilating over the price, it does include a 328P in the price & the board is good quality.)

Here is mine:
http://arduino.cc/forum/index.php/topic,103693.0.html

So far, I have programmed 328, 8, and ATtiny85 without issues... just works.

- Ray

SloppyJoe

Trying to build a scoreboard, with some 7-segment displays that will be on separate circuits, and this is what I plan on using for a circuit



I'll have a 16 MHz crystal between pins 9 and 10, then caps connecting to ground.

Pins 7 (VCC) and 20 (VCCA) are connected to 5 volts, then 2 caps then to ground

Pin 21 (AREF) is connected to a cap, then to ground.

Does this sound about right?

**** All the resistors connected to the ULNs and the two at the bottom are to give me places to hook up the oversized 7-segment displays on the PCB. Some of the extra resistors hooked up to the analog pins are going to be switches as well. Again, just to give me some holes to solder wires into for the PCB.

CrossRoads

Looks pretty good.
Do not connect CD+ on the ULN2003s to anything, that pin is only used when motors are being driven.
I personally would leave D0/D1 free for serial comms/sketch downloading, especially as you have other pins free.
Then add a 6-pin header for a Serial download cable such as an FTDI USB/Serial cable or adapter such as FTDI Basic: Gnd, Gnd, Vcc, Tx, Rx, DTR (DTR to 0.1uF cap, other side of cap to the Reset pin). (might haveTx, Rx swapped, need to check that). Or for a CP2102 USB/Serial adapter.

A0-A5 can be used as D14-D19, with internal pullup resistors, so a switch connecting the pin to ground can be read as button press.
Use a symbol like "MA06-1" for six 0.1" spaced holes good for 0.025" square posts.
Other hole quantities and arrangements are also available, such as "MA02-3" for 2x3 header for an ICSP connector.
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.

Go Up