How much time will elapse if the timer is loaded with 0x0210?
Answer:-
Given, Timer clock frequency = 200 MHz, Count = 0x0210 hex = 528 decimal
Time for one clock cycle = 1/200Mhz = 5 x 10-9 sec = 5 nano sec
Time elapsed = ( 65536 - 528) x ( 5 x 10-9 ) = .325 ms
The time elapsed is .325 x 10-3 sec
What value should be loaded into the timer to set the timer for 10 ms?
Answer:-
Given, Timer clock frequency = 200 MHz
Time for one clock cycle = 1/200Mhz = 5 x 10-9 sec = 5 nano sec
10 ms = ( 65536 - count) x ( 5 x 10-9 )
But, the maximum delay that can be provided by this timer is .327680 ms.
For obtaining the timer value of 10 ms, the timer need to run 10/.327680 times , that is 30 times.
Therefore, we need to load the timer with maximum value 0xFFFF and the timer should run with this value reloaded 30 times to obtain the delay of 10 ms.
Get Answers For Free
Most questions answered within 1 hours.