[sdiy] Roland DCOs

Eric Brombaugh ebrombaugh at earthlink.net
Tue Feb 26 16:47:17 CET 2008


Tom Wiltshire wrote:
> This seems like a entirely reasonable approach, JP. I've only got one 
> question: how are you going to control the current source from the PIC?
> 
> I'd wondered about using the PWM module as a simple DAC for this job, 
> like I did for my LFO/ADSR projects, but I don't think it will respond 
> quick enough.

I agree that using PWM to generate the charge control for the integrator 
would be way too slow. You'd be better off with an inexpensive SPI DAC. 
Or, choose a part that has a built-in DAC - Analog Devices, NXP and 
others have ARM MCUs that have built-in DACs, as well as decent timers 
that could provide the frequency control pulses.

I seem to recall a similar discussion on AH back when the first internal 
photos of the DSI P08 came out a few months ago. From what I recall of 
that thread, the P08 uses a bunch of the motor control dsPIC chips. 
There's one dsPIC per voice controlling a CM3396-like chip. The motor 
control variety has a bunch of nice PWM outputs that can presumably 
provide the digital divider output, plus there's an 8-channel SPI DAC 
being used for the numerous voltage control points on the '3396. To top 
it all off there's another dsPIC that talks to the keyboard, panel 
controls & MIDI, coordinating the behavior of the per-voice dsPICs.

At the time, I sat down and figured out the frequency resolution you'd 
get from the dsPIC dividers and it looked pretty decent. Here's what I 
wrote then:

-----------------
I was curious about which dsPIC was being used. Notice that it's the 
'MC' version - that probably means that he's using the motor control PWM 
channels to generate the waveshaper drive pulses.

The motor control time base has 15-bit resolution with a 1/4/16/64x 
prescaler - that should give plenty of frequency accuracy. I've no idea 
what the dsPIC clock rate is, but assuming it's running near it's 
maximum, 40MHz is a good ballpark. Given that, you get the following 
resolution at the various prescaler settings:

1:1 - Range is 2441Hz and up. Resolution is ~0.15Hz at 2441, ~2.3Hz @ 10kHz.
1:4 - Bottom of range is 610Hz. Resolution there is 0.03Hz, 0.6Hz at 2.4kHz.
1:16 - Bottom of range is 152Hz. Resolution is 0.009Hz, 0.15Hz at 600Hz
1:64 - Bottom of range is 38Hz. Resolution is 0.002Hz, 0.04Hz at 150Hz

Those resolutions give about 1/10 cent accuracy at the low ends of the 
range and 1/2 cent at 4x higher. Not too bad.

Not sure what the overall frequency range of the '08 is, but if it goes 
lower than 38Hz then the dsPIC is may be running slower than 40MHz.
-----------------

Eric



More information about the Synth-diy mailing list