atMega32U4 is there a timer-interrupt-library or function input a timer-ISR-frequency setting up all timer registers

Hi Everybody,

I know there is a lot of documentation online where you can read up how to set all timer-registers like
TCCR1A
TCCR1B
TCNT1
OCR1A

etc.

for invoking the timer-interrupt in certain intervals.

Does somebody know if there exists a library where you call a function with a parameter
where this parameter is the ISR-frequency and the function will setup all the registers required in the correct way.

I am aware that not each and every frequency can be adjusted so the function could give back a -1 for not working at all and positive number representing the deviation between value of the parameter and the real frequency

best regards Stefan

I know such function, but it is for STM32 controllers

For Atmega32 you could write it itself, based on datasheet. For single MCU it is not a complicated task

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