单片机的温度计的硬件电路与程序18b20.docVIP

  • 6
  • 0
  • 约3.14千字
  • 约 6页
  • 2016-08-12 发布于安徽
  • 举报

单片机的温度计的硬件电路与程序18b20.doc

单片机的温度计的硬件电路与程序18b20.doc

最佳答案 温度传感器可以选用ds18b20 我把电路图发上来了这是程序,希望对你有用 #include reg52.h #define uchar unsigned char #define uint unsigned int sbit DS=P2^2; //define interface uint temp; // variable of temperature uchar flag1; // sign of the result positive or negative sbit dula=P2^6; sbit wela=P2^7; 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(uint count) //delay { uint i;

文档评论(0)

1亿VIP精品文档

相关文档