0
\$\begingroup\$

I am trying to use lock bits for protection on atmega32.I am not being able to write lock bits to it its giving me verification error while doing it.Can you tell me correct way to do this?

This is the error I am getting while programing: enter image description here

\$\endgroup\$
  • \$\begingroup\$ Do you use a decoupling capacitor? (100nF will do). Also, do you have a RESET pullup resistor? (10K) \$\endgroup\$ – smajli Oct 18 '17 at 7:34
  • \$\begingroup\$ is it related to lock bits ? \$\endgroup\$ – shubham Oct 18 '17 at 8:06
  • \$\begingroup\$ It is related to programming process, and what you do here is programming fusebits, isn't it? \$\endgroup\$ – smajli Oct 18 '17 at 8:53
  • \$\begingroup\$ Also, after programming, check if they are in your desired state: avrdude -p atmega32 -c stk500v2 -P disabled -U lock:r:"tmp_fuse_lock.hex":i \$\endgroup\$ – smajli Oct 18 '17 at 9:03
  • \$\begingroup\$ what do I do about writing those lock bits is my question? \$\endgroup\$ – shubham Oct 18 '17 at 9:13
-1
\$\begingroup\$

http://web.engr.oregonstate.edu/~traylor/ece473/lectures/fuses.pdf check out this pdf. You Will find your answer.

avrdude> w efuse 0 0xff
//write extended fuse //write extended fuse

w efuse 0 0xff avrdude> w hfuse 0 0x89
//wire high fuse //wire high fuse w hfuse 0 0x89

avrdude> w lfuse 0 0x2f
//write low fuse //write low fuse

w lfuse 0 0x2f

Double check 0XFC is correct value or not?

\$\endgroup\$
  • \$\begingroup\$ A proper answer should not require anyone to leave the site. \$\endgroup\$ – Harry Svensson Oct 18 '17 at 7:09
  • \$\begingroup\$ i don't understand.What are you saying? \$\endgroup\$ – Bhura Oct 23 '17 at 5:40
  • \$\begingroup\$ You edited 1 minute after my comment, so it's fixed, I guess. \$\endgroup\$ – Harry Svensson Oct 23 '17 at 5:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.