Question: 3 . Analyze the following program. Comment on the duty cycle. MOV TMOD, # 0 1 ; Timer 0 , mode 1 ( 1
Analyze the following program. Comment on the duty cycle.
MOV TMOD, # ; Timer mode bit mode
HERE: MOV TLO, # mathrm~FmathrmH ; mathrmTLmathrmFmathrmH the low byte
MOV THO, #FFH ; THO FFH the high byte
CPL P ; toggle P
ACALL DELAY
SJMP HERE
; load TH TL again
; delay using Timer
DELAY:
SETB TRO ; start Timer
AGAIN: JNB TF AGAIN ; monitor Timer flag until it rolls over
CLR TRO ; stop Timer
CLR TF ; clear Timer flag
RET
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
