Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Configuration file for LCD projects using PIC16F628A microcontroller.
/*
* File: config.h
* Author: Trion Projects
* Comments:
* Revision history: v1.0
*/
#ifndef CONFIG
#define CONFIG
// PIC16F628A Configuration Bit Settings
// CONFIG
#pragma config FOSC = INTOSCCLK // Oscillator Selection bits (INTOSC oscillator: CLKOUT function on RA6/OSC2/CLKOUT pin, I/O function on RA7/OSC1/CLKIN)
#pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT disabled)
#pragma config PWRTE = OFF // Power-up Timer Enable bit (PWRT disabled)
#pragma config MCLRE = OFF // RA5/MCLR/VPP Pin Function Select bit (RA5/MCLR/VPP pin function is digital input, MCLR internally tied to VDD)
#pragma config BOREN = OFF // Brown-out Detect Enable bit (BOD disabled)
#pragma config LVP = OFF // Low-Voltage Programming Enable bit (RB4/PGM pin has digital I/O function, HV on MCLR must be used for programming)
#pragma config CPD = OFF // Data EE Memory Code Protection bit (Data memory code protection off)
#pragma config CP = OFF // Flash Program Memory Code Protection bit (Code protection off)
#define _XTAL_FREQ 4000000
#include <xc.h>
#include <stdint.h> // uint8_t, uint16_t, ...
#include <stdio.h> // sprintf(), printf(), scanf(), ...
#include "lcd.h" // lcd header file
#endif /* CONFIG */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment