Atmel Atmega micro controller if set correctly will work fine. But when you tinker with its setting. Things get out of control. One such problem is when you set the wrong fuse setting of the device to use the external crystal oscillator.
- Connect the microcontroller with the USBASP programmer
- Open the command prompt
- write the command
avrdude -c usbasp -p m32 -t
- This will open a terminal where you will write
- Note down the settings
- Then write
- Calculate the correct fuse setting and then write
avrdude -c usbasp -p m32 -U lfuse:w:0xe1:m -U hfuse:w:0x99:m
These setting specified in the above post is incorrect.
Calculate the fuse setting in advance
Also remember the JTAG pin will also be set correctly
Never Change SPI setting without reading document. Changing this setting will result in non-functioning of SPI and the programming can only be done with manufacturer programmer.
The above said procedure is verfied on the follwing micrcontrollers: