Answered step by step
Verified Expert Solution
Question
1 Approved Answer
[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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started