I had been too short-spoken.
You can ideed increase the conversion by reducing the resolution, though that is not really "Arduino". 8 bits rather than 10 will give you 32kHz rather than 8 kHz sampling!
This most interesting implementation jackrae linked to is using only half of it, I think mostly because of lack of RAM to store all the data.
You have a "streaming" application here, best solved by parallel processing (as possible with processors as the ParallaxPropeller) or by extensiv interrupt handling. It is difficult though possible to do it within a polling loop.
Sorry that I did not mention the switching to a lower resulution. In fact it will make processing much faster when you use bytes only....
The end of ADC conversion is communicated by a flag, this is asynchronious but the conversion time nevertheless is fixed.
Thanks for your input, but it makes problems slightly worse in my head
if i set the prescale to 16 by using the available code, this allows me to sample quicker.
if i bias the input mic by connecting to 100k resistors in series across the power rail, (5v), and connecting the mic and arduino to inbetween these resistors, would this not bias the mic to positive.
I would then use a simple RC circuit to filter out the pwm noise on the output.
The code I propse is the following, does this seem like it would work or am I missing some vital point here?
Let me try and make things clearer as I feel I may have jumped the gun a little.
I need to build an electronic digital audiop filter, one which I can basicaly sweep with a 500Hz Bandwidth through the entire audio frequency.
I planed to do this with analog filters but the accuracy was no where near what I needed.
I dont need to do anything else other than the above, an Ideal setup would have a mic input into the board, a pot onto one of the analog inputs to simulate sweeping throught the range, and a headphone output on the other end.
Im prety good with the hardware and software side of things, I just want to check its feasable.
I would be uping the rate at which analog.read can be called to read the mic signal.
I was thinking that I could 'filter' out the correct frequency by determining how often I call the read function, basicaly If I call the function at a rate of 2000 times per second, would this not filter out everything bar the 2000Hz frequency?
Ok Progress, however im yet to actualy test anything, the plan is as follows. Conecting a mic to one of the pwm inouts but having this biased at 0.5 and having the AnalogReferece set to internal (1.1V) This means that i am biasing the mic half way, and considering standard mics output between 50/200mV This allows for best resolution without saturation.
Then Pramgraming wise I was just going to adjust the AnalogRead Prescaler to allow it to perform quicker (Is this correct?).
Im going to be outputing on another PWM pin.
I was wondering if a PWM carrier frequency of ~500Hz is acceptable for this use. Do I need to up the frequency? Does this have any sense in it? Please can someone help out a little, Ive studied the link in the second post and it seems to confuse me abit, the coding that he uses does not look like C as I have been using it.