Question: [25 pts] 2- Consider the WAIT subroutine for Tekbot discussed in class that waits for 1 sec. and returns. Rewrite the WAIT subroutine so that

 [25 pts] 2- Consider the WAIT subroutine for Tekbot discussed in

[25 pts] 2- Consider the WAIT subroutine for Tekbot discussed in class that waits for 1 sec. and returns. Rewrite the WAIT subroutine so that it waits for 1 sec. using the 16-bit Timer/Counterl. Assume that the system clock frequency is 16 MHz and the Timer/Counterl is operating under Normal mode. This is done by doing the following: (a) Timer/Counterl is initialized to operate in Normal mode. (b) The WAIT subroutine loads the proper value into TCNT1 and waits until TOVI is set. Once TOV1 is set, it is cleared and the WAIT subroutine returns. Use the skeleton code shown below: .include "m128def.inc" .def mpr = r16 .ORG $0000 ORG $0046 RJMP Initialize End of interrupt vectors Initialize: ...Your code goes here.. WAIT: .. . Your code goes here... RET [25 pts] 2- Consider the WAIT subroutine for Tekbot discussed in class that waits for 1 sec. and returns. Rewrite the WAIT subroutine so that it waits for 1 sec. using the 16-bit Timer/Counterl. Assume that the system clock frequency is 16 MHz and the Timer/Counterl is operating under Normal mode. This is done by doing the following: (a) Timer/Counterl is initialized to operate in Normal mode. (b) The WAIT subroutine loads the proper value into TCNT1 and waits until TOVI is set. Once TOV1 is set, it is cleared and the WAIT subroutine returns. Use the skeleton code shown below: .include "m128def.inc" .def mpr = r16 .ORG $0000 ORG $0046 RJMP Initialize End of interrupt vectors Initialize: ...Your code goes here.. WAIT: .. . Your code goes here... RET

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!