C program

Write a C program to do the following:

Write your own program to turn the Buzzer on and off in exactly one-millisecond frequency by using the timer output compare and interrupt method.
The Buzzer is connected to PT5 of the port T. In your main program, you need to write codes to configure PT5 and timer channel 5 so that interrupt for channel 5 output compare is enabled, and PT5 is configured in toggle mode. You need to write an interrupt service routine for timer channel 5 to provide a one-millisecond delay (or interrupt).
In EVB (or Debug) mode, the clock frequency for instructions is 24MHz. Use a variable called “ClockCycles” that provides the correct number of clock cycles for the service routine to generate exactly one-millisecond delay. This variable is similar to the variable “Period” in the example program Buzzer.txt.