Hi !
Of course you have to adequate the 50V peak voltage signal to the input voltage limit of ports of the PICmicros (if Vdd = 5V, then the upper limit is 5V for the A/D analog or digital inputs). Use a voltage divider (1:10).
Another restriction is the sample frequency if you are going to use the A/D converters of common PICs (16F and 18F series), you won´t get more than 40ksamples/s (some dsPIC reach 500ksamples/s) what can introduce errors if the frequency of measured signal is too high (you did not say what is the frequency). For low frequencies, it is ok, but the math routines may spend a lot of processing.
Another idea is to keep pooling the input signal periodically (at regular and precise intervals of time) and check if the input level is high or low (just logic levels, which come from the voltage divider) and make the calculations of average of time x logic levels. It won´t need of A/D converter and you can have high speed.