A while back I added a battery voltage tester to an existing circuit board. I didn't have a choice - the PIC was operating from the battery directly without a regulator at 5.4V (6V battery through series protection diode). Using a jumper wire I connected the ADC to an on-board regulator in another part of the circuit. Now it measured voltage in reverse; the lower the battery voltage, the higher the ADC reading. With trial and error I found 167 to be my alert number for low battery.

ADCIN 1, BATTERYCONDITION
IF BATTERYCONDITION >= 167 THEN HIGH PORTB.0.

Portb.0 connected to Nch FET. For low voltages I always use a logic-level FET with a very low gate threshold voltage. I prefer IRLZ44N. It's a power transistor that I use to supply 2A without needing a heatsink. Just barely gets warm at that current.