Hi,
The source resistance for driving the ADC inputs is recommended to be a maximum of 10k (although connecting a capacitor between the pin and ground can permit higher values if power consumption is a major issue). The simplest way to achieve this (and keep the calculations simple) is to make one of the divider resistors exactly 10 kohms. Your next choice is the Reference voltage which could be either an internal "FVR" (probably FVR2048 = nominally 2.048 volts) or the PICaxe supply rail from an external regulator of perhaps 3.3 or 5.0 volts. It's worth noting that an "ordinary" 78{L}05 regulator will probably drain more current from the main supply (12 volt lead acid battery) than is used by the PICaxe, plus the divider resistors and possibly even an illuminated Traffic Light LED. But the drain will still be almost insignificant compared with the internal leakage current of a "car" or utility Lead Acid battery. Personally, I wouldn't consider a "Coin" cell if you already have a 12 volt supply available (but we can discuss further, how best to obtain the PICaxe supply).
A "12 volt" Lead Acid battery has a maximum (charging) voltage of almost 15 volts so I'd make that the "full scale" for the divider chain. Thus, with a 10k lower resistor, the upper resistor should be about 68k with the FVR2048, or 36k with a 3.3v reference/rail or 20k (or 22k if more convenient) with a 5v reference/rail (e.g. 78L05). +/- 0.2 volt accuracy is still better than 2%, which can't be guaranteed even with 1% resistors and a high quality reference voltage, so I'd be inclined to Keep It Simple with the FVR , 5% resistors and calibrate (within the program) against a basic Digital Multimeter.
I believe the output / charging voltages of Lead acid batteries are quite variable with temperature, so if you've planning a 24/7 "all weather" application, you should probably also monitor the temperature and correct accordingly. The traditional PICaxe
DS18B20 is rather "overkill", a thermistor would be "good enough" but they are not well covered on the forum (perhaps because the maths is more tricky). There are also "linear thermistors", or you could calibrate the forward voltage drop of a diode (~-2mV/degC), or I've posted a
code snippet which uses the diodes within the PICaxe.
Most of my posts (mainly in the "code snippets" section of the forum) have concerned variants of CALIBADC, for example
here, but the
code snippets section is not particularly large, so well worth a scan. You might also consider monitoring the charge and/or discharge current of your batteries (there's a snippet on that as well) although monitoring both directions together accurately, is more complex.
Cheers, Alan.