[sdiy] Imitating CEMs with PICs

Tom Wiltshire tom at electricdruid.net
Mon Oct 2 00:38:08 CEST 2006


Hello all,

I'm new to the list, but I hope you don't mind if I explain what I've 
been up to.

My initial impetus came from reading about PIC microprocessors, and 
thinking that I might be able to simulate the functionality of other 
ICs using them. Specifically, it occured to me to try and 
imitate/simulate/copy the unobtainable (or at least extremely 
expensive) SSM and CEM synth chips that I wanted but can't get.

Towards this end, I've developed a PIC 16F684-based LFO which offers 8 
waveforms including noise, and provides a sample-and-hold that samples 
the selected waveform. All the waves are generated by the 
microprocessor, and output via a 10-bit PWM module on the chip. Passing 
the PWM output through a simple lowpass filter gives a good analogue 
output. The nice part is that the PIC also includes analogue inputs 
which I use as 0-5V control voltage inputs. These are passed to an 
8-bit D/A on the chip so the microprocessor can deal with it. In 
practice, the chip behaves pretty much like an analogue IC - you give 
it voltages, it gives you an LFO output. Circuit diagram available on 
request - how does the list feel about attachments for things like 
that?

I started off with an LFO because (A) the frequencies are low and means 
the sampling frequency can be low too, giving you more clock cycles to 
play with, and (B) because there is already loads of stuff on the web 
about generating sine waves with a PIC which I could use to get me 
started.

I followed this up by working on a voltage-controlled envelope 
generator along similar lines. The circuit is more-or-less identical to 
the LFO, except with more inputs to spare pins on the PIC. It uses many 
analogue inputs on the chip to provide voltage-controlled A, D, S and 
R, but also output level (like the CEM 3310) and a general time input 
which shortens the entire envelope (like the SSM 2056). Finally, 
because of the design of the firmware, I was able to add an input which 
switches between an exponential or linear response. Again, the PWM 
output needs to be followed by a simple op-amp lowpass filter, but it 
is considerably simpler and more compact than a discrete design for 
what it is able to do. The only people I've managed to find doing 
something similar are Encore Electronics 
(http://www.encoreelectronics.com/cont_ueg1.html), although maybe they 
used a more serious processor than the £1.42 PIC that I had available. 
The price of the finished module certainly suggests so! It is quite 
possible that they didn't, however. As the envelope generator only 
deals with a single stage at once (it is EITHER attacking OR decaying 
or whatever, never both at once) adding more stages doesn't actually 
increase the load on the processor significantly.

I'm hoping to put these parts together with an old SSM2047 VCF/VCA that 
I've had hanging around for years (now THAT I can't simulate using a 
PIC...) and build a (mainly) analogue programmable monosynth. Working 
out how to do the modulation matrix (or alternative arrangement) is 
proving difficult though.

Hope this is of interest - any comments appreciated!

Tom


++++ Electric Druid ++++
Web Design & Development
http://www.electricdruid.net




More information about the Synth-diy mailing list