12-bit adc resolution PIC18F87k22
Posted: Thu Feb 14, 2013 11:30 am
Hi,
I'm using a PIC18F87k22 microcontroller and I'm stuck with the Read_as_string ADC component.
I should have measurements between 0 to 5V, instead I have 0 to 20V, which is 4 times grater than expected.
It seems that the conversion factor is using a 10-bit ADC resolution (max adc code = 1023) which is 4 times lower than the embedded 12-bit resolution ADC (max adc code = 4095).
If I try the Read_as_Int ADC component I get correct values from 0 to 4095.
Is there a way to specify the ADC resolution, or is it automatically set with the microcontroller reference?
Thank you,
I'm using a PIC18F87k22 microcontroller and I'm stuck with the Read_as_string ADC component.
I should have measurements between 0 to 5V, instead I have 0 to 20V, which is 4 times grater than expected.
It seems that the conversion factor is using a 10-bit ADC resolution (max adc code = 1023) which is 4 times lower than the embedded 12-bit resolution ADC (max adc code = 4095).
If I try the Read_as_Int ADC component I get correct values from 0 to 4095.
Is there a way to specify the ADC resolution, or is it automatically set with the microcontroller reference?
Thank you,