8051单片机P0口接有16个LED,编程实现流水灯,每次亮一个亮1s后熄灭再亮...答:MIN: MOV R0,#00H MOV DPTR,#TABDD1: MOV A, R0 MOVC A,@A+DPTR MOV P1, A ACALL DELAY1 INC R0 CJNE R0, #10H, DD1 JMP MIN DELAY1: MOV R5,#2 ; 可以改时间 D1: MOV R6,#255 D2: MOV R7,#255 D3: DJN...
AT8951单片机,关于一个简单的这流水灯程序,用汇编语言的答:延时根据单片机调整.ORG 00H MOV P2,#80H START:MOV A,#0FFH ;赋初值 CLR C MOV R2,#8 LOOP:RRC A ; 带进位右移 MOV P1,A CALL DELAY DJNZ R2,LOOP MOV R2,#7 LOOP1:RLC A ; 带进位左移 MOV P1,A CALL DELAY DJNZ R2,LOOP1 JMP START DELAY:MOV R3,#20 ; ...
请帮忙编写一个花样流水灯单片机程序(要求1,3,5,7灯亮,2,4,6,8灯...答:先把P1口全部接低电平!ORG 0000H AJMP START ORG 0040H AA:MOV P1,#55H ACALL DELAY MOV P1,#0AAH ACALL DELAY MOV P1,#00H ACALL DELAY AJMP AA DELAY:MOV R5,#256 LOOP2:MOV R4,#256 LOOP1:NOP NOP DJNZ R4,LOOP1 DJNZ R5,LOOP2 RET ...