I'm making a little robot as an art project; two gearmotors are being supplied from a 6V battery pack. The logic has its own power supply of 4.5V. I'd like to monitor the voltage of the motor battery pack and use this data to adjust the PWM duty cycle being used to control motor speed. This should allow me to get more time out of the motor batteries by increasing the PWM cycle as the batteries weaken.
The problem I'm finding is that the analog VREF of the PIC16f88 is maximum 5.5V. I'm not sure how to work around this.
Re: a/d input to monitor motor batteries' voltage and adjust
Can't you use a high impedance potential divider scale down the 6V battery voltage? Since the output will be directly proportional to the battery voltage, your purpose will be served!