PDA

View Full Version : Something strange, and its doing no good...



chrisshortys
- 7th January 2012, 18:16
So the 18F2550 chip i am currently using for some ADC work is doing something rather peculiar... I have it set on 10 Bit ADC and as far as i under stand this means i should get a response of 0-1023. How ever i am getting a response of 0-64320 ish with 5V. working in 8 Bit mode i get 0-255.

My setup code is:





DEFINE ADC_BITS 10
DEFINE ADC_CLOCK 3
DEFINE ADC_SAMPLEUS 50



Anyone else confused?

Acetronics2
- 7th January 2012, 19:07
The great classic question ...

Did you think to use RIGHT justification for the result ???

Alain

chrisshortys
- 9th January 2012, 20:03
Ahhh if only I had the brains and experience to think of that before bothering you lovely people!