Hello. I'm having a bit of trouble with my programming. I'm giving a signal to my board and it will detect and display the maximum and minimum point of the signal wave.

However, I'm not really sure if I wrote my codes correctly.

Also, I'm getting this error :

"operator requires a pointer and an integer as operands"

Here's a part of my codes.

```
ADCON0 = ADC_SINE;
ADCON0bits.GO = 1;
while (ADCON0bits.DONE); //Terminates the A/D conversion when all the signal are converted
adc_result = 256*ADRESH + ADRESL; // Store the result
min=adc_result[0];
max=adc_result[0];
for(j=0;j<i;j++)
{
if(adc_result[j]<min)
{
min=adc_result[j];
}
}
for(k=0;k<i;k++)
{
if(adc_result[k]<max)
{
max=adc_result[k];
}
}
CurPosLCD(0x10);
Out_LCD(ROM_TYPE "MIN= ");
Out_Dec_LCD(min);
CurPosLCD(0x20);
Out_LCD(ROM_TYPE "MAX= ");
Out_Dec_LCD(max);
Delay_sec(1);
```

I hope someone could help me out here.

Thank You.

Note: I posted this exact post on a wrong section of the forum.