Programming fuses with AVRDUDE?

Go To Last Post
12 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How do you change attiny2313 fuses with avrdude. I know what fuses I need to change use the fuses calculator. I know you can really screw up your chip :x if you don't you this right, so you could give detailed instructions.

[url]http://palmavr.sourceforge.net/c...\
M_LOW_0x3F=0x3D&M_LOW_0x40=&M_LOW_0x80=&M_HIGH_0x01=&M_HIGH_0x0E=0x0C&M_HIGH_0x10=&M_HIGH_0x20=0x00&M_HIGH_0x40=&\
M_HIGH_0x80=&M_EXTENDED_0x01=&B_SPIEN=P&B_CKSEL1=P&B_BODLEVEL0=P&O_BITS=Apply+fuse+bits[/url]

Thanks in Advance

Life Is Like A Bucket Of Chicken.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Taco_Bell wrote:
How do you change attiny2313 fuses with avrdude. I know what fuses I need to change use the fuses calculator.
I find the command line parameters of avrdude very confusing. I always need to check the manual. If I want to quickly check or change fuses, then I use the -t command line option to get me into terminal mode.

Typing a command like:

read hfuse

will display the hfuse. To write to the fuse use the command:

write hfuse 0 0xdd

Try to set all the fuses in one terminal session in the order efuse, hfuse, lfuse. I would set the lfuse last because if you screw that up, then you may a clock source to recover. Use a "q" to quit terminal mode.

--Mike

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The command-line equivalent would be

-U hfuse:w:0xdd:m

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you go to the link I gave in the first post, in the upper right hand corner of the window there is a box that tells you the values for high, low, and Ext'd. I'm assuming hfuse is for the High number, lfuses is for the Low number, and efuse is for the Ext'd number. Am I right? I really don't want to screw up another chip. :)

Life Is Like A Bucket Of Chicken.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I burn out two chips, can someone tell me exactly what to type in the terminal if the values are?:

low: 0xFD
high: 0xD9
Ext'd: 0xFF

According to Fuse Calu:
[url]http://palmavr.sourceforge.net/c...\
P=ATtiny2313&V_LOW=FD&V_HIGH=D9&V_EXTENDED=FF&M_LOW_0x3F=0x3D&M_LOW_0x40=&M_LOW_0x80=&\
M_HIGH_0x01=&M_HIGH_0x0E=0x08&M_HIGH_0x10=&M_HIGH_0x20=0x00&M_HIGH_0x40=&M_HIGH_0x80=&
M_EXTENDED_0x01=&B_SPIEN=P&B_BODLEVEL1=P&B_CKSEL1=P&B_BODLEVEL0=P&O_BITS=Apply+fuse+bits[/url]

Life Is Like A Bucket Of Chicken.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You are not providing schematics. So no one can say if your fuse settings match your schematics. And if it does, does the circuit you have build match your schematics?

Stealing Proteus doesn't make you an engineer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I burnt out two chips trying to program the fuses and I want to know exactly what to type in the terminal?

Values wanted entered:
low: 0xFD
high: 0xD9
Ext'd: 0xFF

I think It will look like this?:

avrdude -p t2313 -c usbtiny -U efuse:w:0xFF:m -U hfuse:w:0xD9:m -U lfuse:w:0xFD:m

Life Is Like A Bucket Of Chicken.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

is that the right command???

Life Is Like A Bucket Of Chicken.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

This is the right command-line to set the fuse values you mentioned.

Not sure whether these values are what you intended to have. They are:

. no self programming enabled
. debugWire disabled
. EEPROM will be erased by chip erase
. SPI enabled
. watchdog not forced to be enabled
. brown-out level 4.3 V
. /RESET is AVR reset (rather than GPIO)
. CPU starts at full clock speed
. clock not sent out to PD2
. external crystal, f = (3...8) MHz
. most conservative oscillator startup timing

Jörg Wunsch

Please don't send me PMs, use email if you want to approach me personally.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Taco_Bell wrote:
I burnt out two chips trying to program the fuses and I want to know exactly what to type in the terminal?
Since you are not willing to discuss your schematics I'll bet you'll soon have "killed" a third.

Stealing Proteus doesn't make you an engineer.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Note that "setting the fuses to select a clock source that is not provided to the AVR, thus putting the chip into a state where it cannot run" is quite different than "burning out the AVRs".

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Got It Working,

I was not aware that you had to had a crystal in the target board.

Life Is Like A Bucket Of Chicken.