How to detect max value of real time data in an array
I have connected a sine wave of amplitude 3V with 1.5V shifted above the zero to 12-bit ADC channel by using dsPIC33FJ32MC204 controller and stored in an array. I want to detect the max value out of five samples because after the five samples my data is repeating, so please give me any suggestion on it. I am getting output as a zero.

