[sdiy] oscillator auto calibration
jean-pierre.desrochers at ville.quebec.qc.ca
jean-pierre.desrochers at ville.quebec.qc.ca
Tue May 8 14:50:00 CEST 2007
Daniel,
You had the same approach I suggested
to control an XR2206 VCO frequency using
a Microchip PIC16C771.
This is IMHO something doable!
Read the post I made below on:
Subject: [sdiy] VCDO using PIC16C771
Date: Wed, 21 Feb 2007 15:59:57 -0500
-----------------------------------------------
Maybe this has been already found
on some listing but I thought it would be
useful for anybody to share..
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)
This is an embrio idea but I'll give it a try..
J-P Desrochers
Quebec City
-----------------------------------------------
-----Message d'origine-----
De : Daniel Kruszyna [mailto:dan at krue.net]
Envoyé : 7 mai 2007 20:24
À : synth-diy at dropmix.xs4all.nl
Objet : [sdiy] oscillator auto calibration
I'm trying to auto calibrate an efm vco4e using an avr microcontroller.
The avr controls 2 pitch control voltages: 1 with 0V..10V range and
another with -1V..1V range. The dac is 12bit. The squarewave output
clocks a timer in the avr so I can measure the number of cycles per
time period.
I want to set the desired frequency with the 0V..10V control voltage
and use the -1V..1V voltage to correct any error.
The frequency error is (f_measured - f_setpoint). However, to use a
standard control loop, I need to calculate
(log2(f_measured) - log2(f_setpoint)). Does this sound correct?
Is there another method that avoids calculating log2? (I'm using
fixed point.) Are there any other auto calibration projects out
there to reference?
-- Daniel
_______________________________________________
Synth-diy mailing list
Synth-diy at dropmix.xs4all.nl
http://dropmix.xs4all.nl/mailman/listinfo/synth-diy
More information about the Synth-diy
mailing list