RSTDSBL ATMEGA8 wrong....

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

Hi to all!

I accidentaly programmed de rstdsbl Fuse BEFORE I programmed the flash, and I use spi programming(PonyProg software and hardware).

Now OBVIOUSLY(before I did not knew it) ATEMGA8 WON'T
program/read no more in SPI mode....
Not even the fuse reads....

So....WHAT I DO NOW?
I WILL have to use a STK500 to restore the RSTDSBL fuse? OR there is a cheap/quick way to do it?
Any simple Software/hardware suggestions?

Thanks!

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

You need to use high voltage parallel programming using either an STK500 or a Dragon

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

Is that the the ONLY way? I mean...I can't make a software for another AVR to change the fuses??

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

Without the chip being resettable, then the only thing left is HVPP to restore the fuses.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Hmmmm....Ok then...I will make a software to use with 8515 with the required protocol that I found in the datasheet of Atmega8......Hope it works!If I knew it sooner, I would never had programed that damn RSTDSBL....More work to do now.... :-(

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

Quote:
I will make a software to use with 8515
As you wish and all the best with your project, but I thought you already had a STK500 from the above.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Thanks!
No I do not have a STK500...I Hav Pony Prog HW/SW to programm AVR's. But It just programm in SPI mode, you know...It programmed my ATMEGA 8 once....When I disabled the RSTDSBL....BANG...It didn't work anymore, hehe..
But now I will make a SW/HW to use a 8515 as a programmer(reseter) of ATMEGA8...If it works, no problem anymore with wrong fuses!

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

I think only one person previously has gone to the trouble of designing an HVPP (and I kind of wonder if it's worth all the effort to resurrect a $3 mega8!) but you may get some ideas from:

http://www.der-hammer.info/hvpro...

PS You haven't filled in your location but if you think it'd be economic to do it (i.e. you are somewhere in Europe) then feel free to send me the mega8 (send me a PM for contact details) and I'll reset its fuses back to default for you.

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

Thank You for help!
But I'm in São Paulo, Brasil, and sure it will be expensive to send it to you!
Very good link you sent, interesting project, but my idea is only reset the the fuses of the ATMEGA8, not to load code in it.. So, it would be a "poor man's fuses reset", to people like me, who NEEDS to program RSTDSBL, and needs to update the software often too!

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

But even to reset te fuses you need to design a high voltage parallel programmer. The only devices that can do this are the STK500, Dragon and that HVPROG programmer I linked to above. You either need to buy one of the first two or build a clone of the third. Personally I'd just ditch the mega8 and put this one down to experience.

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

Well...The datasheet for Atmega8 gives a protocol for paralel reseting of fuses...What I plan to do is make the 8515 folow it! Of course that the board will be used only to do this kind of reset, nothing more..

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

Yes but that protocol is HVPP and is what that HVPROG (and STK500 and Dragon) implements

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

Also, it is somewhere between troublesome and dangerous to do the operation "ISP" as In-System Programming as it involves injecting 12V into the /RESET line.

Lee

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

See, all of us old guys know it's not worth doing...but we forget our youth when, if we wanted something we just made it because we didn't know it could not be done. I wasted many years of my life building "the best" amplifier and speaker system, my current system I bought even though I could make it.
Same thing with programmers, I just had to understand what made it work...even had a go at an AVR programmer and ICE...then I bought the Atmel's tools.
So if you have the passion for it and want to learn something just do it, and don't forget to share your successful efforts with the rest of us...I just know it's not just the cost of the chip and you will learn a lot :)

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

I got my stk500 and dragon, so I'm set. But wouldn't it be simple (says the one who has never done it) to just use jumpers (on a breadboard). All that's needed is to reset the high fuse so SPI works again.

Use the alternative algorithm to enter programming mode, set command (via jumpers), pulse XTAL1, load data byte with high fuse value, pulse XTAL1, set BS1/BS2, then a WR low pulse. High fuse now programmed correctly for spi.

Someone should try it. (I will exclude myself, as I seem to have misplaced all my jumper wires, and all my breadboards are being used).

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

You forgot the part with 12V hooked to /RESET, which is hooked to Vcc, and could fry everything else you have on that breadboard.

Lee

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

A plain white vanilla breadboard (the kind where you put chips on and take them off thousands of times, no solder involved). Mount chip on it. Nothing is connected to reset. Nothing is connected to anything yet. Place jumper wires as needed to get into programming mode. 12v will be connected to reset only. Trigger 12v when vcc passes 1v. Some playing around with jumper wires several times and you have a SPI enabled avr.

Now if he has his avr soldered down on something, that would be a different story, but that would have to be dealt with either way.

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

Quote:
You forgot the part with 12V hooked to /RESET, which is hooked to Vcc,
Via a xxK resistor I hope, so it should be safe. Anyway the 12V or some voltage (21V) different than VCC has been used for programming chips in the past with pretty much all kind of processors and ROMs/EPROMs.

John Samperi

Ampertronics Pty. Ltd.

www.ampertronics.com.au

* Electronic Design * Custom Products * Contract Assembly

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

Well, I KNOW that would be faster and better to have ATMEL tools, but the first thing is against it is the price(around R$200,00 here or US$100,00 for STK500).
The second thing, is that I just need to change ONE bit of HIGH BYTE fuse...
The third thing is around on folowing the "thoughts" of js, because I will surely learn a lot of thing doing this!
The fourth: This is a low-cost project that will be very useful to me, cus I DO need to disable the reset, but need to update the software often!
The fifth: I hope that this project be useful to other people that has only serial programmers(and made mistakes on fuses)!
BUUUUT of course that all point of view is EXTREMELY welcome! That's what make a real forum! OPINIONS!!!!

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

I'm building it right now!

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

You just keep building your high fuse 'resetter'. If you are going to be using it often, you sure don't want to do the 'manual' breadboard/jumper method.

When your done, you could figure out what the least amount of pins are required to program that high fuse byte, then design the same circuit to use the cheapest avr with the required pin count (like a tiny2313).

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

Done! Hardware is ready now. Hope that I can finish the SW soon....(Work and University burns my time)

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

Well....It did not work!
The protocol to reset was checked many many many times , and is not the cause of the project don't work..
The only thing that works sometimes is the erase chip command, but is random...
Looking for the time I lost building it, and testing it, I regret to ever tried to make it work!
I then rebuild all the original project, to not have to disable the reset pin.....
it becomes a lot bigger, but at least seem it works fine now!
Thanks for the help guys!

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

Some comments to your design (it doesn't mean that they are the failure causes):

- Q1's base should have a resistor to limit the current.
- Both AVR chips should have decoupling caps.
- Make sure your 12V supply is between 11.5V and 12.5V (the limits given in the datasheet)

Embedded Dreams
One day, knowledge will replace money.

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

Wouldn't it have been easier and cheaper to throw the bad chip away and start with a new one?????