資源描述:
《C51單片機(jī)C語(yǔ)言-程序100例Keil》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在教育資源-天天文庫(kù)。
1、\目錄目錄................................................................................................................................1函數(shù)的使用和熟悉********************************/.......................................4實(shí)例3:用單片機(jī)控制第一個(gè)燈亮.........................................................
2、....................4實(shí)例4:用單片機(jī)控制一個(gè)燈閃爍:認(rèn)識(shí)單片機(jī)的工作頻率.................................4實(shí)例5:將P1口狀態(tài)分別送入P0、P2、P3口:認(rèn)識(shí)I/O口的引腳功能............5實(shí)例6:使用P3口流水點(diǎn)亮8位LED.......................................................................5實(shí)例7:通過(guò)對(duì)P3口地址的操作流水點(diǎn)亮8位LED.............................................
3、..6實(shí)例8:用不同數(shù)據(jù)類型控制燈閃爍時(shí)間.................................................................7實(shí)例9:用P0口、P1口分別顯示加法和減法運(yùn)算結(jié)果.........................................8實(shí)例10:用P0、P1口顯示乘法運(yùn)算結(jié)果................................................................9實(shí)例11:用P1、P0口顯示除法運(yùn)算結(jié)果.............................
4、...................................9實(shí)例12:用自增運(yùn)算控制P0口8位LED流水花樣..............................................10實(shí)例13:用P0口顯示邏輯"與"運(yùn)算結(jié)果...............................................................10實(shí)例14:用P0口顯示條件運(yùn)算結(jié)果.......................................................................11實(shí)例15:
5、用P0口顯示按位"異或"運(yùn)算結(jié)果...........................................................11實(shí)例16:用P0顯示左移運(yùn)算結(jié)果...........................................................................11實(shí)例17:"萬(wàn)能邏輯電路"實(shí)驗(yàn).................................................................................11實(shí)例18:用右移運(yùn)算流水點(diǎn)亮P1口8位L
6、ED.......................................................12實(shí)例19:用if語(yǔ)句控制P0口8位LED的流水方向..............................................13實(shí)例20:用swtich語(yǔ)句的控制P0口8位LED的點(diǎn)亮狀態(tài)..................................13實(shí)例21:用for語(yǔ)句控制蜂鳴器鳴笛次數(shù)..............................................................14實(shí)例22:用
7、while語(yǔ)句控制LED...............................................................................16實(shí)例23:用do-while語(yǔ)句控制P0口8位LED流水點(diǎn)亮......................................16實(shí)例24:用字符型數(shù)組控制P0口8位LED流水點(diǎn)亮..........................................17實(shí)例25:用P0口顯示字符串常量........................