Pages: [1] 2   Go Down
Author Topic: Creating a standalone Arduino  (Read 1185 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:

Code:
##############################################################

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
Logged

Slovakia
Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you changed the fuses on atmega328 ?
Logged

Columbia, SC, USA
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

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

Offline Offline
Jr. Member
**
Karma: 0
Posts: 96
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

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

Slovakia
Offline Offline
Newbie
*
Karma: 0
Posts: 33
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

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

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
Logged

South Texas
Offline Offline
Edison Member
*
Karma: 8
Posts: 1025
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

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

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? smiley-razz ), 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
Logged

South Texas
Offline Offline
Edison Member
*
Karma: 8
Posts: 1025
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 533
Posts: 26956
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

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.
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: 29
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

South Texas
Offline Offline
Edison Member
*
Karma: 8
Posts: 1025
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Jr. Member
**
Karma: 0
Posts: 96
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1] 2   Go Up
Jump to: