#include <reg51.h>
#include<intrins.h>
#define BUSY1 (DQ1==0)
sbit DQ1 = P0^4;
unsigned char idata TMP;
unsigned char idata TMP_d;
unsigned char f;
void wr_ds18_1(char dat);
unsigned char rd_ds18_1();
/***************延时程序,单位us,大于10us*************/
void time_delay(unsigned char time)
{
time=time-10;
time=time/6;
while(time!=0)time--;
}
/*****************************************************/
/* reset ds18b20 */
/*****************************************************/
void ds_reset_1(void)
{
unsigned char idata count=0;
DQ1=0;
time_delay(240);
time_delay(240);
DQ1=1;
return;
}