I am following a tutorial for making my Arduino Micro recognizable as an AVRISP-mkII. I already followed the tutorial once and got it to work as described; however, today I tried to use my micro with Atmel Studio and it would not work like before so I decided to re-do the tutorial so I could get my micro working again. I re-uploaded the Arduino bootloader and started from scratch. When I tried to program the lock bits according to Section 5, #6 of the tutorial, avrdude would not program the bits correctly. I got this error:
Command: C:\Users\RJ>avrdude -c arduino -b 19600 -p m32u4 -P COM4 -U lock:w:0xef:m -v
Writing | | 0% 0.00s ***failed;
Writing | ################################################## | 100% 0.11s
avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0xef:
avrdude: load data lock data from input file 0xef:
avrdude: input file 0xef contains 1 bytes
avrdude: reading on-chip lock data:
Reading | ################################################## | 100% 0.02s
avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
0xef != 0x20
avrdude: verification error; content mismatch
Why won't it program 0xEF? I have tried other lock bits and it works fine, but it won't do e. The weirdest part to me is that I already got it to work once, and I don't think anything has changed since then. Thanks!