Line 14... |
Line 14... |
14 |
setup_timer_2(T2_DISABLED,0,1); |
14 |
setup_timer_2(T2_DISABLED,0,1); |
15 |
setup_ccp1(CCP_OFF); |
15 |
setup_ccp1(CCP_OFF); |
16 |
setup_comparator(NC_NC_NC_NC); |
16 |
setup_comparator(NC_NC_NC_NC); |
17 |
setup_vref(FALSE); |
17 |
setup_vref(FALSE); |
18 |
|
18 |
|
19 |
//TDC_reset(); |
19 |
TDC_reset(); |
20 |
//TDC_init(); |
20 |
//TDC_init(); |
- |
|
21 |
TDC_setup_reg1(); |
21 |
|
22 |
|
22 |
while(true) |
23 |
while(true) |
23 |
{ |
24 |
{ |
24 |
delay_ms(500); |
25 |
delay_ms(500); |
25 |
printf("ret: %LX \n", TDC_get_reg1()); |
26 |
printf("ret: %LX \n", TDC_get_reg1()); |
- |
|
27 |
// printf("ret: %LX \n", TDC_get_measurement(1)); |
26 |
}; |
28 |
}; |
27 |
} |
29 |
} |