Protecting Code on the Baby Orangutan

I am working on a couple of projects where the code I am using on the Baby O is very proprietary. What is the best way to make the code unreadable by unauthorized users… and ideally reprogrammable for updates.

This discussion, while dated, might be of interest: … 18&start=0

I agree with the link you gave totally… copy protection cannot be absolute and I only something to prevent easy copying. I just want to set the lock bits so that code cannot easily be read and yet I can upload new code if necessary. I cannot seem to find exactly what the settings should be for the BabyO… A link to details or a turtorial or ?? would be greatly appreciated.

You should set the Lock Bits of the ATmega328P correctly. AVR Studio has a graphical interface for doing this, so all you need is our programmer and AVR Studio (4 or 5).



You might also be interested in Atmel’s encrypted bootloader application note. I have only skimmed the document, and I see that does not specifically support the mega328, but it might give you some ideas or at least an appreciation for the challenge of doing secure firmware updates.


I do use your programmer and understand HOW to set the bits… I just do not know what settings to use. That is why I am asking for a link to something that explains the various options… hope this helps clarify…

The Memory Lock Bits are documented in section 27.1 (Bootloader Lock Bits) of the ATmega328p datasheet.

Based on my reading of the datasheet, it looks like you should program LB1 and LB2, which means setting them to zero. The effect of this sounds like it’s what you want: