change fuses for external oscillator
change fuses for external oscillator
I bought five microcontrollers ( MC ) ATtiny2313-20pu from the Chinese (serious guys, I often buy from them) .
I turn on AVRDUDE_PROG , connect USBASP Programmer
with a breadboard (reliable and tested a hundred times),
I upload the firmware and here you go, an error, the Stone is not detected. At first I was upset, due to “inexperience”, it was a shame for a half of “greens”, but then I simply ordered five other ATtiny2313-20pu microcontrollers from other Chinese (also serious guys, I also often buy from them) . As always, I was lucky, the same batch, the same production date and everything repeated itself. And here I “turned on my brain”. For 10 “greens” I dug through a lot of resources on the topic of “Locked Fuses” and came to the conclusion: – there is a chance. We are used to receiving an MK clocked from an internal generator when buying, but this is not the case.
I had to install a 16 MHz quartz crystal as an external clock source and two 18 picofarad capacitors.
I immediately reflashed the fuses correctly, it should be like this:
————————————————– —————-
this was the case when I bought it, I only saw it after connecting the quartz, before that all the cells in the program were empty:
———————————————
After programming the fuses, everything fell into place and the need for quartz disappeared. You can solder quartz without capacitors, but it is more reliable with them.
Quartz is suitable from 1 MHz to 20 MHz (16 MHz in my case).
If you accidentally wrote RSTDISBL or somehow abandoned SPIEN, then this method will not help here, then you need a parallel programmer.