Tag Archives: Clock

UC Clock Divider


The UC (µC) Clock Divider is a clock/beat/step counter/divider, based on Arduino, with 8 outputs, configurable in code.
With a clock divider you can slow down a tempo, create rhythmic patterns or, with a audio signal at the input, get sub-octaves.

The Hardware

The circuit is very simple and depends almost exclusively on the Arduino Nano module.
The input jack is stereo (TRS). Tip (T) is connected to Clock signal and Ring (R) is connected to Reset.
A +5V voltage triggers either Clock or Reset.

The outputs are +5V when ON and 0V when OFF. A 1k resistor protects against potential short circuits.

The Code

Code examples can be downloaded from https://github.com/dhaillant/uc_divider
The Clock Divider code is based on hardware interrupts. One for Clock signal and one for Reset signal.
Each output has its own individual counter.
A positive voltage on Reset input triggers the reset function and sets all individual counters at 0.
A rising edge on Clock input allows the outputs with counter at 0 to be activated (ON)
A falling edge increments each counters by 1. If counters have overflowed (based on settings in code) they are set back to 0.
The main loop activates the outputs based on their respective counters and the presence of a voltage on Clock input.

Downloads