analogRead() function does not acquire signal from Ch-8, 14, 15 of ADC

During ADC experiment on Arduino UNO, it has been observed that signals could only be acquired from Ch-0 to Ch-5 using analogRead() function. The function does not acquire signal from Ch-8 (internal temperature of MCU), Ch-14 (GND), and Ch-15 (internal 1.1V).

How can we read signals from these channels?

The analog_wiring library does not cater for that.

You will need to hack the library function analogRead() in wiring_analog.c or write your own analogRead() function.

Here is a guide to reading the internal temperature.

You may write register(s) level codes to acquire signal from Ch-14 (for example: 1.1V Internal). Here it goes:

1. Select Ch-14 and VREF voltage at 1.1V INTERNal by placing these bits into ADMUX Register: 01001110 (ADMUX = 0x4E;).

2. Select ADC Conversion frequency to 125 kHz and enable the ADC by placing this value into ADCSRA Register: 10000111 (ADCSRA = 0x83;).

3. Start the ADC by putting LH (1) at ADSC-bit of ADCSRA Regsiter (bitSet(ADCSRA, 6;).

4. Wait until conversion is complete, and it can be done by polling the value of ADSC-bit which remains at LH-state as long as conversion is going on (while(bitRead((ADCSRA, 6) != LOW){;}).

5. At the end of conversion, read ADC from <ADCL, ADCH> registers; ADCL has to be read first.

6. Display on the Serial Monitor, the value should be theoretically close to: 0x00DF (1023/5 * 1.1 = 0x00DF).

The Complete Sketch

void setup() 
  ADMUX = 0x4E;  //Vref = 5V; Ch-14
  ADCSRA = 0x83;  //ADC enable, adcClk = 125 kHz

void loop() 
  bitSet(ADCSRA, 6);   //Start ADC
  while(bitRead(ADCSRA, 6) != LOW)
    ;  /wait until ADC conversion is done
  byte x = ADCL;  //read ADC value lower 8-bit first
  int y = (ADCH<<8) | x; //read upper 8-bit
  Serial.println(y, HEX);

BTW: Check data sheets and note that internal 1.1V is connected with Ch-14 of the ADC.

I apologize for my late reply. Thank you all for your kind response.