Pages: 1 [2]   Go Down
Author Topic: Atmega 8 development board  (Read 1636 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Sr. Member
****
Karma: 2
Posts: 337
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Error

What does this error means ?
Logged

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

How can I check for the fuse bits of my current atmega328 ?? Any software ? As you said, burning bootloader is just changing the fuse bits so that the USB can communicate with the atmega 328. So, if I burnt arduino UNO bootloader into the atmega 328, then if I erased the bootloader, will the fuse bits remain the same ?
Logged

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

You burn the bootloader to get the fuses set up.

You are not using a crystal? Then there is a change needed in the fuse selections.
I can research that some tomorrow night if someone else does not step in before then. I'm off to bed.

Code:
uno_noP.bootloader.low_fuses=0xff
uno_noP.bootloader.high_fuses=0xde
uno_noP.bootloader.extended_fuses=0x05

uno_noP.build.f_cpu=16000000L

After I burn the new bootloader, then I change the board back to arduino UNO then upload code ?
Logged

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

Okay, this gets a little 'fun'.
The 328 has different signature bytes than the 328P.
328   0x1E 0x95 0x14
328P 0x1E 0x95 0x0F

The real way around this (doing this from memory, bear with me).

Download a copy of notepad++ so you have a good editor
http://notepad-plus-plus.org/

Find avrdude.conf.  Open it & find 'm328p'

Copy that whole section, call it 'm328' and change the signature bytes per above.
Change anything that ATMega328P to ATMega328.  (no P at the end)
Save that.

Find boards.txt

Find a section that says something like "traditional NG bootloader. "
The NG boards used '168s and internal crystal.

"The initial design of the Arduino LilyPad had a 10-pin ICSP header and used the internal clock on the ATmega168 rather than an external oscillator. The bootloader on the initial design is the traditional NG bootloader. "

So you want to set up like that.
Copy that section, put in your new new board name, and put in the '328 signature bytes and memory limits.

Burn the bootloader so the fuses are set for the internal crystal, and you should be able to load sketches after that.
I've not tried this personally for anything but '1284s witt crystals, but it should get you pretty close.

Come back and ask questions if you get stuck.

Okay, after some experiment, I understand what you want to do now. You are actually creating a new board file so that I do not need to always change the signature of the arduino UNO bootloader signature from 0F to 14 right ? You straight creating a new board name arduino UNO for atmega 328 where when I want to burn the bootloader, I choose this board and with the signature of 14 instead of 0F. Okay. But then once I upload the bootloader, I cant upload the code through USB though. The error shown as like below :


* Untitled.png (283.99 KB, 1366x808 - viewed 6 times.)
Logged

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

Can anyone help ? Sir @CrossRoad

Thank you
Logged

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

Yes, I haven't got that figured out yet.
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.

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

Ok, I have a solution with Coding Badly's help.

http://arduino.cc/forum/index.php/topic,60649.msg437771.html#msg437771
See reply #1. Follow all the steps, ignoring the ATtiny xx stuff in the middle.

This seems to be a more direct link to WinAVR
http://sourceforge.net/projects/winavr/?source=directory

When done moving & renaming the directory, it should compile okay.
I even copied the ATMEGA328P section into a new ATMEGA328 section and changed the last signature byte from 0x0F to 0x14, and compiles now too.
And the Leonardo16 stuff I made for Atmega16U4 compiles now 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
Sr. Member
****
Karma: 2
Posts: 337
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Why do I need to have the winAVR software ?
Logged

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

Because of the following, which Coding Badly explained to me:
Quote
> There are entries specifically:
>
> Arduino Uno w/'328
> Leonardo16
>  
> They won't compile in 1.0.2, IDE complains about  the MCU not being there. I have checked & rechecked, I created both in avrdude.conf

At this point you're barking up the wrong tree.  The compiler doesn't use avrdude.conf.  All of its stuff is internal.  avrdude.conf will have
to have entries for the processors when you upload but adding the entries won't help when compiling.

The only solution is to swap out the AVR-GCC toolset for something newer.  I've posted instructions for upgrading to the latest version of
WinAVR on the forum.  If you can't find one of the posts or get stuck just let me know and I'll try to help.  Warning: I have no idea if the
latest version of WinAVR supports the ATMEGA16U4 or the ATMEGA328.
It only took a few minutes to do the steps needed.
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
Sr. Member
****
Karma: 2
Posts: 337
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is that means if I follow that, next time when I deal with atmega 328 rather than atmega 328P, for example like burning bootloadr, I do not need to change the signature anymore in the avrdude.txt ??
Logged

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

Correct, should be all set to just select it the same as any other board type.
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
Sr. Member
****
Karma: 2
Posts: 337
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Okay, Thanks alot !

Will give it a try smiley
Logged

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

Quite confuse for the steps now for the atmega 328..Can you guide me ?

Thanks
Logged

Pages: 1 [2]   Go Up
Jump to: