Skip to main content

Toggle P1.5 continuously using timeer 1(50% duty cycle)


Toggle P1.5 continuously using timeer 1(50% duty cycle)
 org 00h
 mov TMOD,#10h

up: clr P1.5
 acall delay
 setb P1.5
 acall delay
 sjmp up
delay: mov TH1,#0ffh
 mov TL1,#0ffh
 setb TR1
here: jnb TF1,here
  clr TF1
  ret
  end

Comments