SAADC library and drivers for nrf52832.
Dependents: acd52832_SAADC_Differential_input_EPD acd52832_Car_battery_ch acd52832_Car_battery_ch_2
Library to use aconno drivers for Nordic Semiconductor nrf52832 SAADC.
Diff: acd_nrf52_saadc.cpp
- Revision:
- 7:1093819c3bbf
- Parent:
- 6:57e342aaaca7
- Child:
- 8:b4afe08821f5
--- a/acd_nrf52_saadc.cpp Thu Aug 24 11:54:14 2017 +0000 +++ b/acd_nrf52_saadc.cpp Thu Sep 28 14:42:00 2017 +0000 @@ -31,7 +31,9 @@ if(NRF_SAADC->RESULT.MAXCNT < 8){ int channel = NRF_SAADC->RESULT.MAXCNT; NRF_SAADC->CH[channel].PSELP = pin; // Input positive pin is VDD = 9 - NRF_SAADC->CH[channel].CONFIG = 0x00020000; // reset + NRF_SAADC->CH[channel].PSELN = pin+1; // Input positive pin is VDD = 9 + NRF_SAADC->CH[channel].CONFIG = 0x00125000; // differential input + //NRF_SAADC->CH[channel].CONFIG = 0x00020000; // reset NRF_SAADC->RESULT.MAXCNT++; return 0; }