单片机控制8x8led点阵(单片机8X8LED点阵显示)

单片机显示“中国生日快乐520❤️”仿真视频,我来为大家科普一下关于单片机控制8x8led点阵?以下内容希望对你有帮助!

单片机控制8x8led点阵(单片机8X8LED点阵显示)

单片机控制8x8led点阵

仿真视频

单片机显示“中国生日快乐520❤️”仿真视频

(点击上方蓝色字体即可观看视频)

硬件图如下图:元件清单如下图:程序如下(C语言):

unsigned char led1[]={0XEF,0XEF,0X83,0XAB,0XAB,0X83,0XEF,0XEF}; //中 unsigned char led2[]={0x01,0X7D,0X45,0X45,0X65,0X45,0X7D,0X01}; //国 unsigned char led3[]={0xF7,0XD7,0X80,0X77,0XC1,0XF7,0XF7,0X00}; //生 unsigned char led4[]={0x83,0XBB,0XBB,0X83,0XBB,0XBB,0X83,0XFF}; //日 unsigned char led5[]={0xDB,0XDB,0X91,0X49,0XD0,0XD5,0XCE,0XFF}; //快 unsigned char led6[]={0xEF,0XD7,0XB7,0X81,0XF7,0XD5,0XA6,0XF7}; //乐 unsigned char led7[]={0xC1,0XDF,0XDF,0XC1,0XFD,0XFD,0XFD,0XC1}; //5 unsigned char led8[]={0x81,0XFD,0XFD,0X81,0XBF,0XBF,0XBF,0X81}; //2 unsigned char led9[]={0xC3,0XBD,0XBD,0XBD,0XBD,0XBD,0XBD,0XC3};//0 unsigned char led10[]={0xFF,0X99,0X00,0X00,0X00,0X81,0XC3,0XE7};//爱心图形 void delay(unsigned int k); void main() { unsigned char t,i,w; while(1) { P2=0XFF; P3=0XFF; for(t=0;t<100;t ) { w=0x01; for(i=0;i<8;i ) { P1=w; P0=led1[i]; delay(1); w<<=1; } } for(t=0;t<100;t ) { w=0x01; for(i=0;i<8;i ) { P1=w; P0=led2[i]; delay(1); w<<=1; } } for(t=0;t<100;t ) { w=0x01; for(i=0;i<8;i ) { P1=w; P0=led3[i]; delay(1); w<<=1; } } for(t=0;t<100;t ) { w=0x01; for(i=0;i<8;i ) { P1=w; P0=led4[i]; delay(1); w<<=1; } } for(t=0;t<100;t ) { w=0x01; for(i=0;i<8;i ) { P1=w; P0=led5[i]; delay(1); w<<=1; } } for(t=0;t<100;t ) { w=0x01; for(i=0;i<8;i ) { P1=w; P0=led6[i]; delay(1); w<<=1; } } for(t=0;t<100;t ) { w=0x01; for(i=0;i<8;i ) { P1=w; P0=led7[i]; delay(1); w<<=1; } } for(t=0;t<100;t ) { w=0x01; for(i=0;i<8;i ) { P1=w; P0=led8[i]; delay(1); w<<=1; } } for(t=0;t<100;t ) { w=0x01; for(i=0;i<8;i ) { P1=w; P0=led9[i]; delay(1); w<<=1; } } for(t=0;t<100;t ) { w=0x01; for(i=0;i<8;i ) { P1=w; P0=led10[i]; delay(1); w<<=1; } } } } void delay(unsigned int k) { unsigned char i,j; for(i=0;i<100;i ) for(j=0;j<k;j ); }

#单片机##C语言##51单片机##表白祖国#

免责声明:本文仅代表文章作者的个人观点,与本站无关。其原创性、真实性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容文字的真实性、完整性和原创性本站不作任何保证或承诺,请读者仅作参考,并自行核实相关内容。文章投诉邮箱:anhduc.ph@yahoo.com

    分享
    投诉
    首页