Traffic
Traffic
Traffic
LJMP MAIN
ORG 300H
TBL: DB 0C0H,0F9H,0A4H,0B0H,99H,92H,82H,0F8H,80H,90H ;7seg data for comm.
anode type
ORG 30H
MOV A,46H
MOV B,#10
DIV AB
MOV 47H,A
MOV 48H,B
SETB P3.4
CLR P3.5
MOV A,47H
MOVC A,@A+DPTR
MOV P2,A
ACALL DELAY
MOV P3,#00H
SETB P3.5
CLR P3.4
MOV A,48H
MOVC A,@A+DPTR
MOV P2,A
ACALL DELAY
MOV P3,#00H
MOV A,49H
MOV B,#10
DIV AB
MOV 50H,A
MOV 51H,B
SETB P3.6
CLR P3.7
MOV A,50H
MOVC A,@A+DPTR
MOV P2,A
ACALL DELAY
MOV P3,#00H
SETB P3.7
CLR P3.6
MOV A,51H
MOVC A,@A+DPTR
MOV P2,A
ACALL DELAY
MOV P3,#00H
DJNZ R0,X2
MOV R0,#35
DJNZ 40H,Q1
MOV 40H,#20