1-Wire程序.docVIP

  • 20
  • 0
  • 约7.02千字
  • 约 9页
  • 2017-11-17 发布于河南
  • 举报
1-Wire程序

DS18B20程序-超详细注释 #include reg52.h #include intrins.h #define uchar unsigned char #define uint unsigned int sbit DQ = P2^2;?????????????????????? //数据口define interface sbit dula = P2^6;???????????????????? //数码管段选 sbit wela = P2^7;??????????????????? //数码管位选 uint temp;???????????? ????????????? //温度值 variable of temperature //不带小数点 unsigned char code table[] = {0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d, ???????? 0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71}; //带小数点 unsigned char code table1[] = {0xbf,0x86,0xdb,0xcf,0xe6,0xed,0xfd,0x87,0xff,0xef}; /*************精确延时函数*****************/ void delay(uns

文档评论(0)

1亿VIP精品文档

相关文档