Rev 1757 | Rev 1758 | ||
---|---|---|---|
Line 17... | Line 17... | ||
17 | setup_ccp1(CCP_OFF); |
17 | setup_ccp1(CCP_OFF); |
18 | setup_comparator(NC_NC_NC_NC); |
18 | setup_comparator(NC_NC_NC_NC); |
19 | setup_vref(FALSE); |
19 | setup_vref(FALSE); |
20 | |
20 | |
21 | TDC_reset(); |
21 | TDC_reset(); |
22 | //TDC_init(); |
- | |
23 | |
22 | |
- | 23 | hit1=TDC_MRANGE2_HIT1_START; |
|
- | 24 | hit2=TDC_MRANGE2_HIT2_1CH1; |
|
- | 25 | hitin1=TDC_HITIN1_2; |
|
- | 26 | hitin2=TDC_HITIN1_0; |
|
- | 27 | |
|
- | 28 | TDC_update_registers(); |
|
- | 29 | |
|
24 | while(true) |
30 | while(true) |
25 | { |
31 | { |
- | 32 | TDC_init(); |
|
26 | delay_ms(500); |
33 | delay_ms(500); |
27 | printf("ret: %LX \n", TDC_get_reg1()); |
- | |
28 | // printf("ret: %LX \n", TDC_get_measurement(1)); |
34 | printf("measured: %LX, %LX, %LX, %LX \n", TDC_get_measurement(1), TDC_get_measurement(2), TDC_get_measurement(3), TDC_get_measurement(4)); |
29 | |
- | |
30 | }; |
35 | }; |
31 | } |
36 | } |