Hi all,
Noticed that the ADC resolution for PIC24FV32KA301 (5V, 12BIT ADC) is reading only 10bits (1023) instead of 12bits (4095). Tried the available two option for VREF ie; VDD as well as V+Ref tied to VDD but both didn't yield expected results. Maybe some thing has to be modified in the 16BIT ADC CAL file to include this class of PIC24 MCUs.
Can anyone help me with a solution to achieve the 12BIT resolution ?.
Thanks in advance.
RTJ Nair
PIC24 5V devices with 12-BIT ADC resolution [SOLVED]
Moderator: Benj
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: PIC24 5V devices with 12-BIT ADC resolution
Hi,
Until we make a more long term implementation of this feature, there is a workaround that you could try.
Please add a C icon to your project, at the start, with the following content:
That will enable the 12 bit mode of the ADC.
Until we make a more long term implementation of this feature, there is a workaround that you could try.
Please add a C icon to your project, at the start, with the following content:
Code: Select all
AD1CON1bits.MODE12 = 1;
-
- Posts: 12
- Joined: Sun Nov 09, 2014 5:53 pm
- Location: Oman/India
- Has thanked: 5 times
- Been thanked: 2 times
- Contact:
Re: PIC24 5V devices with 12-BIT ADC resolution
Thanks LeighM.
Tried but the compiler gives an error and didn't switch to 12BITs,
TESTPIC24working.c error: 'AD1CON1BITS' has no member named 'MODE12'
I checked the datasheet and it doesn't mention "MODE12" bits for PIC24FV32KA301.
RTJ Nair
Tried but the compiler gives an error and didn't switch to 12BITs,
TESTPIC24working.c error: 'AD1CON1BITS' has no member named 'MODE12'
I checked the datasheet and it doesn't mention "MODE12" bits for PIC24FV32KA301.
RTJ Nair
- LeighM
- Matrix Staff
- Posts: 2178
- Joined: Tue Jan 17, 2012 10:07 am
- Has thanked: 481 times
- Been thanked: 699 times
- Contact:
Re: PIC24 5V devices with 12-BIT ADC resolution
Hi,
Sorry, I've given you Flowcode V7 code, I'll investigate what you need for V6
Sorry, I've given you Flowcode V7 code, I'll investigate what you need for V6
-
- Posts: 12
- Joined: Sun Nov 09, 2014 5:53 pm
- Location: Oman/India
- Has thanked: 5 times
- Been thanked: 2 times
- Contact:
Re: PIC24 5V devices with 12-BIT ADC resolution
Perfect. Many thanks LeighM.
Now I could get the 12bit resolution.
Appreciate the quick solution.
RTJ Nair
Now I could get the 12bit resolution.
Appreciate the quick solution.
RTJ Nair