This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Formulas for calculating delays, overflow, frequency ect.

Hi 

Newbie in the nRF family of products so i might have missed the answers to my questions somewhere in the documentation and forum. if so i apologize. 

I'm trying to get an understanding of the timers and how to configure them to get what i want. From Arduino one could calculate delays, frequency, duty cycles etc. by having the correct values in various registers. 

for example if i wanted to drive an output pin at a certain frequency, i could use the formula cpu_freq/(2 * prescaler * OCRn) = out_freq this way i know how to configure each element to get what i want. 

To configure a timer in normal mode with a specific delay i could use (prescaler * ((OCRn + 1) - TCNTn) / cpu_freq

Question is: (Where) can i find equivalent formulas for the nRF's ?

Parents Reply Children
No Data
Related