AVR fuses woes ...

get help with basic microcontroller stuff

Moderators: arduwino, adafruit

AVR fuses woes ...

Postby dmcole » Sat Jun 20, 2009 3:50 pm

Anybody here a Mac-o-phile and using AVRFuses (http://www.vonnieda.org/software/avrfuses)? I've killed one ATMega8515 and I since I have only one spare, I'd like to get this right.

All I'm trying to do is to use an 8MHz external crystal. In the current version of AVRFuses, there's no listing for an 8MHz crystal. There's listings for "Ext. RC Osc. 3.0 MHz - 8.0 MHz," with various startup times, and "Ext. RC Osc. 8.0 MHz - 12.0 MHz," with similar various startup times.

But those are *oscillators*, right? Not crystals. But even if that's right, should I pick the 3-8 or the 8-12? Default startup time is 6 CK + 12ms; should I use that?

Then there is a list of "Ext. Crystal/Resonator" for "Low Freq." "Medium Freq." or "High Freq." at various startup times, none of which are anything like 6 CK + 12ms. Is 8MHz low, medium or high?

Thoughts, comments, theories for this dunderhead would be appreciated.

Thanks so much.

\dmc

PS: Short of that, the AVRDude CL for changing from the default internal clock to an external crystal on an 8515 (and nothing else, right?) would be appreciated.

PPS: Lastly, assuming I set the fuses to "Ext. Clock; Start-up time: 6 CK + 64 ms" on the now-dead 8515, any thoughts on how to resurrect it?
---------------------------
The only thing more dangerous than a software engineer with a soldering iron or a hardware engineer with a compiler is a liberal-arts major with either. http://www.dmcole.net/
dmcole
 
Posts: 33
Joined: Thu Dec 25, 2008 2:36 pm
Location: Calif.'s San Mateo Coast

Re: AVR fuses woes ...

Postby adafruit » Sun Jun 21, 2009 4:27 pm

you want Ext Crystal, not RC osciallator
User avatar
adafruit
 
Posts: 3863
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: AVR fuses woes ...

Postby Sorceress Sarah » Mon Jun 22, 2009 2:25 am

Just out of curiosity. . .

What's this bug supposed to do?
I'm not a freak. . . I'm a PROTOTYPE!!!
User avatar
Sorceress Sarah
 
Posts: 100
Joined: Sat Jun 20, 2009 1:07 pm

Re: AVR fuses woes ...

Postby dmcole » Mon Jun 22, 2009 11:52 am

Ladyada: Thanks for your insight. From another board I got the CLI for the fuse bits. When I get some new 8515s I'll use that, abandoning AVRFuses for the moment.

SS: This is for a DMX transceiver: http://www.hoelscher-hi.de/hendrik/english/dimmer.htm
---------------------------
The only thing more dangerous than a software engineer with a soldering iron or a hardware engineer with a compiler is a liberal-arts major with either. http://www.dmcole.net/
dmcole
 
Posts: 33
Joined: Thu Dec 25, 2008 2:36 pm
Location: Calif.'s San Mateo Coast

Re: AVR fuses woes ...

Postby karlgg » Tue Jun 23, 2009 5:21 pm

There was a link I had about feeding mis-fused AVRs a clock signal with the programmer... But I don't know what I did with it. If you know (or think you know) what the fuses were set to, you could hook up the clock circuit it's expecting just to let it run long enough to reprogram (back to the default internal clock, or what you intended originally).
I think I am, therefore I am... I think.
User avatar
karlgg
 
Posts: 212
Joined: Sat Dec 27, 2008 1:41 pm
Location: Anthony, NM

Re: AVR fuses woes ...

Postby Sorceress Sarah » Tue Jun 23, 2009 10:28 pm

I wonder if I dare. . .?

A few app notes that might interest you. . .
With reference designs!
I'm not a freak. . . I'm a PROTOTYPE!!!
User avatar
Sorceress Sarah
 
Posts: 100
Joined: Sat Jun 20, 2009 1:07 pm

Re: AVR fuses woes ...

Postby karlgg » Wed Jun 24, 2009 2:38 am

Okay, that confuses me. How are dimmer circuits from Cyprus supposed to help reprogramming a mis-programmed Atmel chip?
I think I am, therefore I am... I think.
User avatar
karlgg
 
Posts: 212
Joined: Sat Dec 27, 2008 1:41 pm
Location: Anthony, NM

Re: AVR fuses woes ...

Postby Sorceress Sarah » Wed Jun 24, 2009 7:46 am

karlgg wrote:Okay, that confuses me. How are dimmer circuits from Cyprus supposed to help reprogramming a mis-programmed Atmel chip?


The point was to give a

Code: Select all
char * data;


about some bugs that are specifically designed for the purpose, as well as a pretty darned slick controller (think iPod), as well as the reference designs to accomplish the job.

The suggestion is that while you can frequently get that screw on your glasses tight with the end of s butterknife, sometimes its best to get the jewler's screwdriver.
I'm not a freak. . . I'm a PROTOTYPE!!!
User avatar
Sorceress Sarah
 
Posts: 100
Joined: Sat Jun 20, 2009 1:07 pm

Re: AVR fuses woes ...

Postby dmcole » Wed Jun 24, 2009 12:43 pm

Sorceress Sarah wrote:I wonder if I dare. . .?

A few app notes that might interest you. . .
With reference designs!


Way over my head. But thanks for taking the time to provide the link.

\dmc
---------------------------
The only thing more dangerous than a software engineer with a soldering iron or a hardware engineer with a compiler is a liberal-arts major with either. http://www.dmcole.net/
dmcole
 
Posts: 33
Joined: Thu Dec 25, 2008 2:36 pm
Location: Calif.'s San Mateo Coast

Re: AVR fuses woes ...

Postby dmcole » Wed Jun 24, 2009 12:47 pm

ladyada wrote:you want Ext Crystal, not RC osciallator


Just for clarity's sake ...

When I go to http://www.engbedded.com/fusecalc

and pick an ATmega8515, under the "features" pull-down menu, what should I pick for an 8MHz external crystal?

Thanks.

\dmc
---------------------------
The only thing more dangerous than a software engineer with a soldering iron or a hardware engineer with a compiler is a liberal-arts major with either. http://www.dmcole.net/
dmcole
 
Posts: 33
Joined: Thu Dec 25, 2008 2:36 pm
Location: Calif.'s San Mateo Coast

Re: AVR fuses woes ...

Postby adafruit » Wed Jun 24, 2009 12:59 pm

what does the datasheet suggest?
User avatar
adafruit
 
Posts: 3863
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: AVR fuses woes ...

Postby dmcole » Thu Jun 25, 2009 1:29 pm

ladyada wrote:what does the datasheet suggest?

The datasheet I have -- 2512J–AVR–10/06 -- discusses crystal oscillators on Pages 35-38. In the text on Page 36, it says that "The Oscillator can operate in three different modes, each optimized for a specific frequency range." It then shows Table 7 with -- four different modes. OK, obviously the first and fourth modes are the same thing, one for a resonator and one for a crystal, but jeez, gimme a break.

Anyway, nowhere in the datasheet does it define "low frequency," "medium frequency" or "high frequency," which are the phrases used by the fusecalc page. I have read somewhere -- I can't find it now, a random web page that sticks in my memory, if not Google's -- that "medium" is 3-8 and "high" is >8, but if you have an 8MHz crystal, is it medium or high?

Insofar as the startup times go, it seems the data sheet (Table 9) is recommending a 16K; my guess is that since the default reset time is 4ms that will suffice in a production environment as well.

So, that leaves two choices:

*Ext. Crystal/Resonator Medium Freq.; Start-up time: 16K CK + 4 ms; [CSEL=1101 SUT=10]
*Ext. Crystal/Resonator High Freq.; Start-up time: 16K CK + 4 ms; [CSEL=1111 SUT=10]

\dmc
---------------------------
The only thing more dangerous than a software engineer with a soldering iron or a hardware engineer with a compiler is a liberal-arts major with either. http://www.dmcole.net/
dmcole
 
Posts: 33
Joined: Thu Dec 25, 2008 2:36 pm
Location: Calif.'s San Mateo Coast

Re: AVR fuses woes ...

Postby adafruit » Thu Jun 25, 2009 5:36 pm

i think either one you pick should be just fine :)
User avatar
adafruit
 
Posts: 3863
Joined: Thu Apr 06, 2006 3:21 pm
Location: nyc

Re: AVR fuses woes ...

Postby dmcole » Thu Jun 25, 2009 8:35 pm

ladyada wrote:i think either one you pick should be just fine :)


I chose the first one and it appears to have worked.

Thanks.

\dmc
---------------------------
The only thing more dangerous than a software engineer with a soldering iron or a hardware engineer with a compiler is a liberal-arts major with either. http://www.dmcole.net/
dmcole
 
Posts: 33
Joined: Thu Dec 25, 2008 2:36 pm
Location: Calif.'s San Mateo Coast


Return to Microcontrollers

Who is online

Users browsing this forum: No registered users and 2 guests

Stuff to buy from the Adafruit store and links to product documentation!