51单片机心形闪烁配套资料.zip

时间:2022-06-21 10:27:16
【文件属性】:

文件名称:51单片机心形闪烁配套资料.zip

文件大小:434KB

文件格式:ZIP

更新时间:2022-06-21 10:27:16

51

51单片机心形闪烁配套资料 #include #define uint unsigned int #define uchar unsigned char uchar code table0[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};//LED???λ????λ?? uchar code table1[]={0x7f,0xbf,0xdf,0xef,0xf7,0xfb,0xfd,0xfe};//LED???λ????λ?? uchar code table2[]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00};//LED??1??????8????????(???λ????λ) uchar code table3[]={0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x00};//LED??1??????8????????(???λ????λ) uchar code table4[]={0x00,0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f,0xff};//LED??8????????????????(???λ????λ) uchar code table5[]={0x00,0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff};//LED??8????????????????(???λ????λ) uchar code table6[]={0xfe,0xfc,0xfa,0xf6,0xee,0xde,0xbe,0x7e};//LED???λ????λ??(???λ????0) uchar code table7[]={0x7f,0x3f,0x5f,0x6f,0x77,0x7b,0x7d,0x7e};//LED???λ????λ??(???λ????0) uchar i,j; //??????????? uint tt=70; //?????????? void delay(uint time) //??????? { uint x,y; for(x=time;x>0;x--) for(y=110;y>0;y--); } void disp0() //??0 ????LED???3?? { for(i=0;i<3;i++) { P0=0x00; P2=0x00; P3=0x00; P1=0x00; delay(300); P0=0xff; P2=0xff; P3=0xff; P1=0xff; delay(300); } } void disp1() //??1 LED??????? { for(i=0;i<8;i++) { P2=table1[i]; delay(100); } P2=0xff; for(i=0;i<8;i++) { P3=table1[i]; delay(100); } P3=0xff; for(i=0;i<8;i++) { P1=table1[i]; delay(100); } P1=0xff; for(i=0;i<8;i++) { P0=table0[i]; delay(100); } P0=0xff; } void disp2() //??2 LED???????? { for(i=0;i<8;i++) { P0=table1[i]; delay(100); } P0=0xff; for(i=0;i<8;i++) { P1=table0[i]; delay(100); } P1=0xff; for(i=0;i<8;i++) { P3=table0[i]; delay(100); } P3=0xff; for(i=0;i<8;i++) { P2=table0[i]; delay(100); } P2=0xff; } void disp3() //??3 4??LED??????????????1/4? { for(i=0;i<8;i++) { P0=table1[i]; P1=table1[i]; P2=table1[i]; P3=table0[i]; delay(100); } for(i=0;i<8;i++) { P0=table0[i]; P1=table0[i]; P2=table0[i]; P3=table1[i]; delay(100); } P3=0xff; P0=0xff; } void disp4() //??4 2??LED???????????? { for(i=0;i<8;i++) { P2=table1[i]; P1=table1[i]; delay(100); } P2=0xff; P1=0xff; for(i=0;i<8;i++) { P3=table1[i]; P0=table0[i]; delay(100); } P3=0xff; P0=0xff; } void disp5() //??5 2??LED????????????? { for(i=0;i<8;i++) { P0=table1[i]; P3=table0[i]; delay(100); } P0=0xff; P3=0xff; for(i=0;i<8;i++) { P1=table0[i]; P2=table0[i]; delay(100); } P1=0xff; P2=0xff; }


【文件预览】:
51单片机心形闪烁配套资料
----心形花样灯 程序()
--------hyd.c(18KB)
--------hyd.lnp(54B)
--------STARTUP.LST(11KB)
--------hyd.LST(47KB)
--------hyd.uvopt(55KB)
--------hyd.OBJ(51KB)
--------hyd_Uv2.Bak(2KB)
--------hyd.hex(12KB)
--------hyd(42KB)
--------STARTUP.A51(5KB)
--------hyd.uvproj(13KB)
--------hyd.M51(54KB)
--------STARTUP.OBJ(749B)
--------hyd_Opt.Bak(1KB)
--------hyd.opt.bak(1KB)
--------hyd.Uv2.bak(2KB)
--------hyd.plg(0B)
----电路图()
--------布线图2截图.jpg(155KB)
--------打开说明.txt(216B)
--------心形花样灯.ddb(530KB)
--------心形花样灯电路.pdf(51KB)
--------布线图1截图.jpg(114KB)
----元件清单.xls(15KB)

网友评论