用51单片机控制8个发光二极管从左往右循环流水发光,用汇编语言编程,管脚接p0.0―p0.7。

2025-04-05 12:32:22
推荐回答(1个)
回答1:

org 0000h
ajmp start
org 0200h
start:mov r0,#8
mov a,#feh
loop:mov p1,a
acall delay
rl a
djnz r0,loop
ajmp start
delay:
mov r1,#100
l1:mov r2,#100
l2:mov r3,#248
l3:djna r3,l3
djnz r2,l2
djnz r1,l1
ret
end