EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

AVR trivia question

Started by mc August 5, 2006
There isn't a way to specify the fuse bit settings of the Atmel AVR as 
directives in the assembly language program, is there?  Have I overlooked 
something?  It seems awkward to have to begin every program with a comment 
telling me what boxes to check on the STK500 "Fuses" menu.


mc wrote:
> There isn't a way to specify the fuse bit settings of the Atmel AVR as > directives in the assembly language program, is there? Have I overlooked
No. This is a FAQ. Yes, it's annoying.
Hi,

mc wrote:

> There isn't a way to specify the fuse bit settings of the Atmel AVR > as directives in the assembly language program, is there? Have I > overlooked something? It seems awkward to have to begin every > program with a comment telling me what boxes to check on the STK500 > "Fuses" menu.
I wrote a small Java program to maintain batchfiles for the command line version of the programmer. I just select the correct batchfile and then programm lots of processors :-). Regards, Kurt -- Kurt Harders PiN -Pr�senz im Netz GITmbH mailto:news@kurt-harders.de http://www.pin-gmbh.com
"mc" <look@www.ai.uga.edu.for.address> skrev i meddelandet 
news:%CcBg.14402$WM.9592@bignews1.bellsouth.net...
> There isn't a way to specify the fuse bit settings of the Atmel AVR as > directives in the assembly language program, is there? Have I overlooked > something? It seems awkward to have to begin every program with a comment > telling me what boxes to check on the STK500 "Fuses" menu. >
Once you have specified the fuse setting in an AVR studio project, you can use that project as a template. -- Best Regards, Ulf Samuelsson This is intended to be my personal opinion which may, or may not be shared by my employer Atmel Nordic AB
On Sat, 5 Aug 2006 22:38:53 -0400, "mc" <look@www.ai.uga.edu.for.address> wrote:

>There isn't a way to specify the fuse bit settings of the Atmel AVR as >directives in the assembly language program, is there? Have I overlooked >something? It seems awkward to have to begin every program with a comment >telling me what boxes to check on the STK500 "Fuses" menu. >
No - this is one the dumbest things Atmel have (not) done - it is truly insane that you can't have a single hex file that contains ALL the info for a chip. As a consultant who writes code for customers who then have to integrate the code into their own production systems it is an utter nightmare and always causes problems. With PICs I give them one file - Job Done. When I talked to an Atmel guy at a seminar a while ago, their primary excuse for this mess was 'we don't make production programmers'. What nonsense. It is up to the manufacturet to define how such things shold be done, so that third-party suppliers can all use the same standard. It may have been less of a problem when AVRs had a small handful of fuse settings that most users didn't need, but on the current devices theer are so many fuse settings that can screw things up, some in somewhat subtle ways (e.g. osc options that work but draw more power), that not being able to embed them is just totally brain-damaged.
On Sun, 6 Aug 2006 10:37:32 +0200, "Ulf Samuelsson" <ulf@a-t-m-e-l.com> wrote:

>"mc" <look@www.ai.uga.edu.for.address> skrev i meddelandet >news:%CcBg.14402$WM.9592@bignews1.bellsouth.net... >> There isn't a way to specify the fuse bit settings of the Atmel AVR as >> directives in the assembly language program, is there? Have I overlooked >> something? It seems awkward to have to begin every program with a comment >> telling me what boxes to check on the STK500 "Fuses" menu. >> > >Once you have specified the fuse setting in an AVR studio project, >you can use that project as a template.
You expect production to use AVR Studio and have the whole project, including source files there..?
Mike Harrison wrote:
> When I talked to an Atmel guy at a seminar a while ago, their primary > excuse for this mess was 'we don't make production programmers'. What > nonsense. It is up to the manufacturet to define how such things > shold be done, so that third-party suppliers can all use the same > standard.
I ended up making my own. As you say, it doesn't follow any standard but allows all settings including the EEPROM in a single production file. Runs on Windows 98/2000/XP using a parallel port and programming is a single button press. The same program becomes my dev programmer when switched to development mode. -Mike
Ulf Samuelsson wrote:

> > There isn't a way to specify the fuse bit settings of the Atmel AVR as > > directives in the assembly language program, is there? Have I overlooked > > Once you have specified the fuse setting in an AVR studio project, > you can use that project as a template.
Well, if we're going to list ugly workarounds that don't work for gang-programming and shouldn't be necessary anyway, the way I do it is to use avrdude as my programming software, and embed the fuse settings in my Makefile. Ulf, this really sucks. For every other micro I use, I can give a single HEX (or .TXT, for MSP430) to test engineering, and a checksum that covers every byte of the device including the fuse settings. It's not like Atmel would have to make any silicon changes; just tell vendors a standard method for adding a fake memory segment to the end of the .HEX file with a magic start address that means "here be fuses". While you're about it, roll the EEPROM data in there as well.
On 6 Aug 2006 06:32:26 GMT, "Kurt Harders" <news@kurt-harders.de> wrote:

>Hi, > >mc wrote: > >> There isn't a way to specify the fuse bit settings of the Atmel AVR >> as directives in the assembly language program, is there? Have I >> overlooked something? It seems awkward to have to begin every >> program with a comment telling me what boxes to check on the STK500 >> "Fuses" menu. > >I wrote a small Java program to maintain batchfiles for the command >line version of the programmer. I just select the correct batchfile and >then programm lots of processors :-).
Same here. Well, almost -- I did it up with Perl. Handles the program & fuse setting and verification, squawks to the user if there's a problem with communication or either verification pass. Saves me from those embarrassing lapses of memory when shifting from programming the duty lab bench processor to the tube of new ones for production. Not that *I've* ever forgotten to switch from the internal clock to the external crystal, I've ahhh just heard about it, yeah, that's it ... ;-) -- Rich Webb Norfolk, VA
"Ulf Samuelsson" <ulf@a-t-m-e-l.com> wrote in message 
news:5UhBg.41$Nd6.40@nntpserver.swip.net...
> "mc" <look@www.ai.uga.edu.for.address> skrev i meddelandet > news:%CcBg.14402$WM.9592@bignews1.bellsouth.net... >> There isn't a way to specify the fuse bit settings of the Atmel AVR as >> directives in the assembly language program, is there? Have I overlooked >> something? It seems awkward to have to begin every program with a >> comment telling me what boxes to check on the STK500 "Fuses" menu. > > Once you have specified the fuse setting in an AVR studio project, > you can use that project as a template.
So the STK fuse menu is stored in the project file?

The 2024 Embedded Online Conference