Question: For this project, you need to write a new delay function that provides 250 milliseconds delay by using the timer output compare and polling method.
- For this project, you need to write a new delay function that provides 250 milliseconds delay by using the timer output compare and polling method. By calling this function four times, you achieve a one-second delay or, by repeating these codes four times in one function, you can also achieve a one-second delay.
- In your main program, you need to configure PT2 and timer channel 2 appropriately. Then, use the output compare and polling method to write your delay function. Please note: 250ms = 0.25s. The clock frequency for instructions in EVB mode is 24MHz.
- Be sure you understand why you have to delay only 250ms each time using timer output compare, not the entire one second under the clock frequency condition.
This is for the dragon12-light micro controller. This has to be an asm code.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
