51單片機(jī)100例程序設(shè)計(jì)_第1頁
已閱讀1頁,還剩250頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

1、第九單片機(jī)開發(fā)網(wǎng)100例程序設(shè)計(jì)范例匯總例程序設(shè)計(jì)范例匯總第一章第一章.......................................................................................................................................................4【實(shí)例1】使用累加器進(jìn)行簡單加法運(yùn)算:..............

2、......................................................................4【實(shí)例2】使用B寄存器進(jìn)行簡單乘法運(yùn)算:................................................................................4【實(shí)例3】通過設(shè)置RS1,RS0選擇工作寄存器區(qū)1:......................

3、...........................................4【實(shí)例4】使用數(shù)據(jù)指針DPTR訪問外部數(shù)據(jù)數(shù)據(jù)存儲器:........................................................4【實(shí)例5】使用程序計(jì)數(shù)器PC查表:...........................................................................

4、..................4【實(shí)例6】IF語句實(shí)例:.....................................................................................................................4【實(shí)例7】SWITCHCASE語句實(shí)例:...................................................

5、...............................................4【實(shí)例8】F語句實(shí)例:.................................................................................................................4【實(shí)例9】WHILE語句實(shí)例:................................

6、.............................................................................5【實(shí)例10】DO…WHILE語句實(shí)例:..................................................................................................5【實(shí)例11】語句形式調(diào)用實(shí)例:.........

7、.............................................................................................5【實(shí)例12】表達(dá)式形式調(diào)用實(shí)例:..................................................................................................5【實(shí)例13】以函數(shù)的參

8、數(shù)形式調(diào)用實(shí)例:......................................................................................5【實(shí)例14】函數(shù)的聲明實(shí)例:..........................................................................................................5【實(shí)例1

9、5】函數(shù)遞歸調(diào)用的簡單實(shí)例:..........................................................................................5【實(shí)例16】數(shù)組的實(shí)例:.......................................................................................................

10、...........6【實(shí)例17】指針的實(shí)例:..................................................................................................................6【實(shí)例18】數(shù)組與指針實(shí)例:...................................................................

11、.......................................6【實(shí)例19】P1口控制直流電動機(jī)實(shí)例.............................................................................................6第二章第二章..............................................................

12、.........................................................................................8【實(shí)例20】用74LS165實(shí)現(xiàn)串口擴(kuò)展并行輸入口..........................................................................8【實(shí)例21】用74LS164實(shí)現(xiàn)串口擴(kuò)展并行輸出口.....

13、...................................................................10【實(shí)例22】P0IO擴(kuò)展并行輸入口.................................................................................................12【實(shí)例23】P0IO擴(kuò)展并行輸出口..................

14、...............................................................................12【實(shí)例24】用8243擴(kuò)展IO端口...................................................................................................12【實(shí)例25】用8255A擴(kuò)展IO口....

15、................................................................................................14【實(shí)例26】用8155擴(kuò)展IO口.......................................................................................................19第

16、三章第三章.....................................................................................................................................................26【實(shí)例29】與AT24系列EEPROM接口及驅(qū)動程序......................................

17、.............................26【實(shí)例30】EEPROM(X5045)接口及驅(qū)動程序..............................................................................30【實(shí)例31】與鐵電存儲器接口及驅(qū)動程序................................................................

18、....................33【實(shí)例32】與雙口RAM存儲器接口及應(yīng)用實(shí)例.........................................................................35【實(shí)例33】與NFLASH(K9F5608)接口及驅(qū)動程序........................................................35第四章第四章........

19、.............................................................................................................................................43【實(shí)例34】獨(dú)立鍵盤控制.................................................................

20、...............................................43【實(shí)例35】矩陣式鍵盤控制............................................................................................................44【實(shí)例36】改進(jìn)型IO端口鍵盤.................................

21、....................................................................46【實(shí)例37】PS2鍵盤的控制............................................................................................................49第九單片機(jī)開發(fā)網(wǎng)第十章第十章............

22、.......................................................................................................................................164【實(shí)例73】單片機(jī)間雙機(jī)通信....................................................................

23、..................................164【實(shí)例74】單片機(jī)間多機(jī)通信方法之一......................................................................................166【實(shí)例75】單片機(jī)間多機(jī)通信方法之二..........................................................

24、............................171【實(shí)例76】PC與單片機(jī)通信........................................................................................................176【實(shí)例77】紅外通信接口........................................................

25、......................................................178第十一章第十一章...............................................................................................................................................180【實(shí)例79】單片機(jī)

26、實(shí)現(xiàn)PWM信號輸出.......................................................................................180【實(shí)例80】實(shí)現(xiàn)基于單片機(jī)的低頻信號發(fā)生器..........................................................................182【實(shí)例81】軟件濾波方法...........

27、...................................................................................................183【實(shí)例82】FSK信號解碼接收......................................................................................................1

28、86【實(shí)例83】單片機(jī)浮點(diǎn)數(shù)運(yùn)算實(shí)現(xiàn)..............................................................................................187【實(shí)例84】神經(jīng)網(wǎng)絡(luò)在單片機(jī)中的實(shí)現(xiàn)......................................................................................1

29、92【實(shí)例85】信號數(shù)據(jù)的FFT變換.................................................................................................194第十二章第十二章..............................................................................................

30、.................................................198【實(shí)例86】2IC總線接口的軟件實(shí)現(xiàn)......................................................................................198【實(shí)例87】SPI總線接口的軟件實(shí)現(xiàn)...........................................

31、................................................200【實(shí)例88】1WIRE總線接口的軟件實(shí)現(xiàn)....................................................................................205【實(shí)例89】單片機(jī)外掛CAN總線接口............................................

32、............................................207【實(shí)例90】單片機(jī)外掛USB總線接口........................................................................................210【實(shí)例91】單片機(jī)實(shí)現(xiàn)以太網(wǎng)接口................................................

33、..............................................214【實(shí)例92】單片機(jī)控制GPRS傳輸..............................................................................................221【實(shí)例93】單片機(jī)實(shí)現(xiàn)TCPIP協(xié)議.......................................

34、.....................................................223第十三章第十三章...............................................................................................................................................229【實(shí)例94】讀寫U盤

35、.....................................................................................................................229【實(shí)例95】非接觸IC卡讀寫......................................................................................

36、..................234【實(shí)例96】SD卡讀寫....................................................................................................................238【實(shí)例97】高精度實(shí)時時鐘芯片的應(yīng)用...................................................

37、...................................242第十四章第十四章...............................................................................................................................................247【實(shí)例98】智能手機(jī)充電器設(shè)計(jì).............

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 眾賞文庫僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論