我给你发一个看看,是protues的仿真电路图,可以运行看效果,还有keil的汇编程序,有邮箱给你发去我给你发了啊!!!下边是程序:org 0000h sjmp mainorg 0030hmain: mov p0,#11101110b acall del1 acall del1 acall del1 acall mmm mov p0,#11011011b acall del1 acall del1 mov p0,#11110101b lcall del1 acall del1 acall del1 acall mmm sjmp maindel1:mov r0,#0ffhloop1:mov r1,#0ffhloop2:djnz r1,loop2 djnz r0,loop1 retmmm:mov p1,#0ffh mov p2,#0ffh mov r3,#02hmmm2:mov p1,r3 mov r2,#09h mmm1:mov p2,r2 acall del1 acall del1 djnz r2,mmm1 djnz r3,mmm2 mov p1,r3 mov r2,#09h mmm3: mov p2,r2 acall del1 acall del1 djnz r2,mmm3 ret end