Example Projects for ADC and I²C for dsPIC30F2012
The dsPIC30F20 family is only recommended for 5 V designs.
From the dsPIC30F2012 product page, go to Documents > dsPIC30F Code Examples. Click on "CE001 Using dsPIC30F A/D Converters and the DSP Library for Signal Filtering" to download the CE001_ADC_DSP_lib_Filter_010908 ZIP file. Use this code as a starting point for developing your project.