<meter id="pryje"><nav id="pryje"><delect id="pryje"></delect></nav></meter>
          <label id="pryje"></label>

          新聞中心

          EEPW首頁(yè) > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > 51單片機(jī)驅(qū)動(dòng)1602液晶匯編語(yǔ)言程序

          51單片機(jī)驅(qū)動(dòng)1602液晶匯編語(yǔ)言程序

          作者: 時(shí)間:2016-11-30 來(lái)源:網(wǎng)絡(luò) 收藏
          LCMRS EQU P2.4
          LCMRW EQU P2.5LCMEN EQU P2.6LCMDATA EQU P0ORG 0000HLJMP MAINORG 0030HMAIN:MOV SP,#60HLCALL LCMSETLCALL LCMCLRMOV A,#80HLCALL LCMWR0MOV DPTR,#TAB0LCALL LCMWR2MOV A,#0C0HLCALL LCMWR0MOV DPTR,#TAB1LCALL LCMWR2SJMP $TAB0: DB "I AM YUAN MING",00HTAB1: DB "NICE TO MEET YOU",00HLCMLAY:                                    ;讀忙程序,用于判斷d7是否為0PUSH ACCLOOP:CLR LCMENCLR LCMRSSETB LCMRWSETB LCMENMOV A,LCMDATACLR LCMENJB ACC.7,LOOPPOP ACCLCALL DELAYRETLCMWR0:                                  ;寫(xiě)入指令LCALL LCMLAYCLR LCMENCLR LCMRSCLR LCMRWSETB LCMENMOV LCMDATA,ACLR LCMENRETLCMWR1:                              ;寫(xiě)入數(shù)據(jù)LCALL LCMLAYCLR LCMENSETB LCMRSCLR LCMRWSETB LCMENMOV LCMDATA,ACLR LCMENRETLCMWR2:                           寫(xiě)入字符串(字符串屬于數(shù)據(jù))PUSH ACCLOOP1:CLR AMOVC A,@A+DPTRJZ LOOP2LCALL LCMWR1INC DPTRLJMP LOOP1LOOP2:POP ACCRETLCMSET:                            ;程序初始化MOV A,#38HLCALL LCMWR0MOV A,#08HLCALL LCMWR0MOV A,#01HLCALL LCMWR0MOV A,#06HLCALL LCMWR0MOV A,#0CHLCALL LCMWR0RETLCMCLR:                             ;清屏MOV A,#01HLCALL LCMWR0RETDELAY:MOV R6,#5           ;2.7MS延時(shí)子程序(作用尚不知)D1:  MOV R7,#248DJNZ R7,$DJNZ R6,D1RETEND


          評(píng)論


          技術(shù)專區(qū)

          關(guān)閉
          看屁屁www成人影院,亚洲人妻成人图片,亚洲精品成人午夜在线,日韩在线 欧美成人 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();