Does anyone have any sort of sample code for measuring an input on a pic32 microcontroller. I am writing the code in C and i need to just count the pulses over a certain amount of time to get the frequency. I posted about this in the past and was told to use a comparator for the circuit to measure the frequency which i have already ordered. I already know which ports I will be using for the measurements(six pins off port b) but i didnt know the best way to measure the input. Also if i use the comparator to make a digital signal will the output be a logic "high" or will it be as high as the input voltage gets