This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ADC REFSEL VGB Behavior

Chip: NRF51822

Per the documentation the band gap voltage is 1.2V however on my board when I apply the voltage 1.5V to AIN2 i read the following value from the ADC: 209

This would imply that the total voltage that can be measured is ~1.8V

Is this expected? Shouldn't only report 255 for any value above 1.2V?

The following is my ADC config:

NRF_ADC->CONFIG	= 	  (ADC_CONFIG_EXTREFSEL_None << ADC_CONFIG_EXTREFSEL_Pos) 						
					| (ADC_CONFIG_PSEL_AnalogInput2 << ADC_CONFIG_PSEL_Pos)							/*!< Use analog input 2 as analog input. */
					| (ADC_CONFIG_REFSEL_VBG << ADC_CONFIG_REFSEL_Pos)								/*!< Use internal 1.2V (really 1.8V?) bandgap voltage as reference for conversion. */
					| (ADC_CONFIG_INPSEL_AnalogInputNoPrescaling << ADC_CONFIG_INPSEL_Pos) 			/*!< Analog input specified by PSEL with no prescaling used as input for the conversion. */
					| (ADC_CONFIG_RES_8bit << ADC_CONFIG_RES_Pos);									/*!< 8 bit ADC resolution. */
Related