sbit sbit_D18B20_DQ = P3^7;
bit b_DS18B20_is_reset = 0;
int int_temperature = 0;
uchar uc_DS18B20_dat_buf[9] = {0};
b_DS18B20_is_reset = 0;
sbit_D18B20_DQ = 1;
_nop_();
sbit_D18B20_DQ = 0;
Delay500us();
Delay10us();
Delay10us();
Delay10us();
Delay10us();
//Delay50us(); //
sbit_D18B20_DQ = 1;
Delay100us();
sbit_D18B20_DQ = 0;
//Delay500us();//???
Delay100us();//???这里要延时150us 我延时500us出错!!!
Delay50us();
sbit_D18B20_DQ = 1;
|