Line 138... |
Line 138... |
138 |
output_low(STOP2); |
138 |
output_low(STOP2); |
139 |
output_low(STOP1); |
139 |
output_low(STOP1); |
140 |
|
140 |
|
141 |
//----------------------------------------------- Pocitani |
141 |
//----------------------------------------------- Pocitani |
142 |
|
142 |
|
- |
|
143 |
printf("Time1: %LX %LX %LX %LX \r\n", TDC_get_measurement(1), TDC_get_measurement(2), TDC_get_measurement(3), TDC_get_measurement(4)); |
143 |
printf("Time1: %3.7f %3.7f %3.7f ", TDC_mrange1_get_time(1,0,1,1), TDC_mrange1_get_time(2,0,2,1), TDC_mrange1_get_time(1,1,2,1)); |
144 |
printf("Time1: %3.7f %3.7f %3.7f ", TDC_mrange1_get_time(1,0,1,1), TDC_mrange1_get_time(2,0,2,1), TDC_mrange1_get_time(1,1,2,1)); |
144 |
printf("Time1: %LX %LX %LX %LX ", TDC_get_measurement(1), TDC_get_measurement(2), TDC_get_measurement(3), TDC_get_measurement(4)); |
- |
|
145 |
|
145 |
|
146 |
output_low(TDC_ENABLE); //status register |
146 |
output_low(TDC_ENABLE); //status register |
147 |
ret8=0; |
147 |
ret8=0; |
148 |
ret8=(0b1011<<4)|4; |
148 |
ret8=(0b1011<<4)|4; |
149 |
spi_xfer(TDC_stream,ret8,8); |
149 |
spi_xfer(TDC_stream,ret8,8); |
Line 159... |
Line 159... |
159 |
ret8=0; |
159 |
ret8=0; |
160 |
ret8=(0b1011<<4)|4; |
160 |
ret8=(0b1011<<4)|4; |
161 |
spi_xfer(TDC_stream,ret8,8); |
161 |
spi_xfer(TDC_stream,ret8,8); |
162 |
ret16=spi_xfer(TDC_stream,0,16); |
162 |
ret16=spi_xfer(TDC_stream,0,16); |
163 |
output_high(TDC_ENABLE); |
163 |
output_high(TDC_ENABLE); |
164 |
printf("Temp: [%Lu %Lu %Lu %Lu %Lu %Lu %Lu] ", (1&(ret16)>>12), (1&(ret16)>>11), (1&(ret16)>>10), 1&(ret16)>>9, 7&(ret16)>>6, 7&(ret16)>>3, 7&TDC_get_status()); |
164 |
printf("Temp: %LX %LX %LX %LX ", TDC_get_measurement(1), TDC_get_measurement(2), TDC_get_measurement(3), TDC_get_measurement(4)); |
165 |
printf(" %LX %LX %LX %LX \r\n", TDC_get_measurement(1), TDC_get_measurement(2), TDC_get_measurement(3), TDC_get_measurement(4)); |
165 |
printf(" [%Lu %Lu %Lu %Lu %Lu %Lu %Lu] \r\n", (1&(ret16)>>12), (1&(ret16)>>11), (1&(ret16)>>10), 1&(ret16)>>9, 7&(ret16)>>6, 7&(ret16)>>3, 7&TDC_get_status()); |
166 |
|
166 |
|
167 |
|
167 |
|
168 |
|
168 |
|
169 |
} |
169 |
} |
170 |
} |
170 |
} |