Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: acd52832_SAADC_Differential_input_2
Fork of acn_nrf52_saadc by
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;
}
