Or, you can make a simple voltage divider
with 2 resistors, this can be the best option with high voltages, make something like this:
Output Voltage = (R1/R2)*Input Voltage
Input Voltage
___
|
|
|
/ R1
\ Resistor of 10KOhmm, Lowest %
/
\
|
|--------> To Pic A/D Conv. (Output)
|
/ R2
\ Resistor of 100KOhmm, Lowest %
/
\
|
|
|
____
___
_
Then, on the Pic program you know that the voltage is being divided by 10, like in this example, an you multiply the A/D Conv. result by 10 to obtain the real voltage !
Change the R1 to 1KOhmm and you will be dividing the value by 100 !
Use an diode bridge to rectify the input signal in the case of not knowing the porarity or measuring AC voltage.
Have Fun !