Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Thread

Fuse Question

Fuse Question

2009-03-24 by farhan ahmad

Dear All,

I am using ATMEL AVR Studio 4. Everytime when I programmed the new micro-controller, I have to worry about some fuse bits. 

Is there anybody who knows programming of ATMEL AVR (ATMEGA64L) without having to worry about these Fuse Bits?

Actually I have designed the PCB and using the micro-controller(ATMEG64L) and I have PCB orders of 100. For 100 PCB's to program and to worry about fuse bits will cost lot of time. Is there any efficient way of programming the PCB without worrying about Fuse Bits. 

Regards,
Farhan Ahmad
System Developer
Germany

Re: Fuse Question

2009-03-24 by Don Kinzer

--- In AVR-Chat@yahoogroups.com, farhan ahmad <a_decent22@...> wrote:
>Is there any efficient way of programming the PCB
>without worrying about Fuse Bits.
The only ways to get around programming the fuse bits is to design your product so that the factory default fuse settings are acceptable.

In my opinion, why worry?  You have to program the devices anyway - programming the fuse bits takes much less time than that and can be done with the same setup.

Don Kinzer
ZBasic Microcontrollers
http://www.zbasic.net

Re: Fuse Question

2009-03-25 by Don Kinzer

--- In AVR-Chat@yahoogroups.com, "Jim Hatley" <james.hatley@...> wrote:
>You might consider using a couple simple batch files, one
>for setting the fuses and another for programming the part.
You should be able to do it with just one.  The example below shows how you can set the fuses and program the part in one easy operation.  This particular batch file is for programming using an AVRISP but it probably could be modified fairly easily for other programmers.

Note that the fuse programming is done at a lower speed since the raw device is typically running at 1MHz.  The ISP speed specified in the second invocation of stk500.exe may have to be changed if your device is operating at a low frequency.  The ISP frequency must be less than 1/4 of the device operating frequency.

--------- batch file ------------
@echo off
set prog="C:\Program Files\Atmel\AVR Tools\Stk500\stk500.exe"
set port=com1
set device=ATmega644
set efuses=fd
set fuses=d4d7
set lockBits=cc
set hex=myApp.hex
set eeprom=myApp.eep
%prog% -c%port% -d%device% -I100KHz -e -E%efuses% -f%fuses%
%prog% -c%port% -d%device% -I4MHz -if%hex% -pf -vf -ie%eeprom% -pe -ve -l%lockBits%

In our manufacturing process we actually a Perl script that verifies the chip signature, programs the device, sets the fuses and then runs some tests.  The script loops repeatedly with operator interaction at some of the steps, allowing fairly quick manufacturing test process.

Don Kinzer
ZBasic Microcontrollers
http://www.zbasic.net

Re: [AVR-Chat] Fuse Question

2009-03-25 by David VanHorn

You do need to assure that the fuses are set for your application.
If you're not using the 1 MHz internal RC, you'll need to set fuses,
at least the clock oscillator and CKOPT fuses if applicable to your
chip.

You might find an app that I wrote a while back interesting.
It's in the files section, called "fuser".
This app simply uses a small AVR to set the fuses on another AVR.

How did you figure on handling programming the devices anyway?  Most
any chip programmer can set the fuses in less than a second.

Re: [AVR-Chat] Fuse Question

2009-03-25 by Jim Hatley

Programming the fuses is just part of AVRs but it is really easy.

You might consider using a couple simple batch files, one for setting the fuses and another for programming the part. It is easy and inexpensive with AVRISP or AVRISPII.

Jim
Show quoted textHide quoted text
  ----- Original Message ----- 
  From: farhan ahmad 
  To: AVR-Chat@yahoogroups.com 
  Sent: Tuesday, March 24, 2009 6:08 AM
  Subject: [AVR-Chat] Fuse Question



  Dear All,

  I am using ATMEL AVR Studio 4. Everytime when I programmed the new micro-controller, I have to worry about some fuse bits. 

  Is there anybody who knows programming of ATMEL AVR (ATMEGA64L) without having to worry about these Fuse Bits?

  Actually I have designed the PCB and using the micro-controller(ATMEG64L) and I have PCB orders of 100. For 100 PCB's to program and to worry about fuse bits will cost lot of time. Is there any efficient way of programming the PCB without worrying about Fuse Bits. 

  Regards,
  Farhan Ahmad
  System Developer
  Germany



  

[Non-text portions of this message have been removed]

Re: [AVR-Chat] Fuse Question

2009-03-25 by John Samperi

At 11:40 AM 25/03/2009, you wrote:
>You might consider using a couple simple batch files,

What's wrong with the Auto function in Studio's programmer interface?
Once you set all the parameters just click on Auto and the chip
-all of it- will be programmed.

Option 2 embed the fuses into the ELF production file format.
All the info is in 1 file.

Option 3 use a Keyfob programmer (portable, target powered),
just program the programmer with all the necessary info and
then use it to program the chip. I have only recently started
to use this method for production an love it. :-)

And finally fuses are just another part of the chip that must be
programmer along with the flash and EEPROM.

Regards

John Samperi

********************************************************
Ampertronics Pty. Ltd.
11 Brokenwood Place Baulkham Hills, NSW 2153 AUSTRALIA
Tel. (02) 9674-6495       Fax (02) 9674-8745
Website  http://www.ampertronics.com.au
*Electronic Design * Custom Products * Contract Assembly
********************************************************

Re: Fuse Question

2009-03-25 by Graham Davies

--- In AVR-Chat@yahoogroups.com, farhan ahmad <a_decent22@...> wrote:
>
> ... I have designed the PCB ... (ATMEG64L)
> ... For 100 PCB's ... Is there any efficient
> way of programming the PCB without worrying
> about Fuse Bits. 

Farhan,

So, you've learned that you will have to deal with fuses but that nobody else considers it a big deal.  (For the ATmega64L, I think fuses are particularly important as you have to clear a fuse that turns this device into an ATmega103 or some such nonsense.)

The method I use personally is the "auto" tab of the programmer dialog in AVR Studio.  I just connect a target, punch the button, wait a few seconds and repeat until I get to the bottom of the stack of targets to be programmed.

To help you further, we'd need to know a little more about your hardware.  Have you used the ISP or JTAG programming interface?  JTAG has the advantage that it provides its own clock and so can be fast even if the initial fuse settings are for a slow internal clock.  Have you connected target power to the programming connector (pin 7 for JTAG)?  If so, you can probably feed power in at this connector, so for each unit you need to program you are only making one connection.

For example, suppose you chose JTAG.  Get yourself an inexpensive target-powered JTAG interface such as the AVR ICE-Cube.  Solder flying leads to target power and ground on the back of the ICE-Cube and connect a suitable source of power.  See also:
http://www.ecrostech.com/AtmelAvr/AvrIceCube/Target.htm
Connect this programmer to the first unit and carefully go through the steps to program it, always setting lock bits last.  Now, go to the auto tab and check the necessary steps.  Disconnect the programmed unit and connect the next, punch the button on the auto tab to automatically replay the programming steps.  When it's done, disconnect and connect the next.  You'll be able to get through your 100 pieces in ten or twenty minutes like this.  There is no need to dismiss and re-invoke the programming dialog.

Graham.

Re: [AVR-Chat] Re: Fuse Question

2009-03-25 by farhan ahmad

Dear All,
 
Thank you everybody for their valuable comments. I found out the way of handling the fuses in an efficient way. 
 
Regards,
Farhan Ahmad


--- On Wed, 3/25/09, Graham Davies <Yahoo37849@ecrostech.com> wrote:
Show quoted textHide quoted text
From: Graham Davies <Yahoo37849@ecrostech.com>
Subject: [AVR-Chat] Re: Fuse Question
To: AVR-Chat@yahoogroups.com
Date: Wednesday, March 25, 2009, 8:01 AM






--- In AVR-Chat@yahoogroup s.com, farhan ahmad <a_decent22@ ...> wrote:
>
> ... I have designed the PCB ... (ATMEG64L)
> ... For 100 PCB's ... Is there any efficient
> way of programming the PCB without worrying
> about Fuse Bits. 

Farhan,

So, you've learned that you will have to deal with fuses but that nobody else considers it a big deal. (For the ATmega64L, I think fuses are particularly important as you have to clear a fuse that turns this device into an ATmega103 or some such nonsense.)

The method I use personally is the "auto" tab of the programmer dialog in AVR Studio. I just connect a target, punch the button, wait a few seconds and repeat until I get to the bottom of the stack of targets to be programmed.

To help you further, we'd need to know a little more about your hardware. Have you used the ISP or JTAG programming interface? JTAG has the advantage that it provides its own clock and so can be fast even if the initial fuse settings are for a slow internal clock. Have you connected target power to the programming connector (pin 7 for JTAG)? If so, you can probably feed power in at this connector, so for each unit you need to program you are only making one connection.

For example, suppose you chose JTAG. Get yourself an inexpensive target-powered JTAG interface such as the AVR ICE-Cube. Solder flying leads to target power and ground on the back of the ICE-Cube and connect a suitable source of power. See also:
http://www.ecrostec h.com/AtmelAvr/ AvrIceCube/ Target.htm
Connect this programmer to the first unit and carefully go through the steps to program it, always setting lock bits last. Now, go to the auto tab and check the necessary steps. Disconnect the programmed unit and connect the next, punch the button on the auto tab to automatically replay the programming steps. When it's done, disconnect and connect the next. You'll be able to get through your 100 pieces in ten or twenty minutes like this. There is no need to dismiss and re-invoke the programming dialog.

Graham.

















      

[Non-text portions of this message have been removed]

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.