2、OO>P0.0/AD0P0.1/AD1P0.2/AD2P0.3/AD3P0.4/AD4P0.5/AD5P0.6/AD6P0.7/AD7ALEPSENP2.7/A15P2.6/A14P2.5/A13P2.4/A12P2.3/A11P2.2/A10P2.1/A9P2.0憎NO393837363534333230292827262524232221AT89S51Y10030p30p1GNU图4.26.13.硕件系统连线(1).把“单片机系统”区域中的P1端口用8芯排芯连接到“点阵模块”区域中的“DR1—DR8”端口上;(2).把“单片机系统”区域中的P3端口用8芯排芯连接到“点阵模
3、块”区域中的“DC1—DC8”端口上;(3)・把“单片机系统”区域中的P2.0/A8端子用导线连接到“独立式键盘”区域中的SP1端子上;4.程序设计内容(1).“★”在8X8LED点阵上显示图如下图所示12345678•••••••••••••••••••••1211,1411,3CII,4811,3CII,1411,1211,0011(2).“在8X8LED点阵上显示图如下图所示(3)・心形图在8X8LED点阵上显示图如下图所示12345678••••••••••••••30H,48H,44H,22H,44H,48H,30H,OOH4.汇编源程序CNTAEQU30HCOUN
4、TEQU31HORGOOHIJMPSTARTORG0BI1LJMPTOXORG30HSTART:MOVCNTA,#OOHMOVCOUNT,#00HMOVTMOD,#0111MOVTHO,#(65536-4000)/256MOVTLO,#(65536-4000)MOD256SETBTROSETBETOSETBEAWT:JBP2.0,WTMOVR6,#5MOVR7,#248DI:DJNZR7,$DJNZR6,DIJBP2.0,WTINCCOUNTMOVA,COUNTCJNEA,#0311,NEXTMOVCOUNT,#00HNEXT:JNBP2.0,$SJMPWTTOX:NOPMO
5、VTHO,#(65536-4000)/256MOVTLO,#(65536-4000)MOD256MOVDPTR,#TABMOVA,CNTAMOVCA,0A+DPTRMOVP3,AMOVDPTR,#GRAPHMOVA,COUNTMOVB,#8MULABADDA,CNTAMOVCA,@A+DPTRMOVPl,AINCCNTAMOVA,CNTACJNEA,#8,NEXMOVCNTA,#OOHNEX:RETITAB:DBOFEH,OFDH,OFBH,0F7H,OEFH,ODFH,OBFH,07FHGRAPH:DB12H,14H,3CH,48H,3CH,14H,12H,OOHDBOOH
6、,OOH,38H,44H,44H,44H,38H,OOHDB3011,4811,4411,2211,4411,4811,3011,OOHEND4.C语言源程序ttincludeunsignedcharcodetab[]={0xfe,Oxfd,Oxfb,0xf7,Oxef,Oxdf,Oxbf,0x7f};unsignedcharcodegraph[3][8]={{0x12,0x14,0x3c,0x48,0x3c,0x14,0x12,0x00},{0x00,0x00,0x38,0x44,0x44,0x44,0x38,0x00},{0x30,0x48,0x44
7、,0x22,0x44,0x48,0x30,0x00}};unsignedcharcount;unsignedcharcnta;voidmain(void){unsignedchari,j;TM0D=0x01;THO=(65536-4000)/256;TLO=(65536-4000)%256;TRO二1;ETO=1;EA=1;while仃){if(P2_0二二0){for(i=5;i>0;i—)for(j=248;j>0;j—);if(P2_0==0){count++;if(count==3){count