Quote Originally Posted by HenrikOlsson View Post
Hi,
I'd say learning qualifies as a (very) valid reason ;-) By all means try using the 24bit ADC but perhaps you should start with interfacing to something "easier" like a EEPROM to begin with so you learn the basics about how the SPI interface works. I haven't looked at the datasheet for your ADC though, perhaps it's pretty straight forward.

As for the oversampling, all you really do is take a bunch of readings and then average them. If you take 16 readings with your 10bits ADC, add them all together and divide the result by 4 you'll get a value ranging from 0-4096.

You can read a bit more about here. Note, you can not use that code with Oshonsoft, the theory behind it obviously applies to any language/compiler though.

Good luck!
/Henrik.
hai Henrik,

Thanks for your suggestions.is that the communication between the eeprom and pic is very easy?what i thought is am trying to make use of the spi communication only and
no matter whether it is ADC or EEPROM (am i right).

when i used the internal adc for example
i injected 1.234v where the range is 0~5v and the related 10bit adc value is 252.7232 but the pic reads only 252 i took a bunch of readings and calculated the mean value (asume the value is same 252)
then i multiplied the value by 10000 then the value is 2520000 again divide it with 2048 and the answer is 1230.46 where the pic read only 1230
that means we get 1.230
as you said (252*16)/4=1008 /819.2=1.230

what is the difference between these two.

thanks a lot for clarifying my doubts

PUGAL