《单片机中使用DS18B20温度传感器C语言程序》.docVIP

  • 5
  • 0
  • 约1.07万字
  • 约 9页
  • 2020-01-23 发布于天津
  • 举报

《单片机中使用DS18B20温度传感器C语言程序》.doc

单片机中使用DS18B20温度传感器C语言程序(参考1) /******************************************************************************** ?????????????????????????????? DS18B20 测温程序 ??? 硬件:AT89S52 ??? (1)单线ds18b20接 P2.2 ??? (2)七段数码管接P0口 ??? (3)使用外部电源给ds18b20供电,没有使用寄生电源 ??? 软件:Kei uVision 3 ??? **********************************************************************************/ #include reg52.h #include intrins.h #define uchar unsigned char #define uint unsigned int sbit ds=P2^2; sbit dula=P2^6; sbit wela=P2^7; uchar flag ; uint temp;?????????????? //参数temp一定要声明为 int 型 uchar code table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6

文档评论(0)

1亿VIP精品文档

相关文档