I want to write analog output to my GPIO pin i.e. A0. But when i give any analog value say(100) to A0 pin it shows error- (Invalid value for pin) whereas if I use other 5 GPIO pins (0-4) then it shows no error in writing analog value. But in lectures we learn that only A0 pin is capable of receiving and giving analog values then how it is possible to use GPIO pins(0-4) for output as analog value and why is it showing error for A0 pin.
A0 pin is for ADC it can read voltage values only from 0 to 1 try putting values between 0 and 1
GPIO pins are( 0 ,1,2,3,4) these five pins can be used as( input and output both) as per needed where as the A0 pin is an ADC pin is analog to digital converter it is an( analog input pin )which reads values from (0 to 1 ) try values between 0 - 1 and not 100
You are not getting the actual problem. In the given microprocessor there is A0 pin of 8 bits ADC which means 1v is divided into 2^8 = 256(max digital value) though the voltage applied is between 0 to 1 V and digitally the sensor read the voltage between 0 and 1 as between 0-255. If you have seen we have taken the reading from temperature sensor within the range of 255 then divided this by 10.24 to get the temperature. And this whole process can be done with A0 pin only not with other gpio pins. So that 100 is not the voltage that is digital representation of the voltage(0-1).
Also value given in the integromat is digital value if you have known.