Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Configuration Bit setting

Status
Not open for further replies.

swapan

Member
Friends,
I am a newbie in Microcontroller programming. I use MPLAB_IDE_8_36 for developing program. When a new project is created, there are some default configuration bit settings in the code. I like to change the config bit settings to protect the code. I changed the default "_CP_OFF" to "_CP_ON". After building the project an error is detected as "previously not defined _CP_ON". But building with default config settings i.e. _CP_OFF, the build is successful. Please guide me how to change the config bits in the code. Thanks.

swapan
 
I would VERY strongly suggest you don't set code protection, particularly during program development - there's really no point.

The only time you would use code protection is when the project is fully finallised, and you're selling complete units or pre-programmed chips.
 
Thanks Mr. Goodwin for your suggestion not to use code protection while developing program. Being a hobbyist I have no intention to sell anything. But what is the system of changing the config bit in question?

swapan
 
As you have no intention of selling, then drop the idea of code protection - but if you insist (and you'll almost certainly be sorry) lookup 'config__' (two underscores) in the help file.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top