18M2 Vref pin(s)


New Member
I want to use an 18M2 ADC and improve the measurement accuracy with an external 1% reference 4.096V voltage source. The Picaxe manual 2 p.31 states that the Vref+ input is n/a for the 18M2, only Vref-, however the datasheet for the PIC16F1847 shows that both are available on the original Pic chip (+ on pin 2, - on pin 1). Has there been a change and the Vref+ input is now available or has the pin been reassigned for Picaxe? The 14M2 doesn't have enough I/O and I know I can buy a 20M2 but already have a bag of 18 pin devices.


Senior Member

As far as I can see, the Voltage Reference + input is on Leg 2 or PICaxe pin C.3 (PIC internal port A.3) which is allocated as the Serial Output pin on the PICaxe 18M2. The - Reference pin is C.2 (Leg 1), so the PICaxe manual appears to be correct. However, the manual describes C.3 as "Output Only", which is not strictly correct because AFAIK the program can switch it to an input (and / or the + Reference input). But it would be risky to use it as an input, because it's not possible to prevent the PICaxe booting with this pin as an Output, until the program actually runs.

Cheers, Alan.


Senior Member
The 18M2 is the only Picaxe that does not allow use of an external voltage reference with the Vref+ pin. However, the internal 4.096 FVR can be used. I have found it to be quite accurate and generally good enough for most ADC applications. If you must have an external voltage reference then you will need to use a Picaxe other than an 18M2.