You should make sure that more than five volts not to be loaded to microcontrollers pin otherwise it could become foul. For example if for any case you have more than 10V as an input you will get more than 5V on the resistor and on PIC as well, so it is not bed to think about some zener diode on PIC ADC input. Or maybe is better to use a scheme with comparator LM239 which will sharply cut any voltage bigger than Vcc ref+ loaded on pin 6 of LM239.
Regards
Bookmarks