How to analyze Microcontroller input-logic-signal without ADC?
Try the comparator module on page 193 of the datasheet which is available on your chip. 

I didn't check how close to the supply rails you can take the inputs but I'd be surprised if it's not rail to rail. Check the hysteresis settings to give a definite "switch" when your condition is met.