ATtiny26 Fuses

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

How to program fuses on ATtiny26 with WinAVR?

I want to program RSTDISBL fuse to 0.

my code

include 
#include 
FUSES =
{
.low = FUSE_RSTDISBL

};
int main(void)
{
DDRB=0xFF;
while(1)
{
PORTB=~PORTB;
_delay_ms(200);

}
}

but PIN7 isn't IO pin, still reset pin!

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

Just to check but you do know that on the first occasion you program the RSTDISBL fuse you will then never be able to use ISP programming with that chip ever again? So only do this at the very last minute unless you have a high voltage programmer.

But, assuming you really want to do this, then the only use of FUSES= in avr-gcc is to produce a .elf file that can be used with AVR Studio (4, not sure about 5) to program the chip. If you don't use Studio and an Atmel programmer you cannot use this mechanism (currently).

Cliff

PS most people using pin limited chips with RSTDISBL do the development using a larger AVR where another pin can be used. Only when the code is complete do they port it back to the device with RSTDISBL and, after programming it, then set the RSTDISBL fuse.

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

i try and on AVR studio 4.18
after 2-3 programming, it show this error

What's the problem?

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

Looks like you succeeded in setting the fuse. So now you need to start using your high voltage programmer to continue programing the chip. Your ISP programmer is no longer any use.

ISP programming works by holding the _RESET line low.
Once the RSTDISBL fuse is set the _RESET signal is no longer connected to the _RESET pin which is now just an IO pin.

See the problem?

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

And how programming now?
I use STK500

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

Ah then you are OK -start reading about how to use it for high voltage programming instead of ISP.