4.1 DS18B20³õʼ»¯³ÌÐòÁ÷³Ìͼ
ÔÚDS18B20¹¤×÷֮ǰÐèÒª½øÐгõʼ»¯£¬Á÷³ÌͼÈç17£º
·¢¸´Î»ÃüÁî ·¢Ìø¹ýROMÃüÁî ³õʼ»¯³É¹¦ ½áÊø
ͼ17 ³õʼ»¯³ÌÐòÁ÷³Ìͼ
4.2 ³¬Éù²¨Î¶ȺÍËٶȵĹØϵ
ζȣ¨¡æ£© -20 -19 -18 -17 -16
³¬Éù²¨µÄËٶȣ¨m/s£© C=331.3+0.606*T 319.18 319.786 320.392 320.998 321.604 22
½üËÆÖµ 319
-15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
322.21 322.816 323.422 324.028 324.634 325.24 325.846 326.452 327.058 327.664 328.27 328.876 329.482 330.088 330.694 331.3 331.906 332.512 333.118 333.724 334.33 334.936 335.542 336.148 336.754 337.36 337.966 338.572 339.178 339.784 340.39 340.996 23
322 325 328 331 334 337 341
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 341.602 342.208 342.814 343.42 344.026 344.632 345.238 345.844 346.45 347.056 347.662 348.268 348.874 349.48 350.086 350.692 351.298 351.904 352.51 353.116 353.722 354.328 354.934 355.54 356.146 356.752 357.358 357.964 358.57 343 347 350 353 356
24
5 ζȲ¹³¥³ÌÐò
void init2() {
//T2CON=0x0c;
RCAP2H=(65536-5)/256; RCAP2L=(65536-5)%6; TH2=(65536-5)/256; TL2=(65536-5)%6; EA=1; ET2=1; TR2=1;
// PT2=1; //T2Ϊ¸ßÓÅÏȼ¶ }
void main() {
init1(); // xianshi(); //ζÈ×Öĸ
init2(); //T2 tx=0;
IT0=0; // init(); //Æ÷³õʼ»¯
while(1); }
ÉèÒº¾§³õʼ»¯ ³õʼ»¯ ÍⲿÖжϵ͵çƽ´¥·¢ ¶¨Ê±25