void TEMP_Read() //读取温度整数
{
uint8 a,b;
TEMP_INITIALIZE();
TEMP_Write_Char(0xcc); //跳过ROM
TEMP_Write_Char(0x44);//温度转化
TEMP_Delay(100);
TEMP_INITIALIZE();
TEMP_Write_Char(0xcc);//跳过ROM
TEMP_Write_Char(0xbe);//获取温度
TEMP_Delay(100);
a=TEMP_Read_Char();
b=TEMP_Read_Char();
Temp_Value=b<<4;
Temp_Value+=(a&0xf0)>>4;
}
最后两句什么意思啊,求救
|