# Does the number of ticks change when prescaling a timer of an Arduino

I am using a 16-bit, 16Mhz ATmega328P microcontroller. I have set the output of the timer to toggle mode. Hence generating a square wave.

my question is, do I still get a maximum of (2^16-1) 65535 when the 16MHz clock has been prescaled by 8 (2MHz)?

I want to know so that I can work out the duty cycle, as the value of OC1A changes.

Thanks!

• Overflow frequency: $\frac{f_\mathrm{scaled}}{2^{16}}=$ 30.5 Hz, which is double the frequency (as you said). So, if you use the full depth of the timer (just letting it run from zero every time) at 2 MHz, your frequency will be ~15 Hz. Mar 23 '18 at 10:09