I am Charlze and I am new in Microcontroller programming.
My Problem is this, I am using an ATMEGA16A chip and have written a code in it and the application is already working.
I am using a JTAGICE 3, AVR Studio 6, Windows XP SP3.
I tried locking the device so that the code cannot be read.
I disabled the SPIEN and the JTAGEN.
I also set LB2 and LB1 to 0 to protect the code, and now the device is fully protected and I cannot read the code or modify it.
What my supervisor wants is, he wants to protect the code from reading and if updating of the code needs to be done,
he can erase the data in the chip and reset the lock and fuse bits and inject the new code in the microcontroller.
Please give me insights on how to do this. what fuse bits should be set to 1 and 0, and what lock bit mode should be used.
We had already figured it out. The error appears when we tried to debug the code when the chip is already locked.
However, we now have the problem that even if we lock the chip and connect the project to the JTAGICE 3 and go the Device programming>memories tab> and read the flash , we are able to read it.
I don't think that you are able to debug while the device is locked , it wouldn't make sense.
When you have the lockbits set then you can still do a read flash operation but what you get is garbage and not the actual flash content .
You can easily check this with a CRC check of the original HEX and the one you read back.
I don't think that you are able to debug while the device is locked , it wouldn't make sense.
When you have the lockbits set then you can still do a read flash operation but what you get is garbage and not the actual flash content .
You can easily check this with a CRC check of the original HEX and the one you read back.
Hello sir, i am facing a problem in programming atmega 2560. i used extreme burner 1.3 to set the fuse bytes. when i read the fuse byte initially lfuse was 62and hfuse was 99.. after that i wrote lfuse as F4 and hfuse as D9.. aftr writing the fuse bits i am unable to read or write the Microcontroller.. please help me how to change the fuse bits again .. i am using 14 Mhz external clock..
Your setting is not correct for crystal clock, you have set the device to external clock so you need a pulse source connected to pin 33 CLKI to be able to operate the device.