Rev 1817 Rev 1818
Line 39... Line 39...
39 delval2=0x0; 39 delval2=0x0;
40 delval3=0x0; 40 delval3=0x0;
41 calibrate=TDC_CALIBRATE_DIS; 41 calibrate=TDC_CALIBRATE_DIS;
42 disautocal=TDC_AUTOCAL_EN; 42 disautocal=TDC_AUTOCAL_EN;
43 43
44 firenum=TDC_FIRENUM_0; 44 firenum=TDC_FIRENUM_1;
45 div_fire=TDC_DIV_FIRE_2; 45 div_fire=TDC_DIV_FIRE_2;
46 46
47 Tcycle=TDC_TCYSLE_LONG; 47 Tcycle=TDC_TCYSLE_LONG;
48 portnum=TDC_TPORTNUM_2; 48 portnum=TDC_TPORTNUM_2;
49 fakenum=TDC_TFAKENUM_2; 49 fakenum=TDC_TFAKENUM_2;
Line 89... Line 89...
89 89
90 while(true) 90 while(true)
91 { 91 {
92 temperature = ds1820_read(); 92 temperature = ds1820_read();
93 93
94 TDC_init(); 94 // TDC_init();
95 95
96 delay_ms(50); 96 delay_ms(50);
97 printf("Temp: %f \r\n", temperature); 97 printf("Temp: %f \r\n", temperature);
98 delay_ms(50); 98 delay_ms(50);
99 printf("status: %LX \r\n", TDC_get_status()); 99 printf("status: %LX \r\n", TDC_get_status());
100   100  
101 TDC_start_cycle(); 101 // TDC_start_cycle();
102   102  
103 // delay_us(10); 103 // delay_us(10);
104 output_high(START); 104 output_high(START);
105 // delay_us(1); 105 // delay_us(1);
106 106
Line 133... Line 133...
133 // delay_us(10); 133 // delay_us(10);
134 // output_low(STOP2); 134 // output_low(STOP2);
135   135  
136   136  
137 // delay_ms(10); 137 // delay_ms(10);
138 // TDC_start_temp(); 138 TDC_start_temp();
139   139  
140 delay_ms(10); 140 delay_ms(10);
141 printf("status: %LX \r\n", TDC_get_status()); 141 printf("status: %LX \r\n", TDC_get_status());
142 delay_ms(50); 142 delay_ms(50);
143 printf("measured: %LX, %LX, %LX, %LX \r\n", TDC_get_measurement(1), TDC_get_measurement(2), TDC_get_measurement(3), TDC_get_measurement(4)); 143 printf("measured: %LX, %LX, %LX, %LX \r\n", TDC_get_measurement(1), TDC_get_measurement(2), TDC_get_measurement(3), TDC_get_measurement(4));