what is the function of a microcontroller?? it just takes inputs from various pins and for various combination of inputs, it give various output(through programming)...is it the only function of a microcontroller or does it do anything else also??
if it is the function of a microcontroller,then can we make various devices like comparators , adc, opamp just using microcontrollers(i understand this is not a great idea but just want to know if we can do this....)
for example : to construct an adc which gives 00 for voltage less than 1v,01 for 1v-2v, 10 for 2v-3v and 11 for 3v-4v.., we will take an analog input pin of microcontroller and 2 digital output pins,and we would program the microcontroller to give the desired output for these inputs...
please correct me if i am wrong here....