tjnic
Newbie level 2
Hi,
I am trying to use the PIC 18F14K50 to read a barometric pressure from a pressure sensor chip.
The chip in question has an analogue output range of 0.5 volts to 4.5 volts but I am only interested in pressures that will produce an output voltage between 1.7 and 4.0 volts so I thought I would use the VRef- and VRef+ on the PIC to limit the conversion range to those values thus allowing me to sample the voltage a little more accurately.
In order to generate suitable reference voltages I used a couple of potential dividers. (ratios 680/330 and 180/820)
The problem I am having is that when I connect the VRef+ pin to the centre of divider the voltage drops from 4.5 volts to about 2.4 volts (as measured on a DVM)
Can someone tell me what would cause this to happen?
I am sure I have set up the PIC registers correctly.
I have set bits 0 and 1 of TRISC to 1 to disable the digital output
I have set bits 4 and 5 of ANSEL to 1 to enable analogue input
I have set the lower 4 bits of ADCON1 to 0101 to use Vref+ and Vref-
I have also set up AN10 to read the input voltage. (This works fine if I use VDD and VSS for the voltage reference.)
Can anyone give me any pointers as to why The VRef+ pin is pulling down the voltage? - I have tried dividers with a total resistance of 10K and 1M and the same thing happens.
I am guessing that it is a loading or impedance problem, but I am not sure why or how to get around it.
Thanks
Tim
I am trying to use the PIC 18F14K50 to read a barometric pressure from a pressure sensor chip.
The chip in question has an analogue output range of 0.5 volts to 4.5 volts but I am only interested in pressures that will produce an output voltage between 1.7 and 4.0 volts so I thought I would use the VRef- and VRef+ on the PIC to limit the conversion range to those values thus allowing me to sample the voltage a little more accurately.
In order to generate suitable reference voltages I used a couple of potential dividers. (ratios 680/330 and 180/820)
The problem I am having is that when I connect the VRef+ pin to the centre of divider the voltage drops from 4.5 volts to about 2.4 volts (as measured on a DVM)
Can someone tell me what would cause this to happen?
I am sure I have set up the PIC registers correctly.
I have set bits 0 and 1 of TRISC to 1 to disable the digital output
I have set bits 4 and 5 of ANSEL to 1 to enable analogue input
I have set the lower 4 bits of ADCON1 to 0101 to use Vref+ and Vref-
I have also set up AN10 to read the input voltage. (This works fine if I use VDD and VSS for the voltage reference.)
Can anyone give me any pointers as to why The VRef+ pin is pulling down the voltage? - I have tried dividers with a total resistance of 10K and 1M and the same thing happens.
I am guessing that it is a loading or impedance problem, but I am not sure why or how to get around it.
Thanks
Tim