2. Provide the subroutine for the specific output compare channel as shown in th
ID: 3599006 • Letter: 2
Question
2. Provide the subroutine for the specific output compare channel as shown in the table above That means you have to provide four different subroutines. All four Output Compare Channels are different. Ch. # | 7 | 6 | 5 | 4 | 3 | 2 | 110 a) : enable TCNT and fast flags clear :configure prescale factor to 128 ; enable OC delay movb #890, TSCRI TSCR2 TIOS ldd TCNT addd std TC brclr TFLG1,S rts start an output compare operation : with 152 ms time delay if equal, C2F in TFLG1 is set to 1 Ch. # 7 615 |4 |3 |2 |1 b) #$90, TSCRI : enable TCNT and fast flags clear : configure prescale factor to 64 : enable OC4 delay movb TSCR2 TIOS movb #$ ldd TCNT addd std TC brclr TELG1,Sif cqual, C4F in TFLGI is set to l rts start an output compare operation : with 60 ms time delayExplanation / Answer
Ans:a) According to the question,we have to provide four different subroutine.
delay movb #$90,TSCR1
movb #$01,TSCR2
movb #$08,TIOS
ldd TCNT
addd #50
std TC3
brclr TFLG1,$04,*
rts
b)
delay movb #$90,TSCR1
movb #$01,TSCR2
movb #$04,TIOS
ldd TCNT
addd #50
std TC5
brclr TFLG1,$04,*
rts
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.