Pages: [1]   Go Down
Author Topic: How to make sketches for atmega48, + fuse settings  (Read 895 times)
0 Members and 1 Guest are viewing this topic.
Norway
Offline Offline
Sr. Member
****
Karma: 4
Posts: 423
microscopic quantum convulsions of space-time
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi!

I was just wondering what needs to be changed in the Arduino 0017 IDE to make hexfiles for the atmega48. As I understand it, atmega48,88,168 and 328 are pincompatible and pretty much similar, except that the 48 doesn't have support for a bootloader. And of course, smaller memory.

What I'm wondering about is which files needs to be changed, and what changes, to support an atmega48.


Also, where does the hexfiles go? It seems they don't always end up in a subfolder under the project folder, or that any project folder is always made - I'm not sure when, probably before uploading a sketch? But as I can't do that to an atmega48, I guess they are never made - but I'm not sure how this works.


Fuse settings:

I did try to compile a sketch for the 328, nothing fancy just some blinking of LED's, and uploaded to a atmega48 via avrdude and mega-isp, but, of course, it didnt' work.

First fuse settings was low fuse = 0x62, high fuse = 0xDF extended fuse (is this neccesary?) 0xFF (standard from the fuse calculator at http://www.engbedded.com/fusecalc/

Second time I set the low fuse to 0x61, thinking this would be the external oscillator and at 16MHz. "low power oscillator", according to page 29 of the AVR 48-88-168 datasheet table 6-3. Also SUT (Startup time) for "ceramic oscillator, fast rising power", table 6-4 below.

I didn't set any lock bits.

I guess there are compile differences between the 328 and 48 too?
Logged

ottawa, canada
Offline Offline
God Member
*****
Karma: 6
Posts: 991
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

can't help with the '48 but as to the .hex location, if you launch the upload the .hex does get put into the sketch folder.  It takes the upload attempt though, not just the compile button.

at it's simplest, what happens if you create a small sketch with the ide set to 168 and upload it to the 48 via avrdude/programmer?
« Last Edit: September 30, 2009, 05:57:50 pm by bill2009 » Logged

Norway
Offline Offline
Sr. Member
****
Karma: 4
Posts: 423
microscopic quantum convulsions of space-time
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the reply. Since I use an arduino to program another arduino via ISP (mega-isp http://code.google.com/p/mega-isp/), I have to remember to unplug it before "attempting" to upload a sketch then.

It was a no-go for the '168 as well. Well, unless the fuses are wrong, this time I left it at standard(?) lfuse: 0x62 hfuse: 0xDF and efuse (0x01) (read via avrdude).
Logged

Pages: [1]   Go Up
Jump to: