https://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7810-Automotive-Microcontrollers-ATmega328P_Datasheet.pdf
If I understand correctly AVR datsheet, partiularly for ATmega328p, section 15.9.2, OCRnA value is calculated by:
OCRnA = F_OCnA/ F_clkIO / N - 1
For instance, for 1s timer, prescaler 1024 and 16-bit timer, the value should be 15624. On the web page result is 15625.
https://www.simulide.com/p/blog-page_8.html
On various sources, calculators shows either result, but according to datasheet, only one is correct.
Perhaps also to add prescaler value and resolution for complete calculation.
If I understand correctly AVR datsheet, partiularly for ATmega328p, section 15.9.2, OCRnA value is calculated by:
OCRnA = F_OCnA/ F_clkIO / N - 1
For instance, for 1s timer, prescaler 1024 and 16-bit timer, the value should be 15624. On the web page result is 15625.
https://www.simulide.com/p/blog-page_8.html
On various sources, calculators shows either result, but according to datasheet, only one is correct.
Perhaps also to add prescaler value and resolution for complete calculation.