Help to calculate frequency ArduinoZero timer library

Hi,

I'am working with ArduinoZeo library. But I would like to know how to calculate frequency, in this file here you can see if/else to calculate diveder, compare and prescaler. But I would like to know how to calculate these items with math formula.
For exemple if I want to create my timer at 10Hz frequency, what's the formula?? I didn't find concret examples on internet.

Adafruit says: "This code is not for public consumption!", so why do you want to use that library ? It probably works together with something else.

There is no formula. It is, as is written in that code.
I think the minimum frequency is 0.75Hz.

If you choose 10Hz, then the library finds the prescaler and the other values.
For 10Hz they are:

  • prescaler 256
  • compare value 18750

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.