to digital converter 210 is bound by reference voltage vcc and ground in this way the digital addresses that analog to digital converter 210 provides are maintained accurately even though vcc may change fig2 b shows another embodiment of a device 250 according to the invention the main difference between device 200 and device 250 is that the reference voltage for analog to digital converter 210 and for the resistor divider including resistors 130 and 140 is generated externally in device 200 and internally in device 250 generating the reference voltage internally mitigates the error that occurs in device 200 between the mismatching of capacitances generated at input pin 110 and at the coupling of vcc to analog to digital converter 210 in another embodiment of the invention device 200 shown in fig2 a or 2 b may be configured as an analog voltage monitor one purpose of a voltage monitor may be to determine whether a voltage at a particular i o pin or an internal voltage is below at or above a pre determined voltage or range of voltages this function may be accomplished using a voltage monitor in the circuit shown in fig2 the input at pin 110 may be a pre determined voltage this voltage is preferably converted into a digital address by analog to digital converter 210 then the digital address may be stored in register 220 and finally transferred.