Using bitwise AND for setting configuration bits? What's all this about





I've been programming the PIC16F684 for a few weeks now, and only
today did I notice the peculiarity of how the configuration bits were
being set:

__CONFIG(FCMDIS & IESODIS & BORDIS & UNPROTECT & MCLRDIS & PWRTEN &
WDTDIS & INTIO);

I would have expected bitwise OR to be used in conjunction with macros
that equate to an exact power of 2, like as follows:

#define FCMDIS 1
#define IESODIS 2
#define BORDIS 4
#define UNPROTECT 8
#define MCLRDIS 16
#define PWRTEN 32

__CONFIG(FCMDIS | IESODIS | BORDIS | UNPROTECT | MCLRDIS | PWRTEN |
WDTDIS | INITO);

Can anyone shed any light on their usage of bitwise AND for setting
config bits?

.



Relevant Pages