Me and my unorganized thoughts

Category: Electronics

Recovering ATmega with wrongly programmed fuses

Today I did a big mistake. I programmed wrong fuses on ATmega328P. Of course it was the fuse that sets external oscillator value instead of internal one.

I tried to fix it with STK500 programmer and Atmel Studio but without any luck. Then I started searching for solutions and I found one that worked in the end.

If you overload external oscillator with high frequency, you will be able to erase chip, and erase fuse settings. First I tried this with STK500 and Atmel Studio but without any success.

Then I tried small USBASP programmer and eXtreme Burner – AVR software and it could detect chip but not erase it. Because I supplied oscillator clock from signal generator I was able to change frequencies and to try to find which one would work. I have tested first clock simulation on 3-10KHz, but the one that worked for me was 4MHz with 5V amplitude, square wave. I was able to erase chip and then program it the right away. Just connect signal from signal generator to XTAL1 pin and you are good to go.

Of course, this took some time to do because of the following:

  • USBASP that I had was China copy, that Windows couldn’t recognize so I had to reprogram it with STK500
  • Then Windows wouldn’t recognize it or allow me to install driver because it wasn’t signed
    • To solve this press shift and restart Windows
    • On boot menu chose that you want advanced options
    • Then select startup settings and restart
    • When Windows restarts it will ask you which option do you want to enable or disable
    • Select “7. Disable driver signature enforcement”
    • Windows will boot and you can install driver that is not signed
  • You need to provide external power supply to the ATmega chip

Project log: Cyclone PCB factory – part 1

Yesterday I have started building Cyclone PCB factory, a small PCB cnc machine with 3D printed parts. I have browsed a bit trough my parts stock at home that I have after lot of building and rebuilding of different kind of 3d printers and found that I almost have everything needed and everything that I don’t have is ordered from Aliexpress so I’ll write updates as the project goes.

Parts that I have right now:

  • Ramps and Arduino mega
  • stepper motor drivers
  • 1 NEMA 17 motor
  • threaded rods
  • B608ZZ bearings
  • washers, nuts and screws
  • power supply that can deliver 12V
  • 3d printer to print out parts

Continue reading

© 2022 Amar Kulo

Theme by Anders NorenUp ↑