prehaps you could try an analog multiplexer to input different reference voltages to +Vref at times you want to sample it. One at 2.0V and the other at 5.0V ----- Original Message ----- From: "Brandon Stewart" To: Sent: Friday, June 28, 2002 8:49 PM Subject: Re: [PIC]: How to set up a Vref on RA3 of a 16F877? > WHAT if you want some of your A/D inputs to be between 0-1.5 volts, but the > others to be between 0-5 volts? > > > > > > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Tan Chun Chiek > Sent: Friday, June 28, 2002 8:47 AM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC]: How to set up a Vref on RA3 of a 16F877? > > > ----- Original Message ----- > From: "Brandon Stewart" > To: > Sent: Friday, June 28, 2002 8:11 PM > Subject: [PIC]: How to set up a Vref on RA3 of a 16F877? > > > > I have looked at the 877 datasheet, but I only see how to configure RA3 as > > Vref+. They don't ever explain what this means!? Does this mean that All > > your other A/D inputs can't exceed Vref or what? Is this done is software > > or something. How do you set it up, and what implications does it have? > > > > > > > > Thanks, > > Brandon > > > > -- > > http://www.piclist.com hint: The PICList is archived three different > > ways. See http://www.piclist.com/#archives for details. > > > > > > +Vref and -Vref are the references voltage for your A/D input, the output > would be 0xFF if your A/D input is at +Vref, and 0X00 if it is at -Vref. > +Vref and-Vref are useful when you have to measure a small range of > voltage, say, 1.2-2.5V. Just pull your -Vef to 1.2V and +Vref to 2.5, it > will give you more dynamic range than using Vcc as +Vref. > > And also, if your +Vref is tied to Vcc which tends to fluctuate, you will > not get the correct voltage reading. > > I have this personal experience with A/D input voltage exceeding Vcc without > proper current limiting resistor, the PIC heats up, but no smoke and that > single channel malfunctioned, the rest still works fine. > > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. > > -- > http://www.piclist.com hint: The PICList is archived three different > ways. See http://www.piclist.com/#archives for details. > > -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.