disable pad keeper when using ADC pin; otherwise you'll see a 20k input

impedance.
This commit is contained in:
Mariano Alvira 2012-11-29 07:49:54 -05:00
parent 89603f7b78
commit f7d1d78ac9

View file

@ -76,6 +76,7 @@ void adc_service(void) {
ADC->SEQ_1bits.CH##x = 1; \ ADC->SEQ_1bits.CH##x = 1; \
GPIO->FUNC_SEL.ADC##x = 1; \ GPIO->FUNC_SEL.ADC##x = 1; \
GPIO->PAD_DIR.ADC##x = 0; \ GPIO->PAD_DIR.ADC##x = 0; \
GPIO->PAD_KEEP.ADC##x = 0; \
GPIO->PAD_PU_EN.ADC##x = 0; \ GPIO->PAD_PU_EN.ADC##x = 0; \
}} while (0) }} while (0)