[sdiy] VCDO using PIC16C771
Eric Brombaugh
ebrombaugh at earthlink.net
Wed Feb 21 22:15:55 CET 2007
jean-pierre.desrochers at ville.quebec.qc.ca wrote:
> To get rid of any temp problem on my new VCO design
> I'll use a Microchip PIC16C771 to control an Exar XR2206
> VCO's frequency.. The XR2206 has a VERY clean sine output
> and other waveform already available.
>
> Here is the trick:
> CV voltage 0-5VDC going to the 12 bits Pic ADC,
> The Pic reads the AD value and goes to a serial EEPROM
> lookup table at that AD address to fetch a 16bits 'period value'.
> The XR2206 freq (square wave) is sent back to one of the PIC I/O pin.
> If the XR2206 freq is too low or too high according to the lookup data
> (at the specific CV input) the Pic send a PWM square wave
> filtered with a low pass to compensate the drift and bring
> back the CV/freq desired to the XR2206.
> Of course the low pass filter is fast enough to
> not create any portamento effect but enough eficient
> to have a nice DC feedback voltage.
> The serial EEPROM is a 4K X 16bits so it gives
> 32 steps between each semitones.
> 32steps X 12semitones X 8octaves = 3072 words (16bits)
Neat idea! Basically you're making a Frequency-locked loop (FLL), with
the PIC oscillator (hopefully crystal controlled!) as the reference.
A few issues you might encounter:
* PIC ADCs are a bit noisy in the LSBs. You may have to do some
averaging to get accurate measurement of the frequency CV. If you're
sampling fast enough this may not be an issue.
* Measuring the period of the square-wave from the 2206 is going to be a
limiting factor. At low frequencies especially you'll have to wait a
while to get an answer and this will slow the convergence of the system.
* I agree that the settling time of your PWM integrator will also slow
the system response.
* Designing a digital loop filter to average the period errors will
require some careful consideration to avoid instability. Especially
since it will have to compensate for the PWM integrator.
Other than that it will be interesting to see how it works. For
upper-range frequencies it might work well if you can control the loop
response.
Eric
More information about the Synth-diy
mailing list