Sonsivri

Electronics => AVR, 8051 Family and ARM Area => Topic started by: firewalker on December 05, 2007, 10:48:08 10:48



Title: Attiny2313 Low Fuse Byte accidentally programmed as 0x00
Post by: firewalker on December 05, 2007, 10:48:08 10:48
Using the programmer at bottom address and with avrdude I programmed the Low Fuse Byte at the value of 0x00. After that the avr stopped to respond in any further programming. Like it can't communicate with the programmer. I tried with an without an external crystal. The programmer uses the SPI method for programing the device. Is there any way to restore it?

The programmer.

http://www.tuxgraphic.org/electronics/200510/article05101.shtml


Title: Re: Attiny2313 Low Fuse Byte accidentally programmed as 0x00
Post by: hate on December 05, 2007, 11:07:42 11:07
If your low fuse bytes are all programmed (0x00 indicates all are programmed) you'll need an external clock  to program it again. But you should also check your high fuse byte for 'Reset' fuse is programmed or not. If you cannot program it again with an external crystal then your crystal frequency may be the problem or the 'Reset' fuse which I previously mentioned!

Regards...


Title: Re: Attiny2313 Low Fuse Byte accidentally programmed as 0x00
Post by: firewalker on December 05, 2007, 11:15:32 11:15
I can't check the High fuse. The avr doesn't comunicate.


Title: Re: Attiny2313 Low Fuse Byte accidentally programmed as 0x00
Post by: sfiga69 on December 05, 2007, 01:16:52 13:16
I have had the same problem with a atmega48 during internal clock calibration.
To restore it, you can use a parallel programmer.
With the serial programmer not all the fuse bit are accessible.


Title: Re: Attiny2313 Low Fuse Byte accidentally programmed as 0x00
Post by: 8K51 on December 05, 2007, 07:02:49 19:02
I agree with sfiga69 : in such case parallel programing is the way to restore initial serial programming way.
You can find a simple parallel mode programmer for parallel port among another ones in this page:
http://elm-chan.org/works/avrx/report_e.html (http://elm-chan.org/works/avrx/report_e.html)
Very usefull site.....
Regards


Title: Re: Attiny2313 Low Fuse Byte accidentally programmed as 0x00
Post by: chyun3 on December 06, 2007, 05:25:40 05:25
Hi....u can use  high voltage programmer and all your problem will be solve...

example of high volatge programmer --> STK500
http://www.der-hammer.info/hvprog/index_en.htm


Title: Re: Attiny2313 Low Fuse Byte accidentally programmed as 0x00
Post by: firewalker on December 06, 2007, 10:55:51 10:55
I finally made it work. I programmed an ATmega8 with a 12 MHz crystal for use as an extrernal clock and aplied the signal to Xtal1 (pin 5) of the tiny2313. I also applied the option -B 32 to "slow down" avrdude. Thanks you Guys.

The code for the ATmega8

Code:
#include <avr/io.h>

#define INIT DDRC|=_BV(PC0)

#define ON PORTC&=~_BV(PC0)

#define OFF PORTC|=_BV(PC0)

#define nop()  __asm__ __volatile__("nop")

int main(void)
{
        INIT;
        OFF;
        while(1){
                nop();
                ON;
                nop();
                OFF;
        }
   return(0);
}