欧美女同性恋视频一区二区|精品人妻一区二区三区在线影|最近中文字幕最新在线视频|精品久久久免费一区二区三区

技術(shù)支持???Support
聯(lián)系我們???Contact

DS18B20測溫程序

2015-5-12 10:49:00??????點擊:

如有疑問聯(lián)系客服,程序下載在低端程序開頭如下:

#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;               //參數(shù)temp一定要聲明為 int 型 
uchar code table[]={0x3f,0x06,0x5b,0x4f,0x66,0x6d,0x7d,
0x07,0x7f,0x6f,0x77,0x7c,0x39,0x5e,0x79,0x71};     //不帶小數(shù)點數(shù)字編碼


uchar code table1[]={0xbf,0x86,0xdb,0xcf,0xe6,0xed,0xfd,
0x87,0xff,0xef};        //帶小數(shù)點數(shù)字編碼


/*延時函數(shù)*/
void TempDelay (uchar us)
{
   while(us--);
}

void delay(uint count) //延時子函數(shù)
{
uint i;
while(count)
{
i=200;
while(i>0)
i--;
count--;
}

}

  更多優(yōu)質(zhì)傳感器來自永陽新能源: PT100 http://m.opd2d.com