#include <16F887.h>

#FUSES NOWDT                    //No Watch Dog Timer
#FUSES HS                       
#FUSES NOPUT                    //No Power Up Timer
#FUSES NOMCLR                   //Master Clear pin used for I/O
#FUSES NOPROTECT                //Code not protected from reading
#FUSES NOCPD                    //No EE protection
#FUSES NOBROWNOUT               //No brownout reset
#FUSES NOIESO                   //Internal External Switch Over mode disabled
#FUSES NOFCMEN                  //Fail-safe clock monitor disabled
#FUSES NOLVP                    //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NODEBUG                  //No Debug mode for ICD
#FUSES NOWRT                    //Program memory not write protected
#FUSES BORV40                   //Brownout reset at 4.0V

#use delay(clock=1000000)

#byte PORTD = 0x08 




#int_AD
void  AD_isr(void) 
{
// ITT MÉR ÉS ÍR KI
}


#define LCD_ENABLE_PIN PIN_D0
#define LCD_RS_PIN PIN_D2
#define LCD_RW_PIN PIN_D3
#define LCD_DATA_PORT D4, D5, D6, D7
#include <lcd.c>
void main()
{
   setup_adc_ports(sAN0|VSS_VDD);
   setup_adc(ADC_OFF);
   setup_spi(SPI_SS_DISABLED);
   setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
   setup_timer_1(T1_DISABLED);
   setup_timer_2(T2_DISABLED,0,1);
   setup_comparator(NC_NC_NC_NC);
   enable_interrupts(INT_AD);
   enable_interrupts(GLOBAL);
   setup_oscillator(OSC_1MHZ);
   
   set_tris_d(0b00000000);
   
   lcd_init();


   lcd_putc("\fBekapcs.....\n");
   
   for(;;){
   }

}
