LA72 wrote: Czang16 wrote: I have this question. How to lock the micro-controller for testing purposes to unlock it later thanks to the doctor?

Thanks in advance for reply.
Disable SPI in fusebits. This is the most common problem.
If the Czang16 coll. Uses USBasp or other serial programmer (MISO, MOSI, SCK + RESET) it cannot access SPIEN bit because:
Quote: The SPIEN Fuse is not accessible in Serial Programming mode.
so it may not be the most common problem.
It can, however, change the function of the RESET pin to a regular pin, eg PC6 in ATmega8.
It can also change the clock settings:
- for e.g. external quartz and do not connect quartz,
- or to an internal one other than the default setting eg 4MHz in ATmeag8 - this is the safest option and Fusebit Doctor will change back to the default 1MHz in this microcontroller.