# How to calculate precise delay in nrf51822 for Timer ?

i m new in nrf51822 controller so help me for coding of my question. any help will be appriciate. thank you.

edit retag close delete

Is it the drift you want to calculate? The TIMER peripheral is based on the high-frequency clock source (HFCLK), and if you run the HFCLK from the external 16 MHz crystal the drift will be given by the external crystal's ppm (the crystal clock accuracy). Here is an online-calculator you can use to calculate the drift. The formula is: Time Drift in Seconds/Day = ( [ Accuracy in PPM ] / 1 Million ) * ( # Seconds Per Day ). E.g. 10 ppm gives max 0.86 second drift per 24 hours.