hi
if u want to protect code in ur chip plx write in Option Protect Code but i dont know what program you use !!!! i think all program write chip it have option for Protect Code!!!!
there's something called lock bits sometime called fuse bits i think that are used to lock the code..
give some details of your project and definitely someone can tell you exactly how to do it..
interestingly, on a sidenote, a hell lot of work is going into how to recover programs that have been protected this way, and people have found ways around such protection too!