7.3.2 Example

The following example shows how the #pragma config directive might be utilized. The example does the following:

  • Enables the Watchdog Timer
  • Sets the Watchdog Postscaler to 1:128
  • Selects the HS Oscillator for the Primary Oscillator
    #pragma config FWDTEN = ON, WDTPS = PS128
    #pragma config POSCMOD = HS
    ...
    int main (void)
    {
    ...
    }