#include<reg52.h>#include<intrins.h>#define uchar unsigned char#define uint unsigned intuchar codeDSY_CODE1[]={0xbf,0xbf,0x09,0x06,0xc7,0xc7,0x40,0xbf};//,,0x46,0x21,0x06,0x0e0xbf,0xbf,,0xbf ,0xbfuchar codeDSY_CODE2[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};//
延时 void DelayMS(uint xms){ uin
ti,j; for(i=xms;i>0;i--) for(j=110;j>0;j--); }//
主程序void main(){ while(1) {uint num,num2; for(num2=0;num2<8;num2++) { P2=0xff; DelayMS(10); P2=DSY_CODE2[num2]; //wei for(num=0;num<8;num++) { P0=DSY_CODE1[num]; //duan DelayMS(10); P0=0xff; P2=_crol_(P2,1); } } }
一周热门 更多>