freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

基于單片機(jī)的室內(nèi)電熱水器控制系統(tǒng)設(shè)計(jì)-閱讀頁(yè)

2025-07-12 19:16本頁(yè)面
  

【正文】 源程序蜂鳴器程序:/************************************************************************************************************模塊名:蜂鳴器描述 :控制蜂鳴器的開(kāi)啟和關(guān)閉 ************************************************************************************************************/include /****************************************************************函數(shù)名:BellOn參 數(shù):uiTimes = 延時(shí)的毫秒數(shù)返回值:描 述:讓蜂鳴器開(kāi)啟多少時(shí)間。while(uiTime){Delay(1)。}/****************************************************************函數(shù)名:BellOff參 數(shù):返回值:描 述:讓蜂鳴器關(guān)閉****************************************************************/void BellOff(void){BELL_PORT = 0。i0。 } } void modify(void){ EA=0。delay(180)。dat1[7]++。 } } } if(flag==1) { alarms[6]++。 if(alarms[6]9) { alarms[6]=0。 if(alarms[7]2) { alarms[7]=0。 dat[7]=alarms[7]。delay(180)。dat1[3]=0。 } } } if(flag==1) { alarms[3]++。 if(alarms[3]9) { alarms[4]++。 if(alarms[4]5) { alarms[4]=0。 dat[4]=alarms[4]。ET0=0。ET1=1。ET0=1。ET1=0。 dat2[1]=0。 dat2[4]=0。 dat2[7]=0。 sec=0。 } if(P1_5==0) { TR0=0。TR1=0。 } if(alarm==0) { TR0=0。TR1=0。flag=1。 dat[1]=0。 dat[3]=0。 dat[5]=10。 dat[7]=0。 }void init(void){ TMOD = 0x11。 TL0 =0xFF。 TL1=0xFF。 //10ms ET1=1。 TR0=1。 ms=0。 minit=0。 }void test(void) { for(k=0。k++) { P3=dis_bit[k]。 delay(1)。 } }void main() { init()。 while(1) { modify()。 }}void diplay() interrupt 1{ ET0=0。 TH0 = 0xDB。 TR0=1。 if(tcount==100) { ++。 dat1[0]=()%10。 } if(==60) { =0。 dat1[3]=()%10。 } if(==60) { =0。 dat1[6]=%10。 } if(23) { =0。 dat[2]=10。 dat[1]=dat1[1]。 dat[4]=dat1[4]。 dat[7]=dat1[7]。 P0=0x00。amp。amp。amp。 } ET0=1。 TR0=0。 TL1=0xFF。 ms++。 dat2[1]=ms/10。 sec++。 dat2[4]=sec/10。 minit++。 dat2[7]=minit/10。 dat[2]=10。 dat[1]=dat2[1]。 dat[4]=dat2[4]。 dat[7]=dat2[7]。顯示程序:/***********************************************************************************************************模 塊 名:LED數(shù)據(jù)顯示、設(shè)定描 述:4位LED顯示,9999到+9999,有單獨(dú)負(fù)號(hào)位(利用LED0的小數(shù)點(diǎn)位)LED4(單位顯示),LED3LED0(千,百,十,個(gè))KEY_RIGHT鍵移動(dòng)位選,KEY_UP鍵修改數(shù)值KEY_SET鍵取消修改, KEY_ENT確認(rèn)修改修改記錄:增加了DispString()函數(shù),SetValueStr()函數(shù).***********************************************************************************************************/include ****************************************************************函數(shù)名:DisplayInt參 數(shù):ucNum = 數(shù)值ucPoint = 03,大于3或等于0時(shí)不顯示小數(shù)點(diǎn)ucWidth = 14,當(dāng)顯示數(shù)值大于設(shè)定位數(shù)時(shí),以顯示數(shù)值為準(zhǔn)返回值:描 述:LED數(shù)值顯示,4位,9999到+9999****************************************************************/void DisplayInt(int ucNum, unsigned char ucPoint, unsigned char ucWidth){unsigned char data ucLedBuffer[4]。 //負(fù)數(shù)標(biāo)志//入口參數(shù)檢查if (ucNum 9999){ucNum = 9999。}if (ucPoint 3){ucPoint = 0。}//取正負(fù)號(hào)if (ucNum 0) //{ucNegative = 1。}else //+{ucNegative = 0。039。 //千位ucNum %= 1000。039。 //百位ucNum %= 100。039。 //十位ucNum %= 10。039。 //個(gè)位//隱藏不顯示位 ,當(dāng)要顯示的數(shù)據(jù)超過(guò)寬度時(shí),應(yīng)顯示9999。039。939。ucLedBuffer[1] = GetLedMold(39。)。939。}ucLedBuffer[3] = 0x00。039。939。ucLedBuffer[0] = GetLedMold(39。)。if (ucWidth 2){if(ucLedBuffer[1] != GetLedMold(39。))ucLedBuffer[0] = GetLedMold(39。)。}}}if (ucPoint != 0){ucLedBuffer[ucPoint] |= 0x01。} //負(fù)號(hào)位//LED數(shù)據(jù)更新SetLed(3, ucLedBuffer[3])。SetLed(1, ucLedBuffer[1])。return。返回值:描 述:在03的LED上顯示一個(gè)字符串****************************************************************/void CloseAllFlash(void){int i = 0。i4。}/****************************************************************函數(shù)名:SetAllFlash參 數(shù):*str = 要顯示的字符串,長(zhǎng)度最大為4。For (i = 0。i++)SetLedFlash (i,0xff)。SetLedFlash(1, 0x00)。SetLedFlash(3, 0x00)。 break。 break。 break。 break。 break。}}return。供其他模塊掉用。for (。 uiTimes){for (i=200。 i){ /* delay (6CLK) */_nop_()。_nop_()。_nop_()。_nop_()。}}return。i0。 } } void modify(void){ EA=0。delay(180)。dat1[7]++。 } } } if(flag==1) { alarms[6]++。 if(alarms[6]9) { alarms[6]=0。 if(alarms[7]2) { alarms[7]=0。 dat[7]=alarms[7]。delay(180)。dat1[3]=0。 } } } if(flag==1) { alarms[3]++。 if(alarms[3]9) { alarms[4]++。 if(alarms[4]5) { alarms[4]=0。 dat[4]=alarms[4]。ET0=0。ET1=1。ET0=1。ET1=0。 dat2[1]=0。 dat2[4]=0。 dat2[7]=0。 sec=0。 } if(P1_5==0) { TR0=0。TR1=0。 } if(alarm==0) { TR0=0。TR1=0。flag=1。 dat[1]=0。 dat[3]=0。 dat[5]=10。 dat[7]=0。 }void init(void){ TMOD = 0x11。 TL0 =0xFF。 TL1=0xFF。 //10ms ET1=1。 TR0=1。 ms=0。 minit=0。 }void test(void) { for(k=0。k++) { P3=dis_bit[k]。 delay(1)。 } }void main() { init()。 while(1) { modify()。 }}void diplay() interrupt 1{ ET0=0。 TH0 = 0xDB。 TR0=1。 if(tcount==100) { ++。 dat1[0]=()%10。 } if(==60) { =0。 dat1[3]=()%10。 } if(==60) { =0。 dat1[6]=%10。 } if(23) { =0。 dat[2]=10。 dat[1]=dat1[1]。 dat[4]=dat1[4]。 dat[7]=dat1[7]。 P0=0x00。amp。amp。amp。 } ET0=1。 TR0=0。 TL1=0xFF。 ms++。 dat2[1]=ms/10。 sec++。 dat2[4]=sec/10。 minit++。 dat2[7]=minit/10。 dat[2]=10。 dat[1]=dat2[1]。 dat[4]=dat2[4]。 dat[7]=dat2[7]。}主程序:include int main(){INT8U ucKeyValue = 0。BellOff()。DS18B20Init()。while(1){SetLedInt(5678)。}
點(diǎn)擊復(fù)制文檔內(nèi)容
法律信息相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1