Hello,
In timer concept I want to clear a thing to load a value for MR0 for example of 1 seconds.For 1 seconds I used to load a value for MR0 using the following calculation,
F=12Mhz(PCLK)
For calculating time,T=1/F
(i.e.)T=1/(12*10^6)=0.083Usec(for 1 clock cycle)
So using this for 1sec=1hz,the MR0 value I used was 83000.Is it the correct method?
Hello Westermark Sir,
Ya it represents 10 to the power of 6,which is equivalent to 1MHZ. It doesn't represents the bitwise XOR operation.
Yes for 12 million ticks,I have moved a value for MR0 using the calculation as below,
MRO_value=[(PCLK/time req. in Hz)]-1;
So my PCLK is 12mhz and time required is 1sec=1Hz
MR0_value=[12000000/1]-1;
=11,999,999. This is the value I used to load in MR0 register.
Thanks for providing info.