色婷婷AⅤ一区二区三区|亚洲精品第一国产综合亚AV|久久精品官方网视频|日本28视频香蕉

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設計應用 > 用EM78P153S給同事寫流水燈

          用EM78P153S給同事寫流水燈

          作者: 時間:2016-11-29 來源:網(wǎng)絡 收藏
          基于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)標志位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}   }


          關鍵詞: EM78P153S流水

          評論


          技術專區(qū)

          關閉