Last active
January 27, 2020 19:32
-
-
Save Trionium/fa2a3af0cded01a4e0757e4a6aae5bd3 to your computer and use it in GitHub Desktop.
Configuration file for LCD projects using PIC16F628A microcontroller.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* 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