8-bit AVR Microcontroller

Writing NVM Lock Bits

The algorithm for writing the Lock bits is as follows:
  1. 1.Write the WORD_WRITE command to the NVMCMD register.
  2. 2.Write the lock bits value to the Non-Volatile Memory Lock Byte location. This is the low byte of the Non- Volatile Memory Lock Word.
  3. 3.Start the NVM Lock Bit write operation by writing a dummy byte to the high byte of the NVM Lock Word location.
  4. 4.Wait until the NVMBSY bit has been cleared.