[sdiy] oscillator auto calibration

Colin f colin at colinfraser.com
Tue May 8 17:26:17 CEST 2007


 
> Don't forget that if you use calculations for every readings
> -you'll need to find the values that WILL be used for the
>  frequency calculation afterward. 
>  All this from the 12bits CV / PIC's ADC voltage.
> 
> -From the above value, calculate the actual freq to compare
>  with the one read from the incoming square wave.

If it's an exponential CV control then the ADC output can be split into an
octave number (fed into the timer prescaler) and an octave subdivison -
which you look up in your table and load into the timer.
Seems like that should only take a couple more clock cycles at most.
If it's a linear CV, then you need a full lookup table, or a lot more
calculation.
12 bit sampling of a linear CV gives you a rough bottom end though.

Cheers,
Colin f






More information about the Synth-diy mailing list