Question: why adc is used in microcontroller?
Answer: The ADC converts the waveforms to a binary value that can be stored in memory, operated upon and displayed on a screen. Almost all modern microcontrollers have a built in ADC, the most common being the Arduino based on the ATMega328P with a 10 bit resolution and the STM32 with a 12 bit resolution.