Today I started to use MPLAB X to program my PICs, and found a code template, with multiple files and spots to fill in code. Before I have had a single file with my code in it. In this template, where I am supposed to put my Configuration bits, there is following text:
/* TODO Fill in your config bits here. Remove #if 0 to embed config words. */ #if 0 /* General syntax for configuration word 1 - Check your device .h file for an up to date listing of available macros.*/ __CONFIG(FOSC_INTOSC & WDTE_OFF & PWRTE_OFF & MCLRE_OFF & BOREN_OFF); /* If the device has multiple configuration words, the second macro defines the second configuration word. Again check your device .h file for an up to date listing of available macros. */ __CONFIG(WRT_OFF & PLLEN_OFF & STVREN_OFF & BORV_19 & LVP_OFF); #endif
I dont really understand what the "Remove #if 0 to embed config words." means... This is propably something really simple. I tried googling, and searching the compilers manual, but didnt get any good results. From what I can understand, the code in between #if 0 and #endif never gets compiled. What does this embed mean? Does it have something to do with setting the config-bits in code vs. afterwards?