资源描述:
《片机热敏电阻测温查表程序》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、1.#include 2.#include"LCD.h" 3.#define uchar unsigned char 4.#define uint unsigned int 5.#define N 10 6.uchar bai,ge,shi,n; 7.uint temp,tp;temph,templ; 8.uint code ad_date[]={ 9. 1060,1060,1060,1100,1120,1140,1166,1180,120
2、0,1220, 10. 1240,1320,1340,1360,1380,1400,1420,1440,1460,1480, 11. 1500,1520,1540,1560,1580,1600,1620,1640,1660,1680, 12. 1700,1720,1740,1760,1780,1800,1820,1840,1840,1860, 13. 1880,1900,1920,1940,1960,1980,2000,2020,2040,2060, 1
3、4. 2080,2100,2120,2140,2160,2180,2200,2220,2240,2260, 15. 2280,2300,2320,2340,2360,2380,2400,2420,2440,2460, 16. 2480,2500,2520,2540,2560,2580,2600,2620,2640,2660, 17. 2680,2700,2720,2740,2760,2780,2800,2820,2840,2860, 18. 2880,
4、2900,2920,2920,2940,2960,2980,3000,3020,3040, 19. 3060,3080,3100,3120,3140,3160,3180,3200,3220,3240, 20. 3260,3280,3300,3320,3340,3360,3380,3400,3420,3440, 21. 3460,3480,3500,3520,3540,3560,3580,3600,3620,3640, 22. 3660,3680}; 23
5、.uint code temperiture[]={ 24. 594,593,586,580,579,560,564,559,552,545, 25. 541,518,513,508,503,497,491,488,483,480, 26. 473,468,463,458,455,451,447,440,434,433, 27. 430,425,420,416,413,409,404,401,401,396, 28. 390,386,382,378
6、,374,372,368,364,361,357, 29. 354,351,347,343,340,336,333,328,326,322, 30. 319,316,313,309,307,303,300,296,294,289, 31. 286,283,280,276,274,271,267,264,260,257, 32. 253,249,246,243,240,237,233,231,228,224, 33. 222,219,214,216,
7、211,209,206,202,198,194, 34. 187,184,181,178,175,171,168,164,161,158, 35. 154,152,148,146,142,139,136,133,130,126, 36. 124,121,116,114,112,108,102,98,96,94, 37. 89,86}; 38.uchar code table[]=" T:00.0`C"; 39.uchar num=0; 40.u
8、char keynum,max=40,min=0; 41.uchar code Temp_max[]=" Max:40`C",Temp_min[]=" Min:00`C"; 42. 43.sbit ad_wr=P3^6; 44.sbit ad_rd=P3^7; 1.sbit ad_cs=P3^5; 2.sbit ad_int=P3^2; 3.sbit key1=P0^5; 4.sbit key2=P0^6; 5.sbit key3=P0^7;