Subversion Repositories svnkaklik

Rev

Details | Last modification | View Log

Rev Author Line No. Line
876 kaklik 1
#include "C:\Users\kaklik\Documents\svnkaklik\C\PIC\test\PIC18F87J60\main.h"
2
 
3
 
4
#define LED PIN_A5  //CHANGE PIN_XX TO YOUR LED PIN NUMBER, EX: PIN_A5
5
 
6
void main()
7
{
8
 
9
   setup_adc_ports(NO_ANALOGS|VSS_VDD);
10
   setup_adc(ADC_CLOCK_DIV_2|ADC_TAD_MUL_0);
11
   setup_spi(SPI_SS_DISABLED);
12
   setup_wdt(WDT_OFF);
13
   setup_timer_0(RTCC_INTERNAL);
14
   setup_timer_1(T1_DISABLED);
15
   setup_timer_2(T2_DISABLED,0,1);
16
   setup_timer_4(T4_DISABLED,0,1);
17
   setup_ccp1(CCP_OFF);
18
   setup_comparator(NC_NC_NC_NC);
19
   setup_vref(FALSE);
20
 
21
    //Example blinking LED program
22
    while(true){
23
      output_low(LED);
24
      delay_ms(1000);
25
      output_high(LED);
26
      delay_ms(1000);
27
    }
28
 
29
}