It's a shame the internal DAC and the Voltage References are so poor in most of these, otherwise you could do it all using the internal hdw.
Speaking of, Jon mentioned the HLVD module. That one's only really useful for measuring the internal VDD node since the programmable ladder is on VDD and NOT on the external pin. If you want to use the ext HLVD input, it's fixed using the internal 1.024V ref so you have to use an external voltage divider.
Calling them "voltage references" is being generous. They spec them to 3 decimal places (ie 2.048V) and then put such a wide tolerance on them (typ 5-7%) it makes them laughable. Chances are your VDD voltage regulator has better specs than the int Vref!