Search code examples
avratmelatmelstudio

How should I set the bits when doing software protection?


I am using atmel studio and usbasp.I am using this code:

C:\WinAVR-20100110\bin\avrdude -c usbasp -p t85 -Ulock:w:0x00:m

You can look picture for settings lock bits in datasheet.

image is here

You can look picture.Is there a difference between making 0x00 and 0xfc?I am not sure.

0x00= 00000000

0xfc= 11111100

The important thing is the 0th and 1st bits.Other bits have dashes.What does that mean?Does it matter if other bits 0 or 1?


Solution

  • Bits 2 through 6 are not implemented in the chip and cannot be programmed, so it does not matter what values you put there, as long as your version of AVRDUDE accepts your command. Depending on what version of AVRDUDE you use, those bits are either ignored, or you are forced to make them be 0, or you are forced to make them be 1.