Question: Goal : To become familiar with clock frequency, timer outputs compare function, the polling method, and to become familiar with Dragon12-Light boards and improve your

Goal: To become familiar with clock frequency, timer outputs compare function, the polling method, and to become familiar with Dragon12-Light boards and improve your programming skills.

Project: Write a C program to do the following:

For this project, you need to write a new delay function (in C) that provides 250 milliseconds delay by using timer output compare and polling method. By calling this function four times, you achieve one second delay or, by repeating these codes four times in one function, you can also achieve one second delay.

In your main program, you need to configure PT2 and timer channel 2 appropriately. Then, use 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.

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!