9 years, 12 months ago.

Setting the ADC bit width when using the AnalogIn API.

Folks,

Quick question, (also know that I'm a noob...), when using the AnalogIn API call, how do I know how wide my ADC is set in my controller (Nordic xxxx1822)? The ADC can be set to 8, 9, or 10 bits.

New to C++ and I haven't completely wrapped my head on the indirection of the different HW libraries and how they link.

Thanks,

Rob

Question relating to:

The nRF51822-mKIT is a low cost ARM mbed enabled development board for Bluetooth® Smart designs with the nRF51822 SoC. The kit gives access to all GPIO pins via pin headers …

1 Answer

9 years, 12 months ago.

The AnalogIn api uses a fixed ADC resolution. Here is the source code, it uses 10-bit resolution: http://mbed.org/users/mbed_official/code/mbed-src/file/cb4253f91ada/targets/hal/TARGET_NORDIC/TARGET_NRF51822/analogin_api.c

Accepted Answer