Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Erasing the Programming of Locked Atmega ...

Status
Not open for further replies.

ScOe

Advanced Member level 4
Full Member level 1
Joined
Sep 26, 2004
Messages
111
Helped
6
Reputation
12
Reaction score
5
Trophy points
1,298
Location
Zagreb
Activity points
942
atmega fuse repair programmer

Is it possible to reset or do something with locked Atmega 8. What i mean by locked is that while programming something happened and chip got locked. Now i cant erase it, reprogram it or do anything with it. Well at least not with standard ISP programmer. So is there anything i can do accept throwing it in trash ? :)
 

locked atmega

What probably has happened is an unintended reset of the SPIEN fuse. If so, a parallel programmer would be needed to reenable SPI programming.
 

atmega reset fuses

Most of the time the fuse bits get programmed wrongly. The only way to bring it back is using high voltage parallel programming.

Some times when only clk select fuses got messed up, we can use an external crystal.

Regards
nandhu
 

atmega fuse recovery

hook up an oscillator (not a crystal) to the clock line on the atmega.
(any freq, usually 4MHZ)
erase the device with your ISP program, then reprogram the CLSEL fuse.

The above works 99.99% of the time!

Good Luck
 
atmega 128l signature 0xffffff

Does the oscillator connects to atmega same way as crystal does? (2x22pf grounded)
CLSEL fuse is Clock select ?
 
bricked atmega fuses

Does the oscillator connects to atmega same way as crystal does? (2x22pf grounded)

No need for capacitor if you use oscillator.

CLSEL fuse is Clock select ?

Yes it is

Nandhu
 

attiny2313 reset fuse isp 12v

Do this. I am 100% confident that it will fix the problem.
Erase with your ISP program, then program the CLSEL fuse, and it's fixed.
 

atmega8 reset fuses

Ok, thanx .. i'll give it a try as soon as i receive oscillator ...
 

atmega program fuse recovery

ScOe said:
Ok, thanx .. i'll give it a try as soon as i receive oscillator ...

you should post your result so others may benefit. That is what these forums are all about!
 

atmega8 fuse reset

you should post your result so others may benefit. That is what these forums are all about!

Sorry, forgot about it ... I was trying to find e-shop that sells oscillators, but couldnt find any that has acceptable price-shipping ratio, so i cold feeted with that project. It is shame, though, cause i have "locked" board that is around atmega128 and it is kindda expensive to throw it away. I'll try to find osc again, thanks for reminder :)
 

ponyprog and rstdisbl

I found 4Mhz oscillator, connected it to xtal1 and tried to use STK500 to erase fuses, but it seems that my STK doesnt work. i've bought it few months ago, havent used it yet, now im not sure if the problem is with stk or uC.

Is there any good method to check if STK is working ?

I tried to use it with avrdude as:
>avrdude -p m16 -P com6 -v -c STK500v2 -F -B 32
and receive this:

//info about stk and chip which i skipped to shorten post
//and this is the part that is interesting ...
avrdude: stk500v2_command(): command failed
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0xffffff
avrdude: Yikes! Invalid device signature.
avrdude: Expected signature for ATMEGA16 is 1E 94 03
avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as FF

avrdude: safemode: lfuse reads as FF
avrdude: safemode: hfuse reads as FF
avrdude: safemode: Fuses OK

avrdude done. Thank you.

Tried it on another locked mega16 and on one atmega128 board, and get same thing while reading it ...

Can anyone post minimum system configuration schematic so i can verify if my stk if working.
 

fuses reset atmega

I was working with an atmega16 just the other day and I could not get avrdude or avrprog to work. This program works good.

Select detect to see if it detects your atmega.

Good Luck
 

Attachments

  • avrospii_1053.zip
    46.5 KB · Views: 929

reset fuse bit for atmega128 with hv parallel

Hrm, that program doesnt work either .. when i select detect i get this msg:

Checking programmer type ...
Timeout during COM-port read operation!
Supported programmer not found on Com Port 2

Programmer is on port Com2, cause i tried to connect to it from avrstudio. It connects to programmer, it updated firmware on it, but cant enter programming mode.

AVRStudio show this errors:

Setting mode and device parameters.. OK!
Entering programming mode.. FAILED!
Leaving programming mode.. FAILED!

Is that means that my STK is malfunction ?

I'm getting tired of ISP-s :) i've build avr duper board and tried to program atmega8 via EasyAVR, everything seems ok, but windows doesnt recognize device ..

Can anyone post a serial port isp design with layout that works 100% :) Also, it would be good if layout is single layer. I'm using photo transfer method for developing boards, but didnt practice enough on two layer boards...

Thanx
 

clear spien for atmega128

Can you program any avr's with AVR Studio? If you can't, I am afraid your programmer is "bricked".

This happened to me and many others when AVR Studio updated the software in the programmer. The recovery procedure is in AVRStudio, under: "Help/AVR Tools Users Guide/AVRISP Users Guide/Manual Firmware Upgrade. "

I myself had an atavrisp that went south the minute it took an update from avrstudio. I managed to fix it by manually updating it. The trouble is the power source + & - should only be connected when upgrading and NO other signal lines (i.e. MISO, MOSI, SCK, RST, etc)

You might find similar solutions for your stk500 in the avrstudio help menu, or ask on avrfreaks.com.

I use an avr910 programmer I built myself. AVRPROG does not recognize the atmega16, but the above program I uploaded does, and it works great.

You can use the avr910 on avrdude as well.

Good Luck
 

unlock fuse bit atmega8

ctownsend: do you have avr910 layout ?

I'm not sure if i'm doing something wrong or what... I've build parallel programmer and it doesnt recognize any AVR chip. Also i have two avrisp, avrduper on which i cant upload firmware. (well i upload it, but windows still doesnt recognize usb device) and i have that stk500 which is bricked. All i have left is EasyAVR3 board but i cannot reset fuses with it ...
 

    V

    Points: 2
    Helpful Answer Positive Rating
how to unlock atmega16 with ponyprog

here is all you need for avr910. This firmware will work in a AT90S2313 and probably an attiny2313, however the programmer cable you need to build to "program the programmer" will only work with the at90S2313.

***EDIT*** see the post on March 10, there is a new file and schematic for the attiny2313 to work as avr910*****

This is the easiest programmer for any avr, unfortunately it only supports older avr's that are hard to find.

Attached are the avr910 schematic, and all docs pertaining to avr910. Also included is the hex file that belongs in the micro controller for avr910.

I also included a very easy programmer cable you can build with just 3 resistors that will program the 90s2313 so you can get the avr910 code programmed in the 90S2313. In the FBPRG.zip file you will find a schematic of the cable and a boot floppy image. Run the exe file and it will create a DOS boot disk for you.

Once you have the cable connected to the 90S2313, put the boot disk in, and start your pc. It will erase, program and verify your 90S2313 all on its own. I use this on a pentium 4, 2GHz machine and it never fails. If it does not work for you, then try supplying the 90S2313 with a separate CLEAN 5V power supply. If you do this, make certain you disconnect the 3 resistors going to your parallel port!!

ALSO:
give me a list of the avr's you cannot program. I am working on a VERY SIMPLE way to fix the CKSEL fuse problem (I myself pulled out my hair last week programming an atmega16, but I have an expensive Labtool 48XP Parallel programmer to reprogram the CKSEL fuses if they get messed up)

I should have a solution in the next few days using the simple FBPRG cable in the fbprg zip file attached here.

Good Luck
 
fuse bits expected signature

Thanx, ill give it a try.

Well i', struggling with Atmega16 on which i have selected external low-freq crystal (dont know why :) ), also one Atmega8 and one old mega 8535 on which i mistakenly press reset button while it was in program mode. There is also one Atmega128 and Atmega32 that i cant verify if they are alive or not cause all of my ISP programmers doesnt work.

Ill try to convert your startup program for usb boot, cause i dont have floppy on any of my PC's. If it only needs direct access to interrupts, ill try with Hirens boot disk to go to dos mode.

I'll let you know how it went.
 
attiny2313 restorer

Although it now sounds like a problem with your dev board, you didn't need to buy an oscillator. You could have programmed another AVR to act as an oscillator, and save you the trouble of shipping costs etc. ATtiny24 costs something in the region of 90pence (0.90 GBP), but a spare mega8 would have sufficed.

Here's a schematic for a stupidly simple (but occasionally dangerous) programmer cable that uses the parallel port (Also Here). I use this one myself and it works fine (sometimes it kills an AVR due to it being an unbuffered design). Although a buffered cable is advisable.
 

reseting fuse on atmega8

Try these files. One is an ISO image for a CD (if you don't have a floppy) and one is a floppy image. Your PC must have a parallel port. I really don't know if it will work with a usb to parallel adapter. Please let me know if it does.

If you build the cable exactly as in the schematic, it will work always (provided you have no parallel port problems or you didn't disable the spien fuse!)

Just insert floppy or CD, and hook up the programming cable. Select device to restore and that's it. You must boot from this disk! Do not run in windows!!

I tested every one of the devices in the list and they all work, even on my pentium 4, 2GHz machine.

What this does is restore fuse settings back to factory settings, You can do this with any avr ISP programmer, however the cable is very simple to build and since it works in PURE DOS, you won't have the dreaded driver permissions headache in windows!

You can add devices in the list by modifying the menu. Or just add batch files and run them in straight dos.

Attached is also a screen shot of the program.

There are lots of "more glorified" ways of doing this, HOWEVER, the cable is so easy to build and costs practically nothing. I always find the simple things work the best when you run into problems.

Good Luck

P.S. You don't need the exact same oscillator as in the schematic. As long as you stay within the limits of your avr, it should be fine. You can use anywhere from 1 MHz - whatever speed your avr will operate at reliably.
 
avreal erase attiny2313

Tuxic said:
Although it now sounds like a problem with your dev board, you didn't need to buy an oscillator. You could have programmed another AVR to act as an oscillator, and save you the trouble of shipping costs etc. ATtiny24 costs something in the region of 90pence (0.90 GBP), but a spare mega8 would have sufficed.

Here's a schematic for a stupidly simple (but occasionally dangerous) programmer cable that uses the parallel port (Also Here). I use this one myself and it works fine (sometimes it kills an AVR due to it being an unbuffered design). Although a buffered cable is advisable.

how is he going to program the attiny24 if his programmer is not working?
If you are going to order an attiny24 and pay shipping costs, you may as well just order the oscillator and be done with it. I think for some people writing the code to simulate an oscillator would a great deal more difficult than just buying the right part.

And besides you can always pull one off an old junk electronic device for free.

Also do you not think a simple exe program for dos is easier than whatever you posted above? Forgive me for sounding stupid, but how do you run this? Does it need to be compiled?

Is that easier?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top