我编过一个脉冲占空比的,怎么改改能 LED灯逐渐变亮在逐渐变暗
ORG 0
AJMP MAIN
ORG 000BH
AJMP T0_INT
ORG 0030H
MAIN: SETB P1.7
SETB F0
MOV R3,#1
MOV R4,#9
MOV SP,#30H
MOV TMOD,#01H
MOV TL0,#030H
MOV TH0,#0F8H
SETB EA
SETB ET0
SETB TR0
SJMP $
ORG 0050H
T0_INT: MOV TL0,#030H
MOV TH0,#0F8H
JNB F0,LOWER
DJNZ R4,LOOP
CPL P1.7
CLR F0
MOV R4,#1
SJMP LOOP
LOWER: DJNZ R3,LOOP
CPL P1.7
SETB F0
MOV R3,#9
LOOP: RETI
END