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

正文內(nèi)容

基于51單片機(jī)的多功能迷你跑馬流水燈音樂(lè)盒設(shè)計(jì)過(guò)程和程序參賽作品文檔-文庫(kù)吧

2024-10-14 19:44 本頁(yè)面


【正文】 著笑容欣賞勝利的成果。 第 8 頁(yè) 共 18 頁(yè) 仿真圖如圖: 3 心得體會(huì)及建議 心得體會(huì) 通過(guò)此次課程設(shè)計(jì),不僅初步掌握了 51 單片機(jī)的一些基本功能應(yīng)用,還學(xué)會(huì)了使用 keil和 protues 兩個(gè)軟件。知道了怎么用 keil 新建工程文件、編寫調(diào)試程序、生成. HEX 文件;怎么用 protues 軟件畫(huà)圖,特別是總線的畫(huà)法,怎么仿真等。 我會(huì)以此為起點(diǎn),進(jìn)一步學(xué)習(xí)和使用單片機(jī),為將來(lái)工作打基礎(chǔ)。 感謝我的 51 單片機(jī)啟蒙老師李建波老師的教誨。 建議 希望老師多我們講一些單片機(jī)的研究方向,平時(shí)也多給我們出一些小設(shè)計(jì)課題,我覺(jué)得像這樣自己做一個(gè)設(shè)計(jì)對(duì)理論學(xué)習(xí)是一個(gè)很好的總結(jié),當(dāng)我們有不懂的東西的時(shí)候也可以得到老師的指點(diǎn),這樣才能夠更全面的認(rèn)識(shí)和學(xué)好單片機(jī)。 第 9 頁(yè) 共 18 頁(yè) 4 附錄 實(shí)物圖如圖六: C 程序如下 : include include unsigned char RunMode。 //**********************************System Fuction************************************************* void Delay1ms(unsigned int count) { unsigned int i,j。 for(i=0。icount。i++) for(j=0。j120。j++)。 } 第 10 頁(yè) 共 18 頁(yè) unsigned char code LEDDisplayCode[] = { 0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8, //0~7 0x80,0x90,0x88,0x83,0xC6,0xA1,0x86,0x8E,0xFF}。 void Display(unsigned char Value) { P3 = LEDDisplayCode[Value]。 } void LEDFlash(unsigned char Count) { unsigned char i。 bit Flag。 for(i = 0。 iCount。i++) { Flag = !Flag。 if(Flag) Display(RunMode)。 else Display(0x10)。 Delay1ms(100)。 } Display(RunMode)。 } unsigned char GetKey(void) { unsigned char KeyTemp,CheckValue,Key = 0x00。 CheckValue = P2amp。0x32。 if(CheckValue==0x32) return 0x00。 Delay1ms(10)。 KeyTemp = P2amp。0x32。 if(KeyTemp==CheckValue) return 0x00。 if(!(CheckValueamp。0x02)) Key|=0x01。 if(!(CheckValueamp。0x10)) Key|=0x02。 if(!(CheckValueamp。0x20)) Key|=0x04。 return Key。 } unsigned int Timer0Count,SystemSpeed,SystemSpeedIndex。 void InitialTimer2(void) { T2CON = 0x00。 //16 Bit AutoReload Mode TH2 = RCAP2H = 0xFC。 //重裝值 ,初始值 TL2 = RCAP2L = 0x18。 ET2=1。 //定時(shí)器 2 中斷允許 TR2 = 1。 //定時(shí)器 2 啟動(dòng) EA=1。 } unsigned int code SpeedCode[]={ 1, 2, 3, 5, 8, 10, 14, 17, 20, 30, 40, 50, 60, 70, 80, 90, 100, 120, 140, 160, 180, 200, 300, 400, 500, 600, 700, 800, 900,1000}。//30 void SetSpeed(unsigned char Speed) { SystemSpeed =SpeedCode[Speed]。 } void LEDShow(unsigned int LEDStatus) { P1 = ~(LEDStatusamp。0x00FF)。 P0 = ~((LEDStatus8)amp。0x00FF)。 } void InitialCPU(void) { RunMode = 0x00。 Timer0Count = 0。 SystemSpeedIndex = 9。 第 11 頁(yè) 共 18 頁(yè) P1 = 0x00。 P0 = 0x00。 P2 = 0xFF。 P3 = 0x00。 Delay1ms(500)。 P1 = 0xFF。 P0 = 0xFF。 P2 = 0xFF。 P3 = 0xFF。 SetSpeed(SystemSpeedIndex)。 Display(RunMode)。 } //Mode 0 unsigned int LEDIndex = 0。 bit LEDDirection = 1,LEDFlag = 1。 void Mode_0(void) { LEDShow(0x0001LEDIndex)。 LEDIndex = (LEDIndex+1)%16。 } //Mode 1 void Mode_1(void) { LEDShow(0x8000LEDIndex)。 LEDIndex = (LEDIndex+1)%16。 } //Mode 2 void Mode_2(void) { if(LEDDirection) LEDShow(0x0001LEDIndex)。 else LEDShow(0x8000LEDIndex)。 if(LEDIndex==15) LEDDirection = !LEDDirection。 LEDIndex = (LEDIndex+1)%16。 } //Mode 3 void Mode_3(void) { if(LEDDirection) LEDShow(~(0x0001LEDIndex))。 else LEDShow(~(0x8000LEDIndex))。 if(LEDIndex==15) LEDDirection = !LEDDirection。 LEDIndex = (LEDIndex+1)%16。 } //Mode 4 void Mode_4(void) { if(LEDDirection) { if(LEDFlag) LEDShow(0xFFFELEDIndex)。 else LEDShow(~(0x7FFFLEDIndex))。 } else { if(LEDFlag) LEDShow(0x7FFFLEDIndex)。 else LEDShow(~(0xFFFELEDIndex))。 } if(LEDIndex==15) { LEDDirection = !LEDDirection。 if(LEDDirection) LEDFlag = !LEDFlag。 } LEDIndex = (LEDIndex+1)%16。 } //Mode 5 void Mode_5(void) { if(LEDDirection) LEDShow(0x000FLEDIndex)。 else LEDShow(0xF000LEDIndex)。 if(LEDIndex==15) LEDDirection = !LEDDirection。 LEDIndex = (LEDIndex+1)%16。 } 第 12 頁(yè) 共 18 頁(yè) //Mode 6 void Mode_6(void) { if(LEDDirection) LEDShow(~(0x000FLEDIndex))。 else LEDShow(~(0xF000LEDIndex))。 if(LEDIndex==15) L
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1