[sdiy] AVR based module and ADC questions

Ryan Williams destrukto at cox.net
Thu Feb 17 05:12:00 CET 2005


hi all,

I've been working on a random voltage and noise module that is some sort
of combination of several different existing things other people have made.

basically it's like this: shift register and 12-bit DAC output. CV
inputs are for number of bits in output, which bit is fed back into the
shift register, also whether feedback is on or off and if not a
comparator against noise to decide the new input for the shift reg. a
clock input is also needed because I couldn't get a wide enough range
and response I liked on the low frequencies from a 4046 VCO.  this
module should work for LFO clocks for CV generation or at audio rates
for noise.

I decided to use an AVR (Atmega8) for this. it will have a small lookup
table to decide which output for the current shift register value and
also the number N of bits in the output. also the AVR takes comparator
inputs and feedback bit ADC input and provides the shift register with
it's input.

It is still mostly untested.  I decided not to use the AVR internal ADCs
because I could not get them to work at nearly the speeds I wanted.
Maybe it's possible but during my tests the voltage at one ADC pin would
effect the other ADC inputs if they were clocked to fast. I figured
runing them fast would be ok since I only needed the 3 MSBs of precision
but it still didn't work. here's the schematic so far:

http://www.sdiy.org/destrukto/temp/qrv.pdf

now the questions:

in the above diagram, I have two 10K pull up resistors on the ADC CS
lines. I don't think they are required but I haven't been able to find
any info about these inputs (I checked the ADC0820 data sheets also).
the AVR has the I/O pins in high impedance mode on power up so if those
CS don't have an internal pull up then I think there would be problems?
are they needed?

also, I wonder if anyone has used the ADCs of an AVR at speeds of about
75Ksps without needing much precision? From the data sheet, the ADC0820 
should easily handle this and my code looks like it'll be maybe even a 
little faster with a 16MHz clock.  the code doesn't do much except check 
both ADCs, then the shift register, then output a new DAC value.  The 
AVR supports only 15Ksps i think it was.

also if you see any obviously stupid things let me know.

-thanks,
ryan




More information about the Synth-diy mailing list