Devine a function void msdelayint N to delay N milliseconds

Devine a function void ms_delay(int N) to delay N milliseconds using Timer1 without enable it as an interrupt source. Let F_cyc= 16 MHz and Prescaler = 256. Show your calculation and Ccode.

Solution

int ms_delay(int N)
{
delay(n);
return 0;
}

to get the value of the timer after N milliseconds, do it as:

current_time=clock(); will give you the current time and you can put this after calling the delay() function and you will get the time after delay.

 Devine a function void ms_delay(int N) to delay N milliseconds using Timer1 without enable it as an interrupt source. Let F_cyc= 16 MHz and Prescaler = 256. Sh

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site