16032串口测试程序

时间:2013-01-20 03:43:24
【文件属性】:

文件名称:16032串口测试程序

文件大小:7KB

文件格式:ASM

更新时间:2013-01-20 03:43:24

16032串口测试程序

www.dslcd.com www.dslcd.com COM EQU 20H;ZHI LIN JI CONG QI DAT EQU 21H;SHU JU JI CONG QI CS2 EQU P3.3; CS1 EQU P3.2;www.dslcd.com SID EQU P3.1;SHU JU XIAN SCLK EQU P3.0;SHI ZHONG XIANG ORG 0000H;www.dslcd.com AJMP MAIN; ORG 0013H; AJMP INSER;www.dslcd.com ORG 0030H; MAIN:MOV SP,#60H; CLR IT1; SETB PX1; SETB EX1; SETB EA; LCALL INT; LCALL CG_WRITE1; MOV DPTR,#TABDY3; ACALL YS;www.dslcd.com LCALL DEL; MOV DPTR,#TABDY0;www.dslcd.com ACALL YS; LCALL DEL;www.dslcd.com MOV DPTR,#TABDY1; ACALL YS; LCALL DEL; MOV DPTR,#TABDY2; ACALL YS;www.dslcd.com LCALL DEL; MOV DPTR,#TABDY4; ACALL YS; LCALL DEL; MOV DPTR,#TABDY5; ACALL YS; LCALL DEL; LCALL CG_WRITE; MOV DPTR,#TABDY2; ACALL YS; LCALL DEL; MOV DPTR,#TABDY3; ACALL YS; LCALL DEL; MOV DPTR,#TABDY4; ACALL YS; LCALL DEL; MOV DPTR,#TABDY5; ACALL YS; LCALL DEL;www.dslcd.com AJMP MAIN; PR1:PUSH ACC; MOV A,COM; SETB CS1;xie ru zwww.dslcd.comhi ling SETB CS2; SETB SID; CLR SCLK; SETB SCLK;1 CLR SCLK; SETB SCLK;2 CLR SCLK; SETB SCLK;3 CLR SCLK; SETB SCLK;4www.dslcd.com CLR SCLK; SETB SCLK;5 CLR SCLK; CLR SID; SETB SCLK;1 CLR SCLK; SETB SCLK;2 CLR SCLK; SETB SCLK;3 CLR SCLK; MOV C,ACC.7; MOV SID,C; SETB SCLK; CLR SCLK; MOV C,ACC.6; MOV SID,C; SETB SCLK; CLR SCLK; MOV C,ACC.5; MOV SID,C; SETB SCLK; CLR SCLK; MOV C,ACC.4; MOV SID,C; SETB SCLK; CLR SCLK; CLR SID; SETB SCLK;1 CLR SCLK; SETB SCLK;2 CLR SCLK; SETB SCLK;3 CLR SCLK; SETB SCLK;4 CLR SCLK; MOV C,ACC.3; MOV SID,C; SETB SCLK; CLR SCLK; MOV C,ACC.2; MOV SID,C; SETB SCLK; CLR SCLK; MOV C,ACC.1; MOV SID,C; SETB SCLK; CLR SCLK; MOV C,ACC.0; MOV SID,C;www.dslcd.com SETB SCLK; CLR SCLK; CLR SID; SETB SCLK;1 CLR SCLK; SETB SCLK;2 CLR SCLK; SETB SCLK;3 CLR SCLK; SETB SCLK;4 CLR SCLK; CLR CS1; CLR CS2; ACALL DLY8; POP ACC; RET; PR2:PUSH ACC;XIE RU SHU JU MOV A,DAT;www.dslcd.com SETB CS1; SETB CS2; SETB SID; CLR SCLK; SETB SCLK;1 CLR SCLK; SETB SCLK;2 CLR SCLK; SETB SCLK;3 CLR SCLK; SETB SCLK;4 CLR SCLK; SETB SCLK;5 CLR SCLK; CLR SID; SETB SCLK;1 CLR SCLK; SETB SID;www.dslcd.comwww.dslcd.com SETB SCLK;2 CLR SCLK; CLR SID; SETB SCLK;3 CLR SCLK; MOV C,ACC.7; MOV SID,C; SETB SCLK; CLR SCLK; MOV C,ACC.6;www.dslcd.com MOV SID,C; SETB SCLK; CLR SCLK; MOV C,ACC.5; MOV SID,C; SETB SCLK; CLR SCLK; MOV C,ACC.4; MOV SID,C; SETB SCLK; CLR SCLK; CLR SID; SETB SCLK;1 CLR SCLK; SETB SCLK;2 CLR SCLK; SETB SCLK;3 CLR SCLK; SETB SCLK;4 CLR SCLK; MOV C,ACC.3; MOV SID,C; SETB SCLK; CLR SCLK;www.dslcd.comwww.dslcd.com MOV C,ACC.2; MOV SID,C; SETB SCLK; CLR SCLK; MOV C,ACC.1; MOV SID,C; SETB SCLK; CLR SCLK; MOV C,ACC.0; MOV SID,C;www.dslcd.com SETB SCLK; CLR SCLK; CLR SID; SETB SCLK;1 CLR SCLK; SETB SCLK;2 CLR SCLK; SETB SCLK;3 CLR SCLK; SETB SCLK;4 CLR SCLK; CLR CS1; CLR CS2; ACALL DELAY; POP ACC; RET; INSER:ACALL DELAY;ZHONG DUAN JNB P3.3,$;www.dslcd.com ACALL DELAY; JB P3.3,$; ACALL DELAY; JNB P3.3,$; ACALL DELAY; JNB P3.3,$; RETI; YS:MOV COM,#80H; LCALL PR1; MOV R2,#32; MOV R3,#00H; LOOP1:MOV A,R3; MOVC A,@A+DPTR; MOV DAT,A; LCALL PR2; INC R3; DJNZ R2,LOOP1; MOV COM,#90H; LCALL PR1; MOV R2,#32; LOOP2:MOV A,R3; MOVC A,@A+DPTR; MOV DAT,A; LCALL PR2;www.dslcd.com INC R3; DJNZ R2,LOOP2; RET; INT:MOV COM,#38H; LCALL PR1; MOV COM,#01H; LCALL PR1; MOV COM,#06H; LCALL PR1; MOV COM,#0FH; LCALL PR1; RET; CG_WRITE:MOV COM,#40H; LCALL PR1; MOV R2,#128; MOV R3,#00H; MOV DPTR,#CGTAB1; CG1:MOV A,R3; MOVC A,@A+DPTR; MOV DAT,A; LCALL PR2; INC R3; DJNZ R2,CG1; RET; CG_WRITE1:MOV COM,#40H; LCALL PR1; MOV R2,#128; MOV R3,#00H; MOV DPTR,#CGTAB; CG2:MOV A,R3; MOVC A,@A+DPTR; MOV DAT,A; LCALL PR2; INC R3; DJNZ R2,CG2; RET; CGTAB:DB 00H,00H,00H,00H,00H,00H,00H,00H;0 DB 00H,00H,00H,00H,00H,00H,00H,00H; DB 00H,00H,00H,00H,00H,00H,00H,00H; DB 00H,00H,00H,00H,00H,00H,00H,00H; DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH;1 DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH; DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH; DB 0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH,0FFH; DB 0AAH,0AAH,055H,055H,0AAH,0AAH,055H,055H;2 DB 0AAH,0AAH,055H,055H,0AAH,0AAH,055H,055H; DB 0AAH,0AAH,055H,055H,0AAH,0AAH,055H,055H; DB 0AAH,0AAH,055H,055H,0AAH,0AAH,055H,055H; DB 055H,055H,0AAH,0AAH,055H,055H,0AAH,0AAH;3 DB 055H,055H,0AAH,0AAH,055H,055H,0AAH,0AAH; DB 055H,055H,0AAH,0AAH,055H,055H,0AAH,0AAH; DB 055H,055H,0AAH,0AAH,055H,055H,0AAH,0AAH; CGTAB1:DB 055H,055H,055H,055H,055H,055H,055H,055H;0 DB 055H,055H,055H,055H,055H,055H,055H,055H; DB 055H,055H,055H,055H,055H,055H,055H,055H; DB 055H,055H,055H,055H,055H,055H,055H,055H; DB 0AAH,0AAH,0AAH,0AAH,0AAH,0AAH,0AAH,0AAH;1 DB 0AAH,0AAH,0AAH,0AAH,0AAH,0AAH,0AAH,0AAH; DB 0AAH,0AAH,0AAH,0AAH,0AAH,0AAH,0AAH,0AAH; DB 0AAH,0AAH,0AAH,0AAH,0AAH,0AAH,0AAH,0AAH; DB 0FFH,0FFH,000H,000H,0FFH,0FFH,000H,000H;2 DB 0FFH,0FFH,000H,000H,0FFH,0FFH,000H,000H; DB 0FFH,0FFH,000H,000H,0FFH,0FFH,000H,000H; DB 0FFH,0FFH,000H,000H,0FFH,0FFH,000H,000H; DB 000H,000H,0FFH,0FFH,000H,000H,0FFH,0FFH;3 DB 000H,000H,0FFH,0FFH,000H,000H,0FFH,0FFH; DB 000H,000H,0FFH,0FFH,000H,000H,0FFH,0FFH; DB 000H,000H,0FFH,0FFH,000H,000H,0FFH,0FFH; TABDY0:DB 0BBH,0B6H,0D3H,0ADH,0BBH,0DDH,0B9H,0CBH,0D4H,0A3H,0CCH,0EFH,0B5H,0E7H,0D7H,0D3H,0B9H,0ABH,0CBH,0BEH; DB 0BBH,0B6H,0D3H,0ADH,0BBH,0DDH,0B9H,0CBH,0D4H,0A3H,0CCH,0EFH; DB 0BBH,0B6H,0D3H,0ADH,0BBH,0DDH,0B9H,0CBH,0D4H,0A3H,0CCH,0EFH,0B5H,0E7H,0D7H,0D3H,0B9H,0ABH,0CBH,0BEH; DB 0BBH,0B6H,0D3H,0ADH,0BBH,0DDH,0B9H,0CBH,0D4H,0A3H,0CCH,0EFH; TABDY1:DB 21H,22H,23H,24H,25H,26H,27H,28H,29H,2AH,2BH,2CH,2DH,2EH,2FH,30H,31H,32H,33H,34H; DB 35H,36H,37H,38H,39H,3AH,3BH,3CH,3DH,3EH,3FH,40H,41H,42H,43H,44H,45H,46H,47H,48H; DB 49H,4AH,4BH,4CH,4DH,4EH,4FH,50H,51H,52H,53H,54H,55H,56H,57H,58H,59H,5AH,5BH,5CH,5DH,61H,62H,63H; TABDY3:DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H; DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H; DB 00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H,00H; TABDY2:DB 00H,02H,00H,02H,00H,02H,00H,02H,00H,02H,00H,02H,00H,02H,00H,02H,00H,02H,00H,02H; DB 00H,02H,00H,02H,00H,02H,00H,02H,00H,02H,00H,02H,00H,02H,00H,02H,00H,02H,00H,02H; DB 00H,02H,00H,02H,00H,02H,00H,02H,00H,02H,00H,02H,00H,02H,00H,02H,00H,02H,00H,02H,00H,02H,00H,02H; TABDY4:DB 00H,04H,00H,04H,00H,04H,00H,04H,00H,04H,00H,04H,00H,04H,00H,04H,00H,04H,00H,04H; DB 00H,04H,00H,04H,00H,04H,00H,04H,00H,04H,00H,04H,00H,04H,00H,04H,00H,04H,00H,04H; DB 00H,04H,00H,04H,00H,04H,00H,04H,00H,04H,00H,04H,00H,04H,00H,04H,00H,04H,00H,04H,00H,04H,00H,04H; TABDY5:DB 00H,06H,00H,06H,00H,06H,00H,06H,00H,06H,00H,06H,00H,06H,00H,06H,00H,06H,00H,06H; DB 00H,06H,00H,06H,00H,06H,00H,06H,00H,06H,00H,06H,00H,06H,00H,06H,00H,06H,00H,06H; DB 00H,06H,00H,06H,00H,06H,00H,06H,00H,06H,00H,06H,00H,06H,00H,06H,00H,06H,00H,06H,00H,06H,00H,06H; DEL:MOV R7,#0FFH; DEL1:MOV R6,#0A0H; DEL2:MOV R5,#03H; DEL3:DJNZ R5,DEL3; DJNZ R6,DEL2; DJNZ R7,DEL1; RET; DELAY:MOV R7,#0FFH; MOV R6,#03FH; IN:DJNZ R7,IN; DJNZ R6,IN; RET; DLY8:MOV R7,#0FFH; DL:DJNZ R7,DL; RET; END 


网友评论