Creating a standalone Arduino

Ok, so I basically wanted to experiment with pulling the ATMega 328 from my Uno and using it as standalone on a breadboard, using the minimal setup. This means I have to use the internal clock, so I have appended the following to my boards.txt in my arduino1.0 installation folder:

##############################################################

atmega328bb.name=ATmega328 on a breadboard (8 MHz internal clock)

atmega328bb.upload.protocol=arduino
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
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=standard

However, when I try to upload, I get the following error:
avrdude: stk500_recv(): programmer is not responding

What do I need to do? The chip works fine on my Uno, so it is not broken. I do not need to upload ArduinoISP, do I? This must be surely just for the bootloader burning, as I will be uploading it to the chip and then immediately overwriting it again?

Can anyone help?

Thanks,

Sam

Have you changed the fuses on atmega328 ?

legwinski is correct. The fuse bytes and the bootloader that come installed on the 328P in an arduino are made to be used in an arduino. The easiest way to do it, is to just add the external crystal and caps (or a ceramic oscillator) to your standalone circuit. That way it mimics the arduino fully and it wont be able to tell if its on the arduino board or your home made circuit. They cost only about $1 online.

Yes, but i really wanted to use the minimal setup, and I know this can be done, I just don't understaqnd where the problem is coming from?

You say the easiest method is to add the crystal and capacitors. What are the other methods?

I think that you should use that boards.txt file, then burn the bootloader. You could do this by following arduino isp. Upload it to your arduino, connect MISO, MOSI, SCK pins to each other, connect RST to D10, and then burn the bootloader to the atmega on a breadboard.

It already has the bootloader, it's come straight from my Uno. Plus, I can't burn anything to the chip because the Uno will no longer have it's chip in. Please read before posting on a topic.

Bootloader that you have on chip is for UNO right ? So fuses are set for 16 mhz oscillator you need to change these via AVR dude or via burning a bootloader for arduino that uses internal oscillator

I thought the bootloader was just a standard for arduino? There is only one option for Burn Bootloader in the Arduino software. So is it possible to burn this new bootloader with only my Arduino Uno?

Apologies Qtechknow if I snapped, I'm just a litle frustrated with this, a lot of threads I read seem to have all the same problems, and yet none have had a solution that works for me!! Haha

Thanks

Sam

If you are going to pull the chip from your Arduino it is going to be configured to run with an crystal/resonator. if you want to play with a 328 in a breadboard then the beswt approach is to buy a blank 328P and using the ArduinoISP and Arduino0.22 and use your Arduino to create whatever config you want in your new 328P.

Make sure you get a 328P, the 328 is also available, but there are a couple additions/changes you need to make to Arduino & AVRDude and I don't think you are ready to make those changes - yet.

Another thought - if you change your present 328 from your Arduino board that board may no longer function. Better to get another 328P and keep you present Arduino working because then you have a know working platform and the ability to use your Arduino as a programmer.

ArduinoISP lets your Arduino board function as a programmer. You can then program any of the options listed in the ArduinoIDE (and add others) and you can use AVRDude from the command line to program other AVR chips.

You can't program an AVR without either ArduinoISP loaded in an the chip on the Arduino board, or some other programmer. A blank 328P costs far less that a programmer, so order several, you will find uses for them.

I think I will buy a few ATmega328Ps micros, and use arduino ISP. While at it , I am also going to buy a FEW crystals and capacitors, so I can mix and match between 8Mhz and 16.

I will buy 328 Ps, but just out of curiosity, do you mean like soldering and stuff when you say "modifications"? Only, I am quite a competant solder-er ( is that a word? :stuck_out_tongue: ), I just need to get a clamp to act as a third arm. Again, I will buy 328Ps, (as why buy something that will take more effort?) I am just curious.

Many thanks to all,

Sam

The 328P and the 328 have different signatures bytes. Several files need additions/changes to be made and then you could work with either chip.

From the questions you asked and the way you asked them it suggests that for now, you would be better served getting a few 328P chips and getting a little more experience before you tackle too many changes.

Hooking up a 328P on a breadboard is not difficult, get hold of a Max232 or SP3232 or similar chip and you can program it using the serial port on your PC. I have one configured this way. I use mine for testing other circuits that I am bread boarding. It is easier than running jumpers from my Arduino board to the bread boad as everything is a bit more solid and stable. You can find several Breadboard Arduino pages out there and even a couple YouTube videos.

A bread boarded 328 works just fine at 16Mhz. I have done it several times with a 16Mhz resonator.

Crystal, 22pFc caps, 10K pullup resistor, are available quite inexpensively from dipmicro.com, I have used them in a lot of projects, shipping costs are really low too.

Ah, I'm in the UK. Anyone with any experience from stores over here? Which are the best?

I wasn't planning on modifications, just wondering, as I stated a couple of times.

I was referring to modifications to some files. No modifications are needed to be made to the Arduino hardware. You might consider getting a 328 or 2 with the bootloader already loaded.

I think your problem is that you are not loading the correct bootloader onto the chip. If you get your new blank chips (bootloader, or no bootloader) you will need to burn the bootloader with arduino isp. Wire it up like the example on the arduino site, and then upload ArduinoISP in the examples tab to your arduino. Then choose "atmega328 on a breadboard" in the boards menu, and then burn this bootloader with ArduinoISP. Now the fuses will be set for the internal crystal, and you can upload programs now to this atmega.

Yes, it ha ping sinc beenestablished that my problem was down to my misunderstanding. I had originally thought that the 'Arduino bootloader' that I had heard mentioned was universal, and then you just had to choose the correct board when uploading the sketch.

I am now shopping around for the best price for components. Can someone please take a look at the kit that Oomlout do , something like the ABCC kit or something it is called, that provides all the components necessary to make a BB arduino, and tell me if they think it is a good deal? I am leaning towards it just because I can get all the stuff from the same site etc. Note I am looking to buy a few, so if it becomes less of a good deal when buying two or three then please make your thoughts known.

Thanks

Sam

I'm from the UK too , might be best to just go to ebay for them to be honest.

the 328 appears to be an american chip but I see it on fleabay for £3 +P&P.

these guys offer em at £2 per chip:

http://uk.mouser.com/ProductDetail/Atmel/ATMEGA328-PU/?qs=lwdSMh1%2FoYLcG0%2FEK87hwoHqtP2oqzEDuT%2FciOdW1gs%3D

Thanks - I went for ebay in the end. 20 x 22pf capacitors for a quid was pretty good!

Mouser were cheap, granted, but for 5 ATMega chips they wanted £12.00 postage - they won't be getting that sort of money from me!!

Sam