necesito saber como realizo un muestreo de una señal por medio del adc y como sacar las muestras obtenidas. el programa qeu utilizo es el siguiente pero no obtengo ninguna respuesta. y no se si este muestreando apropiadamente.
#include <p30f4011.h>
#include <stdio.h>
_FOSC( CSW_FSCM_OFF & XT_PLL4);
_FWDT(WDT_OFF);
_FBORPOR(PBOR_ON & PWRT_OFF & MCLR_DIS);
unsigned int ADResult1 = 0;
unsigned int ADResult2 = 0;
void ADC_Init(void);
void __attribute__((__interrupt__)) _ADCInterrupt(void);
void ADC_Init(void)
{
ADCON1bits.FORM = 1;
ADCON1bits.SSRC = 7;
ADCON1bits.ASAM = 1;
ADCON1bits.SIMSAM = 0;
ADCON2bits.SMPI = 0;
ADCON2bits.CHPS = 1;
ADCON3bits.SAMC = 0;
ADCON3bits.ADCS = 4;
ADCHS = 0x0023;
ADCSSL = 0x0000;
ADPCFG = 0xFFFF;
ADPCFGbits.PCFG3 = 0;
IFS0bits.ADIF = 0;
IEC0bits.ADIE = 1;
ADCON1bits.ADON = 1;
}
void __attribute__((__interrupt__)) _ADCInterrupt(void)
{
ADResult1 = ADCBUF0;
PORTE=ADResult1;
IFS0bits.ADIF = 0;
}
int main (void)
{
TRISE=0XFFFF;
ADC_Init();
while (1);
return 0;
}

si alguien puede ayudarme gracias