1.实验任务在8X8LED点阵上显示柱形,让其先从左到右平滑移动三次,另一方面从右到左平滑移动三次,再次从上到下平滑移动三次,最后从下到上平滑移动三次,如此循环下去。2.电路原理图图4.24.13.硬件电路连线(1).把“单片机系统”区域中P1端口用8芯排芯连接到“点阵模块”区域中“DR1-DR8”端口上;(2).把“单片机系统”区域中P3端口用8芯排芯连接到“点阵模块”区域中“DC1-DC8”端口上;4.程序设计内容(1).8X8点阵LED工作原理阐明8X8点阵LED构造如下图所示图4.24.2从图4.24.2中可以看出,8X8点阵共需要64个发光二极管构成,且每个发光二极管是放置在行线和列线交叉点上,当相应某一列置1电平,某一行置0电平,则相应二极管就亮;因而要实现一根柱形亮法,如图49所示,相应一列为一根竖柱,或者相应一行为一根横柱,因而实现柱亮办法如下所述:一根竖柱:相应列置1,而行则采用扫描办法来实现。一根横柱:相应行置0,而列则采用扫描办法来实现。5.汇编源程序ORG00HSTART:NOPMOVR3,#3LOP2:MOVR4,#8MOVR2,#0LOP1:MOVP1,#0FFHMOVDPTR,#TABAMOVA,R2MOVCA,@A+DPTRMOVP3,AINCR2LCALLDELAYDJNZR4,LOP1DJNZR3,LOP2MOVR3,#3LOP4:MOVR4,#8MOVR2,#7LOP3:MOVP1,#0FFHMOVDPTR,#TABAMOVA,R2MOVCA,@A+DPTRMOVP3,ADECR2LCALLDELAYDJNZR4,LOP3DJNZR3,LOP4MOVR3,#3LOP6:MOVR4,#8MOVR2,#0LOP5:MOVP3,#00HMOVDPTR,#TABBMOVA,R2MOVCA,@A+DPTRMOVP1,AINCR2LCALLDELAYDJNZR4,LOP5DJNZR3,LOP6MOVR3,#3LOP8:MOVR4,#8MOVR2,#7LOP7:MOVP3,#00HMOVDPTR,#TABBMOVA,R2MOVCA,@A+DPTRMOVP1,ADECR2LCALLDELAYDJNZR4,LOP7DJNZR3,LOP8LJMPSTARTDELAY:MOVR5,#10D2:MOVR6,#20D1:MOVR7,#248DJNZR7,$DJNZR6,D1DJNZR5,D2RETTABA:DB0FEH,0FDH,0FBH,0F7H,0EFH,0DFH,0BFH,07FHTABB:DB01H,02H,04H,08H,10H,20H,40H,80HEND6.C语言源程序#includeAT89X52.Hunsignedcharcodetaba[]={0xfe,0xfd,0xfb,0xf7,0xef,0xdf,0xbf,0x7f};unsignedcharcodetabb[]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};voiddelay(void){unsignedchari,j;for(i=10;i0;i--)for(j=248;j0;j--);}voiddelay1(void){unsignedchari,j,k;for(k=10;k0;k--)for(i=20;i0;i--)for(j=248;j0;j--);}voidmain(void){unsignedchari,j;while(1){for(j=0;j3;j++)//fromlefttoright3time{for(i=0;i8;i++){P3=taba[i];P1=0xff;delay1();}}for(j=0;j3;j++){for(i=0;i8;i++){P3=taba[7-i];P1=0xff;delay1();}}//fromrighttoleft3timefor(j=0;j3;j++)//fromtoptobottom3time{for(i=0;i8;i++){P3=0x00;P1=tabb[7-i];delay1();}}for(j=0;j3;j++){for(i=0;i8;i++){P3=0x00;P1=tabb[i];delay1();}}}}//frombottomtotop3time