Timer 0 reset parametre

Hello,

I use the Timer 0 for an application, but I want at the end of this application use the function "Delay()".
The problem is : I change de registre for the timer 0 and logically, after I can't use the Delay function.

I want to find the parametres of the registre to use for delay().

Thank you.

So why use timer0? You have 3 timers, why do you need timer0?

But in the hardware folder you can find all the files including the initialization functions :slight_smile:

On AVR Arduinos timer 0 ticks every 4us, this causes the 8-bit timer to overflow every 1ms, (4us * 256).

If you require the delay() function it's not possible to change this, however it is still possible to use timer 0's COMPA and COMPB interrupt service routines, if you need to run code at a 1ms interval.

You can print value of the registers before you start changing them, or even just save to a variable.

The timers are initialized in init() in wiring.c, you can also use that as a guide.