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

          新聞中心

          用EM78P153S給同事寫流水燈

          作者: 時(shí)間:2016-11-29 來(lái)源:網(wǎng)絡(luò) 收藏
          基于EM78P153S流水燈
          #include"EM78x153xx.h"#define DISI()  _asm{disi}#define ENI()  _asm{eni}#define SLEP()  _asm{slep}#define NOP()  _asm{nop}#define WDTC() _asm{wdtc}typedef unsigned char uchar;typedef unsigned int uint;typedef unsigned short ushort;#define ledl PORT5#define ledh PORT6void delay(void){uchar i,j;for(j=0;j<200;j++)for(i=0;i<200;i++)NOP();}const ushort rundata[16]={0xfffe,0xfffc,0xfff8,0xfff0,0xffe0,0xffc0,0xff80,0xff00,0xfe00,0xfc00,0xf800,0xf000,0xe000,0xc000,0x8000,0x0000};void main(void){uchar i,j,k;uint run;WDTC();//清看門狗DISI();//禁止中斷STATUS=0X00;//清除狀態(tài)標(biāo)志位P5CR=0x00;//置P5為輸出口P6CR=0x00;//置P6為輸出口PDCR=0x00;//禁止P5,P6下拉ODCR=0x00;//禁止P6開漏PHCR=0x00;//禁止P6上拉for(;;)for(i=0,k=0;i<16;i++,k--){run=rundata[i];for(j=0;j>8);delay();}}}void _intcall interrupt(void) @ int {// Write your code (inline assembly or C) here//restore ACC,R3,R4_asm{reti            //tell Compiler to recover common registers hereSWAP 0X1F    ;restore ASWAPA 0X1F}}void _intcall interrupt_l(void) @ 0x08:low_int 0{_asm {//save A --> 0x1F MOV 0X1F,A   ;backup A to 0x1F}   }


          關(guān)鍵詞: EM78P153S流水

          評(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); })();