Datasheet
nRF52 ADC
The nRF52832 includes an adjustable 'successive-approximation ADC' which can be configured to convert data with
up to 14-bit resolution (0..16383), and the reference voltage can be adjusted up to 3.6V internally.
The default values for the ADC are 10-bit resolution (0..1023) with a 3.6V reference voltage, meaning every digit
returned from the ADC = 3600mV/1024 = 3.515625mV.
Analog Reference Voltage
The internal reference voltage is 0.6V with a variable gain setting, and can be adjust via the analogReference(...)
function, providing one of the following values:
AR_INTERNAL (0.6V Ref * 6 = 0..3.6V) <-- DEFAULT
AR_INTERNAL_3_0 (0.6V Ref * 5 = 0..3.0V)
AR_INTERNAL_2_4 (0.6V Ref * 4 = 0..2.4V)
AR_INTERNAL_1_8 (0.6V Ref * 3 = 0..1.8V)
AR_INTERNAL_1_2 (0.6V Ref * 2 = 0..1.6V)
AR_VDD4 (VDD/4 REF * 4 = 0..VDD)
For example:
Analog Resolution
The ADC resolution can be set to 8, 10, 12 or 14 bits using the analogReadResolution(...) function, with the default value
being 10-bit:
Default ADC Example (10-bit, 3.6V Reference)
The original source for this code is included in the nRF52 BSP and can be viewed online here (https://adafru.it/zod).
// Set the analog reference to 3.0V (default = 3.6V)
analogReference(AR_INTERNAL_3_0);
// Set the resolution to 12-bit (0..4095)
analogReadResolution(12); // Can be 8, 10, 12 or 14
© Adafruit Industries https://learn.adafruit.com/bluefruit-nrf52-feather-learning-guide Page 155 of 175