/*
 * File:   main.c
 * Author: EDDS
 *
 * Created on 11 ?????? 2020 ?., 18:02
 */


#include <xc.h>

///#include "pickit3.h"

#define _XTAL_FREQ 4000000

#pragma config CP = OFF         // Code Protection bits (Program memory code protection off)

// CONFIG1H
#pragma config OSC = HS         // Oscillator Selection bits (HS oscillator)
#pragma config OSCS = OFF       // Oscillator System Clock Switch Enable bit (Oscillator system clock switch option is disabled (main oscillator is source))

// CONFIG2L
#pragma config PWRT = OFF       // Power-up Timer Enable bit (PWRT disabled)
#pragma config BOR = ON         // Brown-out Reset Enable bit (Brown-out Reset enabled)
#pragma config BORV = 25        // Brown-out Reset Voltage bits (VBOR set to 2.5V)

// CONFIG2H
#pragma config WDT = OFF        // Watchdog Timer Enable bit (WDT disabled (control is placed on the SWDTEN bit))
#pragma config WDTPS = 128      // Watchdog Timer Postscale Select bits (1:128)

// CONFIG3H
#pragma config CCP2MUX = OFF    // CCP2 Mux bit (CCP2 input/output is multiplexed with RB3)

// CONFIG4L
#pragma config STVR = OFF       // Stack Full/Underflow Reset Enable bit (Stack Full/Underflow will not cause RESET)

// #pragma config statements should precede project file includes.
// Use project enums instead of #define for ON and OFF.


void main(void) {
    
PORTB=0b00011111 ;
LATB=0b00000000 ;
TRISB=0b00000000 ;
    
    while(1){
        
PORTB|=0b10000000 ;        
        
__delay_ms(500)   ;
 
PORTB&=0b01111111 ;   

__delay_ms(500)   ;
    }
    return;
}
