Initial import of goggles v2
[goggles] / configuration_bits.c
CommitLineData
5fc23db2
JM
1/******************************************************************************/
2/* Main 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/******************************************************************************/
12/* Configuration Bits */
13/* */
14/* Refer to your Hi-Tech User Manual in the PICC installation directory */
15/* /doc folder for more information on filling in configuration bits. */
16/* In addition, configuration bit mnemonics can be found in your */
17/* PICC\version\include\<processor name>.h file for your device. The XC8 */
18/* compiler contains documentation on the configuration bit macros within */
19/* the compiler installation /docs folder in a file called */
20/* pic18_chipinfo.html. */
21/* */
22/* For additional information about what the hardware configurations mean in */
23/* terms of device operation, refer to the device datasheet. */
24/* */
25/* A feature of MPLAB X is the 'Generate Source Code to Output' utility in */
26/* the Configuration Bits window. Under Window > PIC Memory Views > */
27/* Configuration Bits, a user controllable configuration bits window is */
28/* available to Generate Configuration Bits source code which the user can */
29/* paste into this project. */
30/* */
31/******************************************************************************/
32
33/* TODO Fill in your config bits here. Use the configuration bits generator. */
34// CONFIG1
35#pragma config FOSC = INTOSC // Oscillator Selection (INTOSC oscillator: I/O function on CLKIN pin)
36#pragma config WDTE = ON // Watchdog Timer Enable (WDT disabled)
37#pragma config PWRTE = OFF // Power-up Timer Enable (PWRT disabled)
38#pragma config MCLRE = OFF // MCLR Pin Function Select (MCLR/VPP pin function is digital input)
39#pragma config CP = OFF // Flash Program Memory Code Protection (Program memory code protection is disabled)
40#pragma config CPD = OFF // Data Memory Code Protection (Data memory code protection is disabled)
41#pragma config BOREN = ON // Brown-out Reset Enable (Brown-out Reset enabled)
42#pragma config CLKOUTEN = OFF // Clock Out Enable (CLKOUT function is disabled. I/O or oscillator function on the CLKOUT pin)
43#pragma config IESO = OFF // Internal/External Switchover (Internal/External Switchover mode is disabled)
44#pragma config FCMEN = ON // Fail-Safe Clock Monitor Enable (Fail-Safe Clock Monitor is enabled)
45
46// CONFIG2
47#pragma config WRT = OFF // Flash Memory Self-Write Protection (Write protection off)
48#pragma config PLLEN = ON // PLL Enable (4x PLL enabled)
49#pragma config STVREN = ON // Stack Overflow/Underflow Reset Enable (Stack Overflow or Underflow will cause a Reset)
50#pragma config BORV = LO // Brown-out Reset Voltage Selection (Brown-out Reset Voltage (Vbor), low trip point selected.)
51#pragma config LVP = ON // Low-Voltage Programming Enable (Low-voltage programming enabled)
52
53