// CONFIG
#pragma config FOSC = INTRCCLK // Oscillator Selection bits (INTOSC oscillator: CLKOUT function on GP4/OSC2/CLKOUT pin, I/O function on GP5/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 = ON // GP3/MCLR pin function select (GP3/MCLR pin function is MCLR)
#pragma config BOREN = OFF // Brown-out Detect Enable bit (BOD disabled)
#pragma config CP = OFF // Code Protection bit (Program Memory code protection is disabled)
#pragma config CPD = OFF // Data Code Protection bit (Data memory code protection is disabled)
#include <xc.h>
#define _XTAL_FREQ 500000
void main (void)
{
// SET UP
TRISIO = 0b000010; //Only AN1 is a input all else are outputs.
while(1){
GPIO = 0b000000; //Off
//__delay_ms(1);
GPIO = 0b100000; //GP5 On
__delay_ms(0.001);
}