正文描述:《基于at89c51单片机彩灯设计控制器毕业论文》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、利用8051的P0口和P2口做花样流水灯的控制程序ORG0000HJMPMAINORG0030H;*********************************************************MAIN:MOVSP,#60HMOVP0,#0FFHMOVP2,#0FFHMOVR0,#00HMAIN1:MOVA,R0;取数地址送AMOVDPTR,#TABLE_P0;查表取数MOVCA,@A+DPTRMOVP0,A;送P0显示MOVA,R0MOVDPTR,#TABLE_P2;查表取数MOVCA,@A+DPTRMOVP2,A;送P2显示INCR0;取数地址加1CALLDE
2、LAYCJNER0,#90,MAIN1MOVR0,#00HJMPMAIN1;*********************************************************DELAY:;延时子程序MOVR5,#03DEL1:MOVR6,#250DEL2:MOVR7,#248DJNZR7,$DJNZR6,DEL2DJNZR5,DEL1RET;*********************************************************TABLE_P0:DB0FEH,0FDH,0FBH,0F7H,0EFH,0DFH,0BFH,07FHDB0FFH,
3、0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFHDB0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFHDB07FH,0BFH,0DFH,0EFH,0F7H,0FBH,0FDH,0FEH,0FFHDB0FEH,0FDH,0FBH,0F7H,0EFH,0DFH,0BFH,07FHDB0BFH,0DFH,0EFH,0F7H,0FBH,0FDH,0FEH,0FFHDB0FCH,0F3H,0CFH,03FH,0FFH,0FFH,0FFH,0FFHDB0FFH,0FFH,0FFH,0FFH,0FFH,03FH,0CFH,0F3H,0FC
4、H,0FFHDB0FCH,0F3H,0CFH,03FH,0FFH,03FH,0CFH,0F3H,0FCH,0FFHDB0F0H,0FFH,00FH,0FFH,0FFH,000H,000H,0FFH,000H,000H,0FFH,0FFHTABLE_P2:DB0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFHDB0FEH,0FDH,0FBH,0F7H,0EFH,0DFH,0BFH,07FHDB0FFH,07FH,0BFH,0DFH,0EFH,0F7H,0FBH,0FDH,0FEHDB0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0F
5、FH,0FFHDB07FH,0BFH,0DFH,0EFH,0F7H,0FBH,0FDH,0FEHDB0FDH,0FBH,0F7H,0EFH,0DFH,0BFH,07FH,0FFHDB0FFH,0FFH,0FFH,0FFH,0FCH,0F3H,0CFH,03FHDB0FFH,03FH,0CFH,0F3H,0FCH,0FFH,0FFH,0FFH,0FFH,0FFHDB03FH,0CFH,0F3H,0FCH,0FFH,0FCH,0F3H,0CFH,03FH,0FFHDB00FH,0FFH,0F0H,0FFH,0FFH,000H,000H,0FFH,000H,000H,0FFH,0FFH;
6、*********************************************************END养模式下下面系第一种模式工作为例:葿螈聿蒄葿袁羁莀蒈羃膇芆蒇蚃羀膂蒆螅膅蒁薅袇羈莇薄罿膄芃薃虿羆艿薃袁节膅薂羄肅蒃薁蚃芀荿薀螆肃芅蕿袈芈膁蚈羀肁蒀蚇蚀袄莆蚇螂肀莂蚆羅袂芈蚅蚄膈膄蚄螇羁蒂蚃衿膆莈蚂羁罿芄螁蚁膄膀螁螃羇葿螀袅膃蒅蝿肈羆莁螈螇芁芇莄袀肄膃莄羂艿蒂莃蚂肂莈蒂螄芈芄蒁袆肀膀蒀罿袃薈葿螈聿蒄葿袁羁莀蒈羃膇芆蒇蚃羀膂蒆螅膅蒁薅袇羈莇薄罿膄芃薃虿羆艿薃袁节膅薂羄肅蒃薁蚃芀荿薀螆肃芅蕿袈芈膁蚈羀肁蒀蚇蚀袄莆蚇螂肀莂蚆羅袂芈蚅蚄膈膄蚄螇羁蒂蚃衿膆莈蚂羁罿芄螁蚁膄膀螁
7、螃羇葿螀袅膃蒅蝿肈羆莁螈螇芁芇莄袀肄膃莄羂艿蒂莃蚂肂莈蒂螄芈芄蒁袆肀膀蒀罿袃薈葿螈聿蒄葿袁羁莀蒈羃膇芆蒇蚃羀膂蒆螅膅蒁薅袇羈莇薄罿膄芃薃虿羆艿薃袁节膅薂羄肅蒃薁蚃芀荿薀螆肃芅蕿袈芈膁蚈羀肁蒀蚇蚀袄莆蚇螂肀莂蚆羅袂芈蚅蚄膈膄蚄螇羁蒂蚃衿膆莈蚂羁罿芄螁蚁膄膀螁螃羇葿螀袅膃蒅蝿肈羆莁螈螇芁芇莄袀肄膃莄羂艿蒂莃蚂肂莈蒂螄芈芄蒁袆肀膀蒀罿袃薈葿螈聿蒄葿袁羁莀蒈羃膇芆蒇蚃羀膂蒆螅膅蒁薅袇羈莇薄罿膄芃薃虿羆艿薃袁节膅薂羄肅蒃薁蚃芀荿薀螆肃芅蕿袈芈膁蚈羀肁蒀蚇蚀袄莆蚇螂肀莂蚆羅袂芈蚅
显示全部收起