So, I've put the code inside a library, just because I'm a fan of, here the source as a Gist: VoltageReference · GitHub
I'm now facing another doubt.
I've measured the output voltage of my laptop USB with no load and it is precisely 5200mV.
I've connected my original Arduino Micro and measured the voltage at it's pins, and no surprise it's 5200mV.
I've connected my cheap Arduino Nano clone and the voltage measured between GND and 5V pins is 4800mV while the USB input voltage is still 5200mV. Now, I believe there's a diode somewhere which is causing the voltage drop, which is still acceptable, but which value should I use for calibrating the library? I believe it should be the voltage measured between the pins as that should be the voltage powering the MCP...
BTW, this is the source of the code http://provideyourown.com/2012/secret-arduino-voltmeter-measure-battery-voltage/