# Sending the Prescaler output of a Timer to an output pin

I'm currently using the 16 bit Timer on the Nano to control a motor (via a nonstandard interface). Ideally, I would like to send the Prescaler clock to the 16 bit Timer to an output pin. I looked in the 328P datasheet and this didn't seem doable, but I wanted to know if there might be a trick to doing this.

Please explain what you mean on this

Yes, of course. The prescaler can divide by powers of 2. Reduce that factor and use a CTC or PWM mode to output the desired frequency.

What mode are you using? How is it "controlling" the motor?

The clock prescaler for the timer is not brought out to a pin.

Why do you want to do this?

Maybe an example will clarify this matter: Imagine you want to control a motor to a rotational speed of 1 RPM. The motor has a tachometer that puts out 1 pulse per revolution and it has two controls: accelerate and decelerate. Your system clock, fsys, is 32768 Hz. You divide fsys by 2^15 with a prescaler to get a 1 Hz reference clock fref. Using the tach signal as a gate for your counter, you count the fref pulses between tach pulses. If the count is greater than 60, you accelerate, if less than 60, you decelerate, and if it equals 60, you maintain speed. Your speed is now controlled at 1 RPM. Now let's say you want take some sort of action every 6 degrees of rotation; you would need a clock with frequency = (360/6)*(1/60) = 1 Hz. To get this, you could take your tach frequency and multiply it by 60 with a Phase Locked Loop (PLL) or you could simply output the prescaler frequency if it is available. That's why I asked if anyone new of a possible trick for routing the Timer/Counter Prescaler signal to an external pin on the Nano. For this method, the only other option would be hammer and tongs by using a second Timer/Counter to generate fref on an output pin and then route that to the clock input of the first counter to control the motor.

No, there is no such trick

See the timer/counter modes for outputting PWM at any frequency.

That's stone age technology. Nowadays all that can be done by built-in hardware and software.

The PLL is still being used in ATtiny85 to boost the internal 8 MHz clock to 16 MHz.