08M2 ADC questons

I am struggling with the PX documentation, and in the end I have to put these to the gurus assembled here:

1. How many ADCs does an 08M2 have?

2. Does it have an intenal voltage reference?

3. If so, can it be programmed with fvrsetup?

We are looking at using an 08M2 as a lithium battery safety cutoff at around 3.2V. Its output will be fed to the EN pin of an Adafruit Powerboost 1000.

If in the negative, we can always go to a bigger PX.
 
Hi,

Yes, the 08M2 has almost as many "features" as all the other PICaxes in this respect. The only difference I can think of is that the X2 chips give access to the "Negative" (lower) end of the Reference Voltage. Then the extended "practical" answers to your questions are:

1. It has only ONE ADC, but its input can be internally connected to any one of most/all of the "Analogue" pins via a Multiplexer (switch). Note that the ADC input is recommended to be fed from a source resistance of no more than 10k (unless an input capacitor of perhaps 10nF to ground is added). The so called "Output Only" Leg 7 of the 08M2 can be also employed as an ADC input, where/when it is connected to the DAC (using the READDAC command). I've found this useful for monitoring a current flowing in to or out from ground by measuring the (low) voltage across a (usually very) low-valued resistor. A "negative" voltage measurement is possible by bleeding current out of the DAC pin from the DAC, which has quite a high (but, beware not constant) source resistance.

2. Yes it has the FVR (Fixed Voltage Reference) which has a temperature coefficient similar to a regulator like the 78L05. However, note that the specified ABSOLUTE accuracy is quite poor at about +/- 9%, so you should always include a "Calibration" stage to check and correct for the "actual" voltage.

3. Yes you can use FVRSETUP ; FVR4096 is not very useful because it is quite close to the maximum supply voltage (so you'd probably be using a regulated supply anyway), but FVR1024 can be used with care, although not "officially" permitted in the Microchip Data Sheet.

(4.) CALIBADC can be a very useful command, to measure (also/alternatively) the voltage of the PICaxe's supply rail. FWIW, I've extended that method to monitor the supply rail to better than 1 mV resolution (NOT Accuracy).

Cheers, Alan.
 
Last edited:
Back
Top