Hi Sathish,
About PAD7)
Please look at Table 2-2. Pin Functions and Priorities in RM.
If there is more than one function associated with a pin, the output priority is indicated by the position in the table from top (highest priority) to bottom (lowest priority).
So, until we enable DAC or ADC module for this pin, pin could be used as GPIO pin. With exception that by default digital input buffer is disabled after reset – See DIENAD register.
When DAC is not enabled, ADC module could be used for measuring voltage at PAD7 pin.
In fact, GPIO state at PAD7 will be not affected by either enabling ADC (reading appropriate channel) or by enabling DAC module. See Table 2-34. Effect of Enabled Features in RM.
So, PAD7 is configured as analog pin until you enable digital buffer (DIENAD, after that it will be digital pin) or until you switch this pin into output mode (DDRAD). Of course, PAD7 will work as analog pin only when you configure ADC module and start appropriate conversion. No modifications in pin registers are needed for measuring analog voltage at port AD.
I hope it helps you.
Have a great day,
RadekS
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------