Analogue to digital convertor ADC

StarfleetRP

Joined Mar 23, 2009
24
Do you mean change the 16bit number into an 8 or 12 bit number? If that is the case just do a bit shift to the right.

unsigned int ADCvalue = 32767; //16 bit

unsigned char ADC8bit = ADCvalve >> 8;

this way you keep the 8 most significant bits for an 8 bit number. To make it a 12bit number just shift 4 to the right instead of 8.

Hope this is what your looking for?
 

Thread Starter

siraqieng

Joined May 4, 2009
8
because i need to change the sampling frequancy by changing the bits for example
if i have cut off frequancy 3.4 it need to be sampled at 8 khz i need to 8 bit ADC if i need to sample at 12 khz or 16 khz at the same IC what i need to do?

thanks
 

mik3

Joined Feb 4, 2008
4,843
Some chips are driven by external clock signals which determine the sampling frequency.

Which ADC chip are you using?
 

Thread Starter

siraqieng

Joined May 4, 2009
8
Hi mik3
which chip you prefer me to use? for changing the sampling frequency 2 times
one for sampling frequency= 8 kHz,
2nd for sampling frequency= 16 kHz

which IC you prefer ?
 

mik3

Joined Feb 4, 2008
4,843
Hi mik3
which chip you prefer me to use? for changing the sampling frequency 2 times
one for sampling frequency= 8 kHz,
2nd for sampling frequency= 16 kHz

which IC you prefer ?
I have never used a ADC chip on its own (I used ADC on PICs). Find one which can be clocked externally and use two 555 to choose between two frequencies.
 
Top