单片机实用技术项目六单片机温度采集系统.ppt

单片机实用技术项目六单片机温度采集系统.ppt

{ unsigned char a,b; for(b=11;b0;b--) for(a=1;a0;a--); } //延时500us == 复位时用到 void delay500us(void) //12MHz,12分频单片机 { unsigned char a,b; for(b=99;b0;b--) for(a=1;a0;a--); } //======================== //粗略可调延时函数 //======================== void delayms(u16 ms) { while(ms--) { unsigned char a,b,c; for(c=1;c0;c--) for(b=142;b0;b--) for(a=2;a0;a--); } } void delay(uint n) //延时函数 { uint x,y; for(x=n;x0;x--) for(y=110;y0;y--); } //=========================== //DS18B20读一个字节 //===========

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档