Go Down

Topic: ATTINY45 bit lock (Read 412 times) previous topic - next topic

ErfanDL

Hi friends. I want to protect my sketch on ATTINY45. I tried blow code to bit lock the chip but can't be working

Code: [Select]
avrdude -c usbasp -p attiny45 -U lock:w:0x00:m -u

the error:

Code: [Select]
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x1e9206 (probably t45)
avrdude: reading input file "0x00"
avrdude: writing lock (1 bytes):

Writing |                                                    | 0% 0.00s ***failed;
Writing | ################################################## | 100% 0.10s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x00:
avrdude: load data lock data from input file 0x00:
avrdude: input file 0x00 contains 1 bytes
avrdude: reading on-chip lock data:

Reading | ################################################## | 100% 0.01s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0000
         0xfc != 0x00
avrdude: verification error; content mismatch

avrdude done.  Thank you.





Carlmikael

Is your program working? If you program the lock bit you can't read the fuse bit. But the program should work. You had to program first and test that it is working and than program the lock bit. Ignor the error massage you get. After that the program and the fuse bits cant be read! But the program works. If change the look bit the program is erased and fuse bits to.

Go Up