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.
atmega16 factory restore

Ctownsend excellent idea!!! All my AVRs unlocked!!! Bottle of whisky is reday for you in Prague!

For anybody else. I put 100R resistor between AVR and clock source for safety. my programmer did just two processes:
1. erase mcu
2. reprogram all lock and fuse bits

Unsoldering Xtall and capacitors is not necessary

I used my homemade programmer.

Thank you once again for sharing Ctownsend!!!

b
 

atmega88 device signature

bohumilfulin said:
Ctownsend excellent idea!!! All my AVRs unlocked!!! Bottle of whisky is reday for you in Prague!

any Canadian whiskey in Prague? :))
 

pony cksel attiny2313

be sure.
but Canadian?

As I can see, you urgently need a scottish single malt whisky training. Also we add cigars smoking and beer pub crawl.

Normal triathlon.

cheers!
 

fuse restore attiny2313

Wow, so we have a party in Prag? Ok, i can be there in about 4hours if i catch the next flight :)

I'll try CD thing ...
 

save source code from a locked attiny2313

ScOe said:
So you say i can use any crystal for chip i'm going to program ? 4Mhz will be ok ? Well i have 4mhz oscillator as it came few weeks ago so basically i just connect output of oscillator to xtal1 or xtal2 ? or is it the same ?

NO, you MUST use an oscillator. As long as the frequency is within the limits of the avr, (the lower the value the better) A crystal will not work. Connect the output of the oscillator to xtal1 of the avr.

Here is another version that does many more avr's. It works. I fixed all the messed up avr's I have here.

Remember to boot from the disk, do not run in windows.

Good Luck
 

avrdude yikes

Ok, thanx ... Yeah i saw i need to use oscillator as soon as i opened .zip file and saw schematic :)

I'll play with it tomorrow as it is quite late here :)
 

unlock attiny2313

ctownsend said:
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?
Firstly, my grammar indicated a recognition that ScOe's programmer was not working. Secondly, I was throwing an idea into the ring. As far as I am aware, I was trying to be helpful by suggesting another alternative to buying an oscillator. I did not make a demand that an ATtiny24 be bought. Also, I noted that ScOe has other AVRs available to him/her, as the other posts have indicated. Maybe programming an AVR to act as an oscillator would be overly complex, but if a spare AVR happens to exist in ones component trays, then it saves buying something and be burdened with P&P charges.

What I have posted is a .zip file. It contains a jpeg, text files, a postscript file, a gschem symbol file and a gschem schematic file (all that information is provided by the README file in the .zip archive.) There are no code files at all. It is simply a re-package of one of my project archives for convenient downloading. I normally roll Bunzip2 compressed "Tape ARchive" (tar) file instead (in .tar.bz2 extension), but EDA Board wont allow one of those to be posted. A tar file is a Unix archiving file, much like .zip, .rar etc. except that it doesn't compress without a compressing library such as bunzip2 or gunzip. WinRAR can easily handle a .tar.bz2 (can also be labeled .tbz2), for those who use Windows rather than a Unix variant.

Besides, .exe files tend to be Windows executable binary files. I am not a Windows user. Thus, I have no reason to program for, or be in the possession of any .exe files (although I am in possession of some as I run some Windows only programs via virtual machines and emulators.) I am aware that you have no way of being aware of my not being a Windows user, but I would appreciate not having my throat jumped down for trying to offer my two pence.

Thanks,
Nathaniel.
 

ponyprog unlock atmega

I tried your fusefix dos proggy but it failed to do anything... I received message:
cant resync
Reset pin released

Ive meassured voltage on reset pin and it always stay high. There is no low period while reseting avr... I dont have other mobo with parallel port. Now that would be a charm if i need to buy another mobo just to clear the fuses on few chips ;)

Usb to parallel will not work cause dos would have to have driver for usb chip to interpret commands to lpt...

Can atmel original stk500 or mkii repair fuses? Im going mad with homemade programmers that doesnt work...
 

unlock atmega8

ScOe said:
Ive meassured voltage on reset pin and it always stay high. There is no low period while reseting avr.
The reset is brought low and then high very fast, so you cannot measure it with a voltmeter.
ScOe said:
Can atmel original stk500 or mkii repair fuses? Im going mad with homemade programmers that doesnt work...
Any avr ISP programmer can reprogram fuses as long as you have an oscillator connected to xtal1 on your avr. (provided you did not disable the SPIEN fuse, in which case you need a high voltage parallel programmer.)
The STK500 IS a high voltage parallel programmer.

Sounds like you have a parallel port problem. IF avreal does not work from the boot disk, either your cable is assembled incorrectly OR your parallel port is disabled in the bios, OR you have disabled the SPIEN fuse in every single one of your avr's (which is highly unlikely).

look here for some troubleshooting tips.**broken link removed**

Here is a program you can run in DOS (again another boot CD) that will display the status of your parallel port. If it does not detect a port, your port is either disabled in the bios or it is not working.

My disclaimer:
***Be careful when connecting the pins on the loopback*****
Read the doc file!!! Do not blame me if you blow your parallel port by not reading the instructions.

If your port is working, the results should look exactly like the screenshot (attached)
 

atmega16 fuses

Well it seems i have parallel port problem .. dont know if i can fix that ..
This image shows status of parallel program.
 

avrdude: initialization failed, rc=-1

First, I would check the bios settings for your parallel port.

If you don't know how, when you start your PC, you will see
"press del to enter setup" OR "press F1 to enter setup". Regardless, go into setup. You probably want advanced settings.

Just look at the settings for your parallel port. Try and get a screen shot of the settings screen & post it here.

You can also use debug.exe in DOS. I can't upload it here because I think its copywritten material.

First you need to check the output.
Wire up the anode through a 330 ohm resistor to the reset pin and the cathode to GND on your cable. (No avr connected)

copy debug.exe to your bootdisk.
boot from the disk into DOS, and type debug.
you will get a prompt: "_"

at the "_", type o 378 10
the LED should come on

Next, move the anode to MOSI pin on your ISP connector
at the "_", type o 378 20
the LED should come on

Next, move the anode to SCK pin on your ISP connector
at the "_", type o 378 40
the LED should come on

Now check the input pin, (MISO)
on your cable, join any one of the pins (MOSI, Reset, or SCK) to MISO.
at the "_", type o 378 FF

next, type
i 379
you should get a 0x7F byte back

next type o 378 0
now type i 379

you should get a 0x3F byte back

If this does not work, the bios settings may be wrong or your cable is not wired correctly, OR your port is defective.

What kind of PC is it?
 
locked atmega8

My PC is core2duo, intel P35, new bios update ... i'll try with debug and see what is going on .. well as for the cable, i tried with diode test on multimeter all pins. Cable is ok.

I've download debug.exe but cant insert it into a fusecd.iso .. which program are you using for editing iso image ? I tried with iso maker but when i insert file it removes boot sector ...
 

atmega168 reset disabled fix

Ok, i've managed to find msdos cd with debug ...
Now i tried those steps but i didnt understand what i need to do with pin 10 (MISO).

Those three commands in debug lit the diode ... So, do i need to connect MISO to one of the other pins ? Just jumpwire it ?

Edited...

All is working well ... so port is ok and cable is ok ..
 

atmega8 unlock

ScOe said:
All is working well ... so port is ok and cable is ok ..

If this is the case then you should be able to program an avr with the cable. It is highly unlikely that you have disabled the SPIEN fuse in every single one of your avr's.

What is the error message when you are running the fuse restorer program? Are you sure you have the oscillator's output pin connected to XTAL1 pin on the avr?

Here is a test you can do.

Try to read the signature bytes on the avr. Use the fbprg16.exe disk. Do not connect the programmer when the disk boots. Wait until it fails. Go to the a: prompt in DOS.

Hook up the programmer. Run fbprg16.exe at the DOS prompt, and try to read the signature bytes. It does not matter if you select the right device. If you get an error, try to post a screen shot here.

You can also connect the xtal1 pin on the avr to pin 5 on the parallel port to see if your oscillator is shot. (this may/may not help)
 

fix atmega isp problem

I started fbprg16 program and try to read signature while xtal1 connected to oscillator and it failed. I received 0xff 0xff 0xff 0xff as signature. That i connected xtal1 to parallel port pin5 and that gave something like 0x19 0xe. ... didnt wrote the output but it looked like it recognize chip signature. So it seemed that my oscillator is malfunction, but i've measure output freq of oscillator and it gave stable 4mhz as it should.

Oscillator is: 4mhz ecs-2100x
 

atmel fuse resetter

The signature bytes for an atmega8 are 1E 93 07. Even though FBPRG16 cannot read & write an avr that uses page read & write(most newer avr's) it will still be able to read the device ID. The command is the same in all avr's. I tried it with the programmer cable using the clock line from the parallel port on an atmega8, and it does work.

You can view the schematic when you are in FBPRG simply by selecting "show schematic". Triple check all your connections.

Otherwise, I do not know what to tell you. YOU REALLY SHOULD post a screenshot of your bios configuration for your parallel port. That way maybe someone will be able to help you.

Lastly, if you cannot get the parallel port to work, you must be able to get the serial port to work. You can use avr910 or the stk500. Sometimes the serial port is disabled in the bios. I had an IBM laptop that gave me NOTHING BUT HEADACHES with the serial port UNTIL I disabled the infrared detector. Its been great and trouble free since then.

You can also try another computer. I am sure you have a friend or colleague that will let you try the dos boot CD, just to give you piece of mind!

Your problem is challenging, but NOT impossible.
 

    ScOe

    Points: 2
    Helpful Answer Positive Rating
parallel programming locked mega atmel

The signature bytes for an atmega8 are 1E 93 07. Even though FBPRG16 cannot read & write an avr that uses page read & write(most newer avr's) it will still be able to read the device ID.
I was able to read device ID via parallel port clock, but while using external oscillator on xtal1 than it fail's. So than i tried fuse reset with xtal1 on parallel pin 5 and succeed. All locked avrs are now unlocked and ready for business!! Thanx !!

But now i dont understand why it failed to read chip with external oscillator ? Also, i would like to make that Avr910 programmer. Would it be possible to program Attiny2313 with that DOS proggy you uploaded ? It is hard to find 90s2313 (well at least with reasonable price. It is around 10$ here and tiny is 2$)

P.S. you deserved helped points :)
 

restore attiny2313 to factory settings

ScOe said:
But now i dont understand why it failed to read chip with external oscillator ?
Try unplugging the parallel cable, disconnect the power to the programmer, plug it all in and try again. Try it a few times. I think sometimes the reset may not be released or one of the data lines. The straight cable is not a very good design, but it is easy for people to use as an emergency (NOT IN WINDOWS!, with no drivers to worry about)
ScOe said:
Also, i would like to make that Avr910 programmer. Would it be possible to program Attiny2313 with that DOS proggy you uploaded ? It is hard to find 90s2313 (well at least with reasonable price. It is around 10$ here and tiny is 2$)
I re-did the avr910 programming disk for the attiny2313.
****PLEASE observe the changes on the schematic****!
The only way I could test it was to use it on my homemade board. (that's the reason for the changes) The differences are the LED runs off PB2, and the board uses a 3.6864 crystal (not a 7.3728 MHz as in the previous schematic) The schematic has been included in these zip files and has been UPDATED. In fact the code that I posted before probably does not match the schematic. I will delete it.

The NEW hex file has the necessary changes for the attiny2313 to work as an avr910 programmer using the serial port. If you boot from the CD or the floppy (attached here), it will just program the code and the fuses PROPERLY to your avr attiny2313.

ScOe said:
P.S. you deserved helped points :)

Well I like to help. The fuses thing is complicated to say the least! Everything was great with the older avr's (the at90s series) then atmel had to go and make things complicated.

I myself had difficulty figuring it out because the CKSEL fuse settings in the attiny2313 datasheet (page 26 table 4) are shown as "CKSEL 3...1" in the table.

WELL there is NO MENTION of CKSEL0 in the table (it is in small print below) which I missed and was pulling my hair out trying to figure out why the device does not work!!!

So once you know your way around how to set the fuses, (and how to fix them) it is easy.

When I program any avr (and it works in my circuit) I take note of the 3 fuse bytes (Ext, HIGH & LOW) and copy those notes to the source file or folder, so next time I am not LOST.

Well I hope others can make use of these files.
Best of Luck
 

expected signature for atmega16 is 1e 94 03

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

hey Tuxic ,
I am neww to avrs and locked up with my mega8
can u tell the software that can be used with DAPA Programmer.
I think I have mssed up with lock bits .Is there any way to restore them.
(It shows error -24 in pony prog )
 

atmega spien disabled

I had the same fuses problem with ATmega32. I had no 4Mhz generator and instead I programmed attiny13 to be a clock-source. tiny13 used internal RC-oscillator. On each timer overflow I changed portb's bit (output). Here are some hints that i've learned:
1) It turned out that only the slowest possible clock rate worked well (4Mhz int. osc., internal divider by 8, timer prescaler = 64, initial timer counter value = 0).
2) No need to make a new programmer. ISP worked in the same circuit where I programmed a wrong fuse.
3) attiny13-generator needed 33 Ohm resistor between the output port and atmega's XTAL1 (130.0+ didn't work in my 3.3V circuit)
4) desoldered only XTAL2 pin (keep open). Other circuit elements were still connected as in usual ISP-session.
5) no erasure needed. read fuse, write fuse.
6) It's a pleasure to know that in mega32 (and may be in all megas) its impossible to disable SPI programming by SPI programmer (i.e. to change SPIEN fuse).
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top