Pages: [1] 2   Go Down
Author Topic: Atmega 328 with internal 8MHz clock  (Read 3164 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Sr. Member
****
Karma: 2
Posts: 338
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Dear friends,

http://arduino.cc/en/Tutorial/ArduinoToBreadboard

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


* internal clock.png (139.18 KB, 1366x768 - viewed 85 times.)
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8974
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:

Quote
atmega328bb.build.variant=standard
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Sr. Member
****
Karma: 2
Posts: 338
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Offline Offline
Sr. Member
****
Karma: 2
Posts: 338
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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:

Quote
atmega328bb.build.variant=standard

Still, the same error. ><
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 212
Posts: 8974
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

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

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Sr. Member
****
Karma: 2
Posts: 338
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

South Africa
Offline Offline
Jr. Member
**
Karma: 1
Posts: 50
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The following line seems strange:
Code:
atmega328bb.build.core=arduino:arduino
The other entries shipped with my Arduino environment have the following form:
Code:
atmega328bb.build.core=arduino
You may also have to provide the path to the bootloader:
Code:
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?
Logged

Offline Offline
Sr. Member
****
Karma: 2
Posts: 338
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Offline Offline
Sr. Member
****
Karma: 2
Posts: 338
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Not even can burn a bootloader now ><


* Untitled.png (139.44 KB, 1366x768 - viewed 63 times.)
Logged

ਪੰਜਾਬ
Offline Offline
Edison Member
*
Karma: 12
Posts: 1619
Another year! Alone! :(
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

"Real Men can Accomplish  Anything"
-  Website  
- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੂਂ !

Offline Offline
Sr. Member
****
Karma: 2
Posts: 338
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Thanks
Logged

ਪੰਜਾਬ
Offline Offline
Edison Member
*
Karma: 12
Posts: 1619
Another year! Alone! :(
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

"Real Men can Accomplish  Anything"
-  Website  
- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੂਂ !

Offline Offline
Sr. Member
****
Karma: 2
Posts: 338
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Cant find it in the datasheet
Logged

ਪੰਜਾਬ
Offline Offline
Edison Member
*
Karma: 12
Posts: 1619
Another year! Alone! :(
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

"Real Men can Accomplish  Anything"
-  Website  
- skype : nishants5  

ਫ਼ਤੇਹ ਕਰੂਂ !

South Africa
Offline Offline
Jr. Member
**
Karma: 1
Posts: 50
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Pages: [1] 2   Go Up
Jump to: