Erasing the Programming of Locked Atmega ...

Status
Not open for further replies.
how can these commands control the sck frequency without reprogramming the atmega8 of USBasp or closing the slow sck pins

you have to use this code in your usbasp programmer. remove the jumper and never use it again. ( I don't know if the pin used for the jumper is configured as an input in this code, so it's better not to use the jumper in case)

here is the hex file for an atmega8:
Code:
:100000003BC0A6C154C053C052C051C050C04FC025
:100010004EC04DC04CC04BC04AC049C048C047C08C
:1000200046C045C044C0040309041C0377007700A0
:1000300077002E00660069007300630068006C00A2
:100040002E00640065000E0355005300420061005D
:100050007300700012011001FF000008C016DC05DB
:1000600003010102000109021200010100801909C7
:10007000040000000000000011241FBECFE5D4E002
:10008000DEBFCDBF10E0A0E6B0E0E0EFFEE002C0D2
:1000900005900D92A236B107D9F710E0A2E6B0E0C4
:1000A00001C01D92A73AB107E1F7C3D41FC7A8CF7B
:1000B00085B7836085BF8BB780648BBF08951F931E
:1000C000CF93DF9360918800635067FD13C08091E8
:1000D0008500CCE0D0E0C81BD109C457DF4F809128
:1000E00084008D3209F462C08091620087FD84C073
:1000F000109288008091600084FF4AC06091610086
:100100006F3F09F445C0693070F168506093610039
:100110008091780098E889278093780068E0809142
:10012000620087FD8BC0209186003091870086FF9A
:100130006DC0A9E7B0E080E090E0F901E80FF91F99
:10014000E491ED9301966817C1F76150862F90E016
:100150006F5F0196820F931F9093870080938600B4
:10016000162F1C5F0BC0109261008091780098E8F8
:10017000892780937800662391F614E089E790E060
:10018000E3D01C3019F08FEF809361001093600072
:1001900094E186B3837031F49150D9F710928900BD
:1001A00010928300DF91CF911F910895683009F07C
:1001B0009FCF83EC809378008AE580936000109253
:1001C00062008881807659F59A8110928100898138
:1001D000882309F043C01092820022E081E890E079
:1001E00090938700809386008F81882319F49E81E5
:1001F000921708F1922F1FC0CE012CD48F3F51F1DE
:10020000882309F475CF1092610072CF962FD9011F
:10021000E9E7F0E08D9181939150E1F796CFCE011F
:100220000BD5282F8F3F01F7888187FD25C09FEFD1
:1002300080E880936200909361005ACF89E790E054
:10024000ABD4682F893008F453C08FEF80936100DE
:100250001EE19CCF8EE1809360004ACF853071F023
:10026000863091F0883031F1893061F18A3031F196
:1002700020E081E890E0B4CF9E81DACF90938900AE
:1002800020E081E890E0ACCF8B81813049F1823071
:10029000F9F0833029F020E080E480936200A4CF5D
:1002A000992349F586E290E0909387008093860039
:1002B00024E0F2CF21E08BE890E092CF21E081E8CA
:1002C00090E08ECF90938B0020E081E890E088CF83
:1002D00086E690E0909387008093860022E1DCCF51
:1002E00084E590E0909387008093860022E1D4CF4C
:1002F000182F1C5F43CF913051F0923061F686E4A5
:1003000090E090938700809386002EE0C5CF8AE22C
:1003100090E090938700809386002CE1BDCFA82FBA
:10032000B92F80E090E041E050EA60956F5F58F4AB
:100330002D9138EF82279795879510F08427952780
:100340003F5FC8F3F3CF0895EADF8D939D9308953F
:10035000CF93CFB7CF93C395B09BE9F7B09B09C0BC
:10036000B09B07C0B09B05C0B09B03C0B09B01C051
:10037000A1C0DF93C0918500DD27C457DF4FB09B3C
:1003800002C0DF91EBCF2F930F931F9306B32FEF94
:1003900000FB20F94F933F9316B34FEF012700FB6B
:1003A00021F93BE031C04E7F012F16B3216028C0F8
:1003B000102F4D7F2260000006B329C04B7F2460C0
:1003C000012F000016B32BC016B3477F28602AC048
:1003D0004F7E06B320612CC04F7D16B320622FC024
:1003E0004F7B06B3206432C0422706B349934FEFD8
:1003F0000000102710FB20F916B31370C9F1297FF4
:1004000091F2012700FB21F906B3237F89F23150D5
:1004100058F1102710FB22F916B3277E79F2012735
:1004200000FB23F92F7C81F206B3102710FB24F97F
:100430002F7971F200C016B3012700FB25F92F7345
:1004400059F200C006B3102710FB26F9223040F203
:1004500000C016B3012700FB27F9243028F64F7798
:10046000206816B30000F9CF10E41ABF002717C0A8
:100470003B503195C31BD04010E41ABF0881033CA8
:10048000E9F00B34D9F0209183001981110F121378
:10049000EDCF093641F10D3211F0013E39F70093ED
:1004A0008A003F914F911F910F912F91DF91CAB711
:1004B000C6FD51CFCF91CFBFCF91189520918A0023
:1004C000222379F310918800112311F5343012F1B1
:1004D0003093880020938400109185003BE0311B0D
:1004E0003093850017C00091880001308CF40AE534
:1004F0003091600034FD10C000936000C8E7D0E088
:100500000FC02795A8F45150A9F4220F0000F9CF8D
:100510004AE503C042ED01C0432FC4E1D0E032E020
:1005200017B31360C09A17BB08B320E413E05F93BE
:10053000012756E008BB279520F4515021F4220FE3
:10054000F9CF012756E000003B5A08BBD0F22795AF
:1005500028F4515029F4220F0000F9CF012756E06A
:10056000279508BB20F4515021F4220FF9CF012721
:1005700056E02991332308BB21F60C7F10918900A6
:10058000110FC651D04008BB11F01093830010E446
:100590001ABF016017B31C7F402F4C7F5F9100C0D2
:1005A00000C008BB17BB48BB7CCF8091A5008DB9AC
:1005B0008091A2008EB90895282F8823A1F0883059
:1005C00008F03FC085E793E09093A4008093A300D8
:1005D000243001F12530A0F0263081F1263050F191
:1005E0002730E1F0089586E993E09093A40080938A
:1005F000A30082E58093A50081E08093A200089586
:100600002230A1F0233070F4213061F780EC809328
:10061000A600089588E18093A600089583E0809362
:10062000A600089580E38093A600089580E6809355
:10063000A60008958CE08093A60008952093A6005C
:10064000089586E993E09093A4008093A30010920C
:10065000A200293041F02A3050F4283051F683E5C9
:100660008093A500089582E58093A50008952B301E
:1006700031F02C3009F0BDCF81E08093A20081E5FC
:100680008093A500089522B79091A60082B7821B9F
:100690008917E0F3089587B38C6287BBC298C59829
:1006A00092B72091A60082B7891B8217E0F3C29A05
:1006B00092B782B7891B8217E0F3C2988091A3009A
:1006C0009091A4008659934009F008958091A50067
:1006D0008DB98091A2008EB9089587B3837D87BBC1
:1006E00088B3837D88BB1DB80895582F2091A6003C
:1006F00040E030E057FD16C0C398440FB4994F5FF7
:10070000C59A92B782B7891B8217E0F3C59892B752
:1007100082B7891B8217E0F33F5F383029F0550F0D
:1007200057FFEACFC39AE9CF842F08958FB9779BFB
:10073000FECF8FB108950F931F930FE1E091A300B7
:10074000F091A4008CEA0995E091A300F091A40037
:1007500083E50995E091A300F091A40080E009955C
:10076000182FE091A300F091A40080E009951335C3
:1007700039F11DB8C59A92B72091A60082B7891B9E
:100780008217E0F3C59892B782B7891B8217E0F30E
:10079000E091A300F091A40083E0E639F80721F08E
:1007A000002351F00150CECF8091A5008DB98091EA
:1007B000A2008EB90023B1F781E01F910F91089537
:1007C00080E01F910F910895EF92FF920F931F9376
:1007D0007B018C01862F8170880F880F880FE09134
:1007E000A300F091A40080620995D801C70129E017
:1007F000B695A795979587952A95D1F7E091A3008F
:10080000F091A400099516950795F794E794E09167
:10081000A300F091A4008E2D0995E091A300F09122
:10082000A40080E009951F910F91FF90EF9008952B
:100830000F931F938C01E091A300F091A40080EA34
:100840000995E091A300F091A400812F0995E09112
:10085000A300F091A400802F0995E091A300F091EE
:10086000A40080E009951F910F910895FF920F93C6
:100870001F938C01F62EE091A300F091A40080EC70
:100880000995E091A300F091A400812F0995E091D2
:10089000A300F091A400802F0995E091A300F091AE
:1008A000A4008F2D09958EE1B7D080E01F910F91A4
:1008B000FF900895CF92DF92EF92FF920F931F93D4
:1008C0006B017C01142FE091A300F091A4008CE453
:1008D0000995D701C60149E0B695A79597958795E3
:1008E0004A95D1F7E091A300F091A4000995D701B2
:1008F000C601B695A79597958795E091A300F091CD
:10090000A4000995E091A300F091A40080E009956E
:100910001F3FF1F012B70EE1C701B60155DF8F3F5F
:1009200079F482B7811B8D33B8F312B70150A1F768
:1009300081E01F910F91FF90EF90DF90CF9008958D
:1009400080E01F910F91FF90EF90DF90CF9008957E
:100950008FE062D080E01F910F91FF90EF90DF90C9
:10096000CF900895CF92DF92EF92FF920F931F9353
:100970006B017C01042F122F862F8170880F880F46
:10098000880FE091A300F091A40080640995D7013D
:10099000C60169E0B695A795979587956A95D1F7B1
:1009A000E091A300F091A4000995D701C601B69586
:1009B000A79597958795E091A300F091A4000995DC
:1009C000E091A300F091A400802F09951123C1F0BC
:1009D0000F37F1F012B70EE1C701B601F5DE8F3720
:1009E00079F482B7811B8D33B8F312B70150A1F7A8
:1009F00081E01F910F91FF90EF90DF90CF900895CD
:100A000080E01F910F91FF90EF90DF90CF900895BD
:100A10008FE002D080E0F5CF382F882349F020E026
:100A200092B782B7891B8C33E0F32F5F2317C0F393
:100A3000089512BA18BA8BEF81BB8FEF87BB17BA34
:100A400093E094BB8EEF85BB93BF32DB789437DBAA
:100A500036DBFDCFFF920F931F93CF93DF93F82EDA
:100A6000292F062F40916300413051F0443041F06E
:100A70001FEF812FDF91CF911F910F91FF9008956C
:100A8000002309F487C08F2D922F9C01E90110E00B
:100A900053C08091740090917500892B09F058C063
:100AA000609170007091710080917200909173005C
:100AB00021E0488157DF80916400909165000197A3
:100AC0009093650080936400892BD9F410926300A1
:100AD0008091760081FF3AC08091770090E020916C
:100AE0007400309175008217930781F16091700056
:100AF0007091710080917200909173004881DADEEC
:100B000011E08091700090917100A0917200B091FD
:100B100073000196A11DB11D809370009093710028
:100B2000A0937200B093730021969E012F19201795
:100B300008F09FCF40916300413009F4AACF68814B
:100B4000809170009091710091DEB5CF11E0D9CF06
:100B500060917000709171008091720090917300AB
:100B600020E04881FFDE80917700815080937700FC
:100B7000882309F0A0CF609170007091710080917E
:100B8000720090917300488195DE8091740080938B
:100B9000770091CF10E06DCF0F931F93CF93DF932A
:100BA000082F162F40916300842F8250823038F036
:100BB0001FEF812FDF91CF911F910F910895662331
:100BC00099F1802F9C01E90120C0809170009091E3
:100BD00071002EDE88838091700090917100A09149
:100BE0007200B09173000196A11DB11D8093700039
:100BF00090937100A0937200B093730021969E01B0
:100C0000201B211778F4409163004230F1F6609187
:100C10007000709171008091720090917300D4DD2A
:100C20008883D9CF183028F610926300812FDF9186
:100C3000CF911F910F9108950F931F93CF93DF933F
:100C40008C01EC0189818130F1F0823009F4B0C06F
:100C5000833031F1843009F482C0873009F456C002
:100C6000853009F41EC1863009F4D7C0883009F4F4
:100C7000A5C0893009F41CC18A3009F42DC180E077
:100C8000C8E6D0E037C09A9B3EC08091660094DCF5
:100C900010926700A998FFDC80E0C8E6D0E02AC087
:100CA000E091A300F091A400E8018A810995C8E6CB
:100CB000D0E0809368002091A3003091A400F80157
:100CC0008381F9010995809369002091A3003091F7
:100CD000A400F8018481F901099580936A002091AC
:100CE000A3003091A400F8018581F9010995809352
:100CF0006B0084E0D0938700C0938600DF91CF9192
:100D00001F910F91089585E057DCC2CF8091670055
:100D1000882399F4E8019B8180E02A8130E0822BCE
:100D2000932BAA2797FDA095BA2F809370009093DC
:100D30007100A0937200B0937300F801978180E076
:100D4000268130E0822B932B909365008093640082
:100D500083E0809363008FEFC8E6D0E0CBCF809133
:100D60006700882399F4E8019B8180E02A8130E0C4
:100D7000822B932BAA2797FDA095BA2F8093700002
:100D800090937100A0937200B0937300F801978163
:100D900080E0268130E0822B932B90936500809336
:100DA000640082E0809363008FEFC8E6D0E0A2CFBA
:100DB00094DCA99A80E0C8E6D0E09CCF80916700DF
:100DC000882399F4F801938180E0228130E0822B1E
:100DD000932BAA2797FDA095BA2F8093700090932C
:100DE0007100A0937200B09373001092750010927E
:100DF000740010927600E8019F8180E02E8130E03F
:100E0000822B932B909365008093640084E0809301
:100E100063008FEFC8E6D0E06DCF80916700882334
:100E200099F4E8019B8180E02A8130E0822B932BAA
:100E3000AA2797FDA095BA2F809370009093710018
:100E4000A0937200B0937300F80184819581292FDB
:100E50002F7020937600492F50E0407F50704295CC
:100E60005295507F5427407F5427480F511D50936F
:100E700075004093740020FF02C040937700E801A2
:100E80009F8180E02E8130E0822B932B9093650030
:100E90008093640081E0809363008FEFC8E6D0E028
:100EA00029CF49DCC8E6D0E08093680081E022CFFA
:100EB00081E080936700F80182819381A481B581EC
:100EC0008093700090937100A0937200B0937300B0
:100ED00080E0C8E6D0E00ECFE8018A81809366000A
:100EE000C8E6D0E01092680081E004CFF894FFCF0C
:020EF0005AFFA7
:00000001FF
 

Re: Erasing the Programming of Locked Atmega ...using ISP Programmer

Hello Everybody,

Few days back I faced the same problem of locked Atmega and found this thread during search. Just coming to the point, I tried the following method and I hope that it can help many people who are facing the same problem. Please give your feedback with different microcontrollers.

1. I am using "ISP Programmer 1.2.0.55" from ISP Programmer | Adam's Site
2. Hardware: Parallel port ISP Programmer from AVRProg1.GIF (image). I used 470 ohms resistors.
3. Configure software according to your hardware. I attached screenshot of my setup according to the hardware.
4. Follow the steps as shown in the screenshots in attached rar file which are numbered.
5. After last screenshot step, you will go back to main screen. There click "Erase" to erase your microcontroller.
6. Then select "Autodetect" and "Read signature". Done.
7. I tested this method on ATmega88P and ATmega328P successfully.

Waiting for your feedback.

With kind regards,
Owais
 

Attachments

  • How to reset locked AVR.rar
    265.8 KB · Views: 203

Re: Erasing the Programming of Locked Atmega ...using ISP Programmer


Nice try..

Just a reminder :
It can reset the locked avr's with fusebit settings for external crystal, but if serial programming is locked this wont work.
 

Re: Erasing the Programming of Locked Atmega ...using ISP Programmer

Has anybody repaired atmega128 by avr fuse doctor.
 

Correct me if i am wrong: with simple ISP programmer you cannot lock yourself out? I mean there is no way you can change SPIEN, so all you can do i set atmega8 to "wait" for external oscillator? Am i right?
 

Correct me if i am wrong: with simple ISP programmer you cannot lock yourself out? I mean there is no way you can change SPIEN, so all you can do i set atmega8 to "wait" for external oscillator? Am i right?
You cannot program the SPIEN fuse using ISP, therefore you won't lock yourself out this way.
usually the problem is with the CKSEL configuration where the wrong settings are mistakenly programmed.

When an external oscillator is connected to XTAL1, the device can usually be brought back to life.
If not, then you need a parallel programmer or fuse repair programmer like the ones in the links I posted above.
 

Yep, thx, just revived my ATmega8 used 1 small wire from USB AVR ISP programmers QUARTS to atmega8 XTAL1 - done!

---------- Post added at 18:08 ---------- Previous post was at 17:38 ----------

Anyways - i have problems with my atmega8 and FTDI chip used as USB2serial converter... i receive trash on com port i think, something wrong with boudrates and $crystal settings using BASCOM-AVR
Anyone have some ideas? I am beginner in all this...!
 

Just discovered that if you program the RESET pin of ATMEGA8 as port pin (C6), you cannot reporgram the IC using ISP. This is becuause the ISP uses the external reset pin. The Only way to ersase the chip now is to use a parallel programmer. It cost me 4 ICs to discover that.
 

Yes that is correct but note that you can't program the RSTDISBL fuse from an ISP programmer , you can only do this from a parallel programmer.
This means that when using a serial ISP programmer there is no way to disable reset and lock yourself out.

Alex
 

You can do that. That is exactly what I did and rendered 4 ICs useless as I dont have a parallel programmer adapter for ATMEGA8-AU (TQFP). I programmed the reset-disable and could not reprogram the chip again. I had to replace the chip.
 

I had similar thing but what i did, was setting external crystal, external clock etc... so i made small app for parallel port to togle one pin on and of, (low freq. external clock) and one time i set i to external high freq. crystal - so i soldered external crystal to revive my atmega so i think you may have something similar...
 

I'm not sure because I have never done this but I may have misinterpreted the datasheet footnote

mega8 datasheet http://www.atmel.com/atmel/acrobat/doc2486.pdf
page 216

footnote 4

4. When programming the RSTDISBL Fuse Parallel Programming has to be used to change
fuses or perform further programming

I thought that this meant that you couldn't change the fuse from a serial programmer but I think you are right and it says that if the reset fuse is changed then you need a parallel programmer.

Alex
 

Re: save source code from a locked attiny2313

Does it works if SPIEN bit of High Fuse is Disable? I am facing problem. I am using Atmega 32
 

The parallel programming method can work even when the serial programming is disabled.
 

The parallel programming method can work even when the serial programming is disabled.

AVR are programmed through using MISO, MOSI, SCK & RST signals. So in that case can I can program the avr in parallel mode and can I change back SPIEN bit?
Please refer me software and hardware schematic of programmer.
Thanks in advance.
 

Refer to post #131 https://www.edaboard.com/threads/131804/#post774771

---------- Post added at 00:27 ---------- Previous post was at 00:25 ----------

The original page is **broken link removed**

---------- Post added at 00:31 ---------- Previous post was at 00:27 ----------

There is also the alternative of a programmer as shown
 

Thank you alexan_e. AVR Fuse bit doctor uses another mcu that contained a firmware I am searching for a circuit that can repair SPIEN bit directly through parallel or serial port through pc program without using firmware of another MCU... Is there any such circuit or program??
 

See the last link in my previous post (elm-chan), he also provides the application used with the programmer at the bottom of that page

Alex
 

I have seen this one. I just want to know does it work? I am not tested yet so I am looking for feedback..
 

I haven't tested it either, I have never locked an AVR so there wasn't a need for a parallel programmer.
It is an old one and I believe it is operating properly.
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…