I am developing a device converting adc input into data and transmitting them and receiving them at other place,I cant figure out between analog input eg:AIN0 and the port pins please help I have included the code here using NRF24LE1 Keil
relation between AIN0 and POO and how to connect
void adc_init(void) { hal_adc_set_input_channel(HAL_ADC_INP_AIN0); hal_adc_set_reference(HAL_ADC_REF_INT); hal_adc_set_input_mode(HAL_ADC_SINGLE); hal_adc_set_conversion_mode(HAL_ADC_SINGLE_STEP); hal_adc_set_power_down_delay(HAL_ADC_PDD_0US); hal_adc_set_acq_window(HAL_ADC_AQW_075US); hal_adc_set_resolution(HAL_ADC_RES_8BIT); hal_adc_set_data_just(HAL_ADC_JUST_RIGHT); }
port pins
P0DIR =0x03;
P0=0;
P0CON = 0x70; P0CON = 0x71;