You're limited by the uC's Vcc/Vdd on the high end, and Vss/GND on the low end. The I/O pins have protection diodes; but those have limited current handling capabilities.Thanks. Found plenty of divider calculators with 2 resistors but I have not seen any with 3.
Yes I understand that the reference is the highest the mcu can measure. But it can be pretty much anything I want as long as it does exceed the specifications of the inputs to the reference input and the ADC input? If so are there advantages to using a higher reference? If I would take a guess, it does not really matter since you have only so many bits anyway.
OK, if you take the max voltage range and divide it by an even number, you'll wind up with an ADC result that is easily scaled by left-shifting.
For example, 30v/16 = 1.875. If you used 1.875 as a Vref, shifting the ADC result left four bits effects a multiply by 16, and you have your result in volts.
30v/12 = 2.5v. Using a 2.5v reference, save the ADC result, and left shift it 3 bits (effecting x8) and then add it to the ADC result left-shifted 2 bits (effecting x4), so algebraically you've effected x12 multiplication, and the output is scaled to your actual voltage with no multiplication; just shifts and adds.
A disadvantage of using small Vrefs is that noise becomes a much greater factor than at higher Vrefs.
Oh, on resistor calculators - here's a very handy page for calculating pairs of resistors to use in series/parallel to get close to the real value you need:
http://www.qsl.net/in3otd/parallr.html
Bookmark it.
Table of standard resistance values: http://www.logwell.com/tech/components/resistor_values.html
Bookmark that, too.