Atmega 328 with internal 8MHz clock

Dear friends,

Referring to this article, I downloaded the breadboard.zip file and do as required.

I manage to burn the bootloader of atmega 328 on breadboard with 8MHz internal clock files into the chip.

However, I face some problem when uploading sketches into the chip.

Below is the error message that I get :

How to solve it ?

Thank you

That bords.txt file is old enough that it doesn't have a ".build.variant=standard" line. Add this line to the breadboard boards.txt file:

atmega328bb.build.variant=standard

When burning that atmega 328 with internal 8MHz crystal, I have to put an external 16 MHz crystal to the circuit ? if not error bootloading ?

Thanks

johnwasser:
That bords.txt file is old enough that it doesn't have a ".build.variant=standard" line. Add this line to the breadboard boards.txt file:

atmega328bb.build.variant=standard

Still, the same error. ><

Vincent19:
Still, the same error. ><

Did you shut down and re-start the Arduino IDE after making the change? The IDE reads all the configuration files when it starts up.

Vincent19:
When burning that atmega 328 with internal 8MHz crystal, I have to put an external 16 MHz crystal to the circuit ? if not error bootloading ?

If the 386 has been set to use an external 16 MHz crystal then you must provide either the crystal or an external clock signal. AFTER you have set it to use the 8 MHz internal RC oscillator you can remove the 16 MHz crystal.

Yes, I do you restart the IDE..well, the breadboard file is placed in the hardware folder on the arduino sketches and not in the arduino IDE folder..I am curious that can I just copy the board file for the breadboard zip and paste it to the original board.text file ??? Thanks

The following line seems strange:

atmega328bb.build.core=arduino:arduino

The other entries shipped with my Arduino environment have the following form:

atmega328bb.build.core=arduino

You may also have to provide the path to the bootloader:

atmega328bb.bootloader.path=atmega

This plus johnwasser's suggestion should give you a working boards.txt file.

I don't think you need a 16MHz crystal on the new chip when burning the bootloader. What errors do you see?

Not a new chip any more..burnt the arduino uno bootloader before

Not even can burn a bootloader now ><

In order to run a chip on its internal Oscillator the respective Fuses need to be set , Lookonto the datasheet on ATmega328 for its fuses that makes it run on internal oscillator , I do this all the time with an ATmega8.

Yea, I set it by burning the bootloader into it. Can also right ?

Thanks

Check the Fuses again and know what they spell? for me I right fuses additionally as I think they are to be written Individually, You have to care for 'hfuse' and 'lfuse'

Cant find it in the datasheet

Then you have to get the very CORRECT lfuse and hfuse for the ATmega328 as if wrong fuses are set then they may lock the chip that can never be programmed after that so look for right fuses over the internet

Vincent19:
Not even can burn a bootloader now ><

Looking at the error message seems to suggest that the bootloader file is not found. Check that the bootloader hex file is in the path that avrdude is searching, this is printed as part of the output at the bottom of the screen.

I just downloaded the board.txt file..No bootloader inside the breadboard.zip

Anyone tried that before ?

Hope can solve this problem.

Thanks

I just went through myself..

ALTHOUGH my chips were new/blank from factory still.. nothign on them prior.. so thats your initial problem.. (no clue.. probably have to add crystal/caps to burn)

but I originally had the same problem, after buring the breadboard bootloader.. I couldnt upload using IDE 1.0.. using IDE v23 worked fine.. but not IDE 1.0 (I had to add that last line in my board.txt file

anyways..

here is my breadboard board.txt file:

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

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

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

I have this in my "Arduino 1.0 >> hardware >> breadboard >> board.txt directory"

I used my Arduino Duemilanove 2009 board to flash my bootloader, here are my steps:

1.) hook up my Arduino Duemilanove 2009 board to USB
2.) Open IDE (I used v.23)
3.) Tools >>> Board >> (Duemilanove 2009)
4.) Tools >>> Serial Port (select port your above Arduino is connected to)
5.) File >>> Examples >>> ArduinoISP.. (upload this sketch to your Arduino board.
6.) Disconnect.. from USB
7.) Connect a 100-120 ohm resistor between RESET & +5v (to disable auto-reset on the MAIN board)
8.) Connect your target board (minimal +3.3v/8Mhz internal clock) to the MAIN Arduino above.

Wiring Pnout:
Arduino board pin >>> Target board pin
D10 >>>> RESET
D11 >>>> D11
D12 >>>> D12
D13 >>>> D13
GND >>>> GND
+3.3v >>>> VIN on breadboard...

9.) Reconnect MAIN Arduino board to USB.
10.) Open IDE (I used v.23)
11.) Tools >>> Board >> (Breadboard 3.3v with Internal 8MHz clock)
12.) Tools >>> Serial Port (select port your above Arduino is connected to)
13.) Tools >>> Burn Bootloader >> w/Arduino as ISP

Should burn fine.... when I want to UPLOAD sketches.. I needed to go back and make sure I had the Arduino breadboard 3.3v and Internal 8MHz clock chosen as my board type in

Tools >> Board >>

(and of course the right com port chosen again)