/*
 * File:   MAIN.c
 * Author: Timoha
 *
 * Created on 14 ?????? 2018 ?., 21:45
 */


#pragma config FOSC = INTRCIO  // 
#pragma config WDTE = OFF       // Watchdog Timer Enable bit (WDT disabled)
#pragma config PWRTE = ON       // Power-Up Timer Enable bit (PWRT enabled)
#pragma config MCLRE = OFF       // 
#pragma config BOREN = ON       // Brown-out Detect Enable bit (BOD enabled)
#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)

// #pragma config statements should precede project file includes.
// Use project enums instead of #define for ON and OFF.

#include <xc.h>

#define  _XTAL_FREQ 4000000

void main(void){
    //??????????????? ??????????
    //??? ??????????? ????????? ????????
    unsigned long counter;
     
    //????????? ?????? ?????/?????? PIC12F675
    //?????????? ????????????? ??????????
    WPU = 0x00;
   
    //????????? ????????????? ????????????? ??????????
    OPTION_REGbits.nGPPU = 1;
    // ????????? ?????????? 
    CMCON = 0x07;
     
    //???????? ??????? GP4, GP5 ?? ?????
    TRISIO = 0;
     
    //????????? ?? ??????? GP4, GP5 ???. 0
    GPIO = 0;
     
    //??????????? ????.
    while(1){
        GPIO2 ^=1;   //???. 3 ???????? ???? 4
        //???????? ?? 1 ???
        __delay_ms(1000);
    }
}