Hi guys, a fast question:
Do I have to setup adc pins as input?
I don't see anything in the datasheet about this.
In any AVR datasheet look at the chapter called "I/O ports" and within that the "Alternative functions of PORTx" sections. Within each it shows the trigger conditions for which way a pin is used.
mmm I see there are internal overriding signals.
Am I right thinking that enabling ADC, will turn all ADC pins into analog inputs? And the digital input register is there to disable adc on any analog input I would use for other purpose?
If you look at, for example, doc7930 for the mega48/88/168, Figure 22-1 shows how the ADC is connected to the pins. Follow the instructions on setting the registers.
© 2020 Microchip Technology Inc.