EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Setting configuration bits in code

Started by Nickolai Leschov March 5, 2008
Dear friends,

I have a MPLAB IDE project where configuration bits for the device are 
set in project options. I want all configuration data for the 
application to be contained in source code.

How do I set set configuration bits in code?

My CPU is PIC18F452, compiler is HI-TECH PICC-18 V8.35 PL3

Regards,
Nickolai Leschov
Nickolai Leschov wrote:

> I have a MPLAB IDE project where configuration bits for the device are > set in project options. I want all configuration data for the > application to be contained in source code. > > How do I set set configuration bits in code? > > My CPU is PIC18F452, compiler is HI-TECH PICC-18 V8.35 PL3
The HiTech compiler has macros for this. I believe it is CONFIG or _CONFIG. To see the permissible options, look at the header file for your particular processor. -- Thad

The 2024 Embedded Online Conference