| 1 | /******************************************************************************/ |
| 2 | /* Files to Include */ |
| 3 | /******************************************************************************/ |
| 4 | |
| 5 | #if defined(__XC) |
| 6 | #include <xc.h> /* XC8 General Include File */ |
| 7 | #elif defined(HI_TECH_C) |
| 8 | #include <htc.h> /* HiTech General Include File */ |
| 9 | #endif |
| 10 | |
| 11 | #include <stdint.h> /* For uint8_t definition */ |
| 12 | #include <stdbool.h> /* For true/false definition */ |
| 13 | |
| 14 | #include "system.h" |
| 15 | |
| 16 | /* Refer to the device datasheet for information about available |
| 17 | oscillator configurations and to compiler documentation for macro details. */ |
| 18 | void ConfigureOscillator(void) |
| 19 | { |
| 20 | |
| 21 | /* configure 4MHz mode */ |
| 22 | OSCCONbits.SPLLEN = 0; |
| 23 | OSCCONbits.IRCF = 0b1101; |
| 24 | OSCCONbits.SCS = 0b00; |
| 25 | |
| 26 | } |