Come on guy, Microchip can't even decide what to call basic registers. Hay hoo.
Come on guy, Microchip can't even decide what to call basic registers. Hay hoo.
George
I ran into this exact issue with this exact PIC! I swapped over to a PIC16F18323. I wanted to monitor battery voltage. If input voltage were to start dropping with ADC referencing Vdd, I may never see a dying battery until it was too late. Referencing ADC to 2.048 volts with a voltage divider on the input made it more precise. I think that's similar to what you are trying to do.
That is EXACTLY what I am trying to do!
I have looked at PIC16F1703, PIC16F1823 and the one you recommended, PIC16F18323 - all are pin compatible and have the ability to set the FVR as the reference voltage for the ADC.
Cheers
Barry
VK2XBP
if all you need to do is calculate vdd then
connect adc to fvr and measure fvr count
vdd = 1024*fvr_const/fvr_count
fvr_const would be very close to 1.000 and could be determined using a calibrated power supply if required
Warning I'm not a teacher
Thanks Richard.
The PIC is being fed via a liner regulator so I am not that interested in reading Vdd.
I want to read the battery voltage feeding this 5V linear reg. The battery also feeds a 6V buck regulator.
I have the ADC pin fed via a voltage divider.
All works well until the battery voltage drops sufficiently cause Vdd to droop, thus throwing off my ADC readings and battery status indicator LEDs.
Given there are numerous pin compatible devices which allow the FVR module to be used as a reference voltage for the ADC, I believe my easiest path forward is to change devices.
These are not expensive devices (~AUD$1.50 for single unit purchase) so making the change has no real drawbacks.
Cheers
Barry
VK2XBP
yes that method is only good for reading vdd , in the past I have used the dac module along with the comparator module for that purpose [16f648a from memory], even built a mppt solar regulator too. the dac can set high low trigger points for the comparator. resolution of about 0.1 volts is about the best you can achieve that way
Warning I'm not a teacher
Bookmarks