It depends on what accuracy and stability you need. Internal reference uses the PIC supply voltage = 5 volts. The 10 bit A/D in this case will have the least significant bit (the smallest voltage that can be measured) as 0.005 volts In order to get 10 bits of accuracy, you will need to know the supply voltage to within 5 millivolts. And more importantly, it needs to be stable. If you are using an 78L05 as a 5 volt supply, for example, the o/p may change up to 75 mv (typically 18 mv) with an input voltage change from 7 to 20 volts. And it may change up to 30 mv (typical 5) for a load change from 1 to 20 ma. Assuming typical, not worst case, the load change figure would represent 1 lsb; the supply voltage change would represent 4 lsb's. But the supply voltage (if from a transformer and the AC line) is not likely to vary nearly that much. And if you are reading joystick pots, then you don't need that much accuracy anyhow. With an external reference, you have control over the accuracy and stability - these depend on the reference you choose. But more important, with an external reference, you get to choose the range of voltage that the A/D converter will handle. Using the internal reference (5v), the A/D will handle a voltage from 0 to 5 volts, with the least significant bit being 5/1024 or about 5 mv. If you use a 4.192 volt reference, the range will be 0 to 4.192 , with the lsb being exactly 4 mv. If you use a 1.2 volt reference, the range will be 0 to 1.2 volts, with the lsb being 1.2/1024 = 1.17 mv. As to the 50k pot business - the ADC works best with a low resistance voltage source. Suppose you use the internal reference, and you drive the 50k pots from the 5 volt supply - the wiper will give you from 0 to 5 volts, but at high resistance. If you put an operational amplifier (opamp) in a non-inverting configuration between the wiper and the A/D input, you now will still have 5 volts, but at a very low resistance - the A/D converter will be very happy. You can get "rail-to-rail" opamps that will operate with input voltages very close to the supply voltage and to ground, and that can drive the output very close to the supply voltage and to ground. Using one of these means only needing a 5 volt supply. You will lose a little bit at each end of the pot's range, and this can be avoided by putting a resistor in series at each end of the pot (e.g. 1k) - the pot will go through its whole range, but the voltage to the opamp will go from 01. volts to 4.9 volts (more or less). Larry At 03:08 PM 11/25/2002 +0200, you wrote: >Hi there, > >Most probably a old issue on the list. But what is the difference between >the internal and external reference? When will you be using the internal >reference and when the other? > >I have written a algorith on the pic to mathematically convert the 10-bit >number to a number between Ymin and Ymax but the algorithm takes far too >long. Is there a way (hopefully easy) that you more or less can convert >the 10-bit number to say between 100 and 200 almost directly (bit >manipulation) without long and cumbersome arithmetic. > >Thirdly, in the datasheet it is mentioned that it is best to use around >10K pots for best results. Is this now to get the fastest charging of the >capacitor and therefore the highest speed in the conversion or is there >another reason, because I have a joystick that only uses 50K pots. What >can I do to remedy this? Maybe put some resistor in parallel with this? > >Regards > >Nic Scheepers > >-- >http://www.piclist.com hint: The PICList is archived three different >ways. See http://www.piclist.com/#archives for details. Larry Bradley Orleans (Ottawa), Ontario, CANADA -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.