[sdiy] WHICH PIC/UCONTROLLER should I buy today
Olivier Gillet
ol.gillet at gmail.com
Mon Aug 9 16:11:23 CEST 2010
> Other people have dealt with exactly how this works. I'd just like to add that with a small 8-bit uP, you're unlikely to get a PWM frequency that can produce high audio frequencies at more than about 8-bit, tops.
> You need a minimum 50KHz PWM frequency for full-range audio, and that implies a counter frequency of 12.8MHz at 8-bits resolution. Perhaps an AVR can do this, but the PICs use a counter rate that is a quarter of the master clock, and that implies a 5MHz maximum.
On AVR, the counter is 8 bits, and you have a choice between a "fast
mode" at 1/256 the clock rate, or a "phase correct" mode at 1/512 the
clock rate. I work with 20 MHz, phase correct mode, so I get 8-bit,
39kHz, and use the counter reset interrupts to push samples.
> Even if the AVR can do it, it's still only 8-bit audio - so think early 80s video games, not CD quality.
I don't think early 80s video games used 8 bits sampled sounds - more
1 bit or 4 bit and this was with dirty tricks modulating the noise
channel on a SID, Pokey or 6502... Other bits of early 80ies 8-bits
audio kit: CMI Fairlight, Prophet VS, PPG wave - and they certainly
have different connotations... In particular if the signal is always
at full amplitude, with the VCF and VCA applied in the analog domain,
8 bits oscillators are not going to sound videogamey at all. Yesterday
I programmed this patch on the Shruthi (2 multi-algorithm oscillators
on an 8 bits AVR with PWM output, sent into an analog VCF/VCA), and it
doesn't sound like pacman:
http://soundcloud.com/mutable-instruments/hammrhnd-preset
But it would certainly be more straightforward to get yourself a dsPIC...
Olivier
More information about the Synth-diy
mailing list