下載手機(jī)汽配人

基于單片機(jī)msp430和溫度傳感器ds18b20的水溫度控制系統(tǒng)的c語(yǔ)言源程序(不是測(cè)量,要有加熱跟制冷)

基于單片機(jī)msp430和溫度傳感器ds18b20的水溫度控制系統(tǒng)的c語(yǔ)言源程序
問(wèn) 提問(wèn)者:網(wǎng)友 2018-07-20
最佳回答
我這是用STC做的,應(yīng)該很容易移植到MPS430上的給你參考一下。 #include #include #define uchar unsigned char #define uint unsigned int sbit scl=P1^3; sbit sda=P1^4; sbit key1=P1^6; sbit key2=P1^7; sbit key3=P2^0; sbit key4=P2^1; sbit lcrs=P3^7;//數(shù)據(jù)/命令 sbit lcwr=P3^5;//讀/寫 sbit lcden=P3^4;//使能 sbit DS=P2^2; /*sbit lcrs=P3^4;//數(shù)據(jù)/命令 sbit lcwr=P3^7;//讀/寫 sbit lcden=P3^5;//使能 */ sbit jrk=P2^2; sbit cyk=P2^3; sbit xhk=P2^4; bit flag=0,rsg=0,not=0,he=0,in=0; int acon=0,bcon=0,dcon=0,econ=0, temp=0,y=0,j=0,l=0,cfj=0,ec=0,dc=0,at; uchar code table[]={48,49,50,51,52,53,54,55,56,57}; uchar code ta1[]={"Temperature UP"}; uchar code ta2[]={"Temperature DN"}; uchar code ta3[]={"Inflator Cycle"}; uchar code ta4[]={"Inflator Time "}; uchar code ta5[]={" Heating UP "}; uchar code ta6[]={" Inflator "}; uchar code table7[]={"Temperature"}; uchar table1[]={0,0,0,'.',0}; uchar table3[]={"AptitudeAquarium"}; uchar table4[]={0,0,0,0,0}; uchar n,c=0; void delay(uchar); void wen_kong(); void xh(); void rso(); void weno(); void Init_Com(void)
回答者:網(wǎng)友
產(chǎn)品精選
搜索問(wèn)答
還沒(méi)有汽配人賬號(hào)?立即注冊(cè)

我要提問(wèn)

汽配限時(shí)折扣

本頁(yè)是網(wǎng)友提供的關(guān)于“基于單片機(jī)msp430和溫度傳感器ds18b20的水溫度控制系統(tǒng)的c語(yǔ)言源程序(不是測(cè)量,要有加熱跟制冷)”的解答,僅供您參考,汽配人網(wǎng)不保證該解答的準(zhǔn)確性。