;以下为一个流水灯试验。 ;以下程序为配合Ledkey.dll程序使用。 ;如果有不会使用请到网络上找“弱电之家” ;复制下面的代码到Keil中,按视频教程要求设置好参数,就能运行了。 loop: clr p1.0 acall d01s setb p1.0 clr p1.1 acall d01s setb p1.1 clr p1.2 acall d01s setb p1.2 clr p1.3 acall d01s setb p1.3 clr p1.4 acall d01s setb p1.4 clr p1.5 acall d01s setb p1.5 clr p1.6 acall d01s setb p1.6 clr p1.7 acall d01s setb p1.7 acall d01s ljmp loop ;延时子程序,如果显示过快,可修改参数。 d01s: mov r0,#255 d01l1: mov r1,#195 djnz r1,$ djnz r0,d01l1 ret end