Rev Author Line No. Line
1754 kakl 1 #include "C:\Users\kakl\Documents\MLAB\Modules\PIC\PIC18F8xTQ8001A\SW\PIC18F8310\blik.h"
2  
3  
4 #define LED PIN_J6 //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);
11 setup_psp(PSP_DISABLED);
12 setup_spi(SPI_SS_DISABLED);
13 setup_wdt(WDT_OFF);
14 setup_timer_0(RTCC_INTERNAL);
15 setup_timer_1(T1_DISABLED);
16 setup_timer_2(T2_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 }