Rev Author Line No. Line
1744 kakl 1 #include "main.h"
2  
3 #include "GP2.h"
4  
5 void main()
6 {
7 setup_adc_ports(NO_ANALOGS|VSS_VDD);
8 setup_adc(ADC_CLOCK_DIV_2);
9 setup_psp(PSP_DISABLED);
10 setup_spi(SPI_SS_DISABLED);
11 setup_wdt(WDT_OFF);
12 setup_timer_0(RTCC_INTERNAL);
13 setup_timer_1(T1_DISABLED);
14 setup_timer_2(T2_DISABLED,0,1);
15 setup_ccp1(CCP_OFF);
16 setup_comparator(NC_NC_NC_NC);
17 setup_vref(FALSE);
18  
1745 kakl 19 TDC_reset();
1744 kakl 20 //TDC_init();
1745 kakl 21 TDC_setup_reg1();
1744 kakl 22  
23 while(true)
24 {
25 delay_ms(500);
26 printf("ret: %LX \n", TDC_get_reg1());
1745 kakl 27 // printf("ret: %LX \n", TDC_get_measurement(1));
1744 kakl 28 };
29 }