|
#include<reg52.h>
#include"lcd.h"
#include"DS18B20.h"
#define uchar unsigned char
#define uint unsigned int
//uchar data disdata[6];// 百、十、個(gè)、小數(shù)位1、小數(shù)位2、 小數(shù)位3、
//uint tvalue; // 溫度值
//uchar tflag; // 溫度正負(fù)標(biāo)志
/**************************************************************************************************************/
/******************** 主程序 *********************************************************************************/
void main()
{
init_play(); // 調(diào)用 lcd 初始化顯示子函數(shù)
while(1)
{
read_temp(); // 調(diào)用 ds18b20 讀取溫度
ds18b20disp(); // 調(diào)用溫度顯示子函數(shù)
}
}
|
|