; This program is to test LED display using 8051 prototype board
; 8 Led blink for a second ( 11.057 mhz)
;P1=data pin
org 00h
sjmp main
org 050h
main:
mov p0,#00h
mov p1,#00h
mov p2,#00h
mov p3,#00h
setb p1.0
acall delay
clr p1.0
acall delay
setb p1.1
acall delay
clr p1.1
acall delay
setb p1.2
acall delay
clr p1.2
acall delay
setb p1.3
acall delay
clr p1.3
acall delay
setb p1.4
acall delay
clr p1.4
acall delay
setb p1.5
acall delay
clr p1.5
acall delay
setb p1.6
acall delay
clr p1.6
acall delay
setb p1.7
acall delay
clr p1.7
acall delay
mov p1,0ffh
acall delay
acall delay
mov p1,00h
acall delay
acall delay
mov p1,0ffh
acall delay
acall delay
sjmp main
;-------------------delay program------------------------
DELAY:
MOV TMOD,#010H
MOV R3,#04H ;95
TES: MOV TL1,#00H ;00
MOV TH1,#00H ;00
SETB TR1
T : JNB TF1,T
CLR TR1
CLR TF1
DJNZ R3,TES
RET
;---------------------end-------------------------------------
end