org 0000h
ljmp main
org 0100h
main:mov p1,#00h
mov p3,#0ffh
mov tmod,#01h
up:
j1:jb p3.3,j1
lcall delay //15ms delay
setb p1.6
lcall delay1 //1ms delay
clr p1.6
sjmp up
delay: //15ms delay
mov th0,#0eeh
mov tl0,#09h
setb tr0
l1:jnb tf0,l1
clr tf0
clr tr0
ret
delay1: //1ms delay
mov th0,#0feh
mov tl0,#0d2h
setb tr1
l:jnb tf1,l
clr tf1
clr tr1
ret
lcall delay //15ms delay
delay:
mov th0,#0eeh
mov tl0,#09h
setb tr0
l1:jnb tf0,l1
clr tf0
clr tr0
ret
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?