Hi All.
I seem to be have a problem reading the ADC input on PB12.
I am initialising the ADC as follows:
External_ADC.pin_num = 2;
External_ADC.dir = RUI_GPIO_PIN_DIR_INPUT;
External_ADC.pull = RUI_GPIO_PIN_NOPULL;
rui_adc_init(&External_ADC);
Readings are taken by :
uint16_t wTempReading;
rui_adc_get(&Bat_level,&wTempReading);
RUI_LOG_PRINTF(“ADC Sample: %d\r\n”,wTempReading);
However, I seem to get readings in the 2200 +/- a few counts range regardless of the voltage applied to pin 26 on J22 (PB12).
Has anyone had any success on reading the ADC from PB12?
Cheers,
Martin
We will appreciate if you share your project (if possible) with the community 