Lets make things a little easier on ourselves by defining a standard header file for our PIC10F322 Projects. 

I named the file 10F322_deviceconfig.h and place it into a directory I create in each of the XC8 Projects – I name that directory includes. 

To use it, in the source I need to file I use – #include “includes/10F322_deviceconfig.h”

The header file contains the device configuration setup, and some other standard headers I use, along with _XTAL_FREQ and some other defines that I find important to have, like values for true, false, off, on.. 

The file can be found in my Github site – https://github.com/JamieStarling/MCU_FUN/blob/master/Microchip/PIC10F322/includes/10F322_deviceconfig.h

Here is what it contains. 

/*
 * File:  10F322_deviceconfig.h
 * Author: Jamie Starling - JamieStarling.com 
 *
 * Created on:  June 7, 2019, 9:45 PM
 * 
 * Copyright 2018 - 2019 Jamie Starling


THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED,INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

 * 
 * Purpose : Provides Standard Configuration for 10F32X devices
 * 
 */


#include 
#include 

#ifndef DEVICECONFIG_H
#define	DEVICECONFIG_H

#pragma config FOSC = INTOSC  // Oscillator Selection 
#pragma config BOREN = ON    // Brown-out Reset
#pragma config WDTE = OFF    // Watchdog Timer
#pragma config PWRTE = ON    // Power-up Timer
#pragma config MCLRE = OFF   // MCLR Pin Function Select bit->MCLR pin function is digital input, MCLR internally tied to VDD
#pragma config CP = OFF      // Code Protection 
#pragma config LVP = OFF     // Low-Voltage Programming 
#pragma config LPBOR = ON    // Brown-out Reset Selection bits
#pragma config BORV = LO    // Brown-out Reset Voltage Selection
#pragma config WRT = OFF    // Flash Memory Self-Write Protection


#define ON  1
#define OFF 0
#define TRUE 1
#define FALSE 0
#define HIGH 1
#define LOW 0


//Used to calculate the delay time - Change depending on processor Speed
#define _XTAL_FREQ 8000000  //8 MHz (default after Reset)


#endif	/* DEVICECONFIG_H */