Hello once again.
I'm now reading and learning about the ADC device of this Mega4808.
In those Start guides posted by Moe123 (and pointed by El Tangas) in the other thread, and I have this first question.
The ADC input pin needs to have the digital input buffer and the pull-up resistor disable....
So, they have this code that comes I don't know from where (they didn't mentioned the specific registers/properties we needed to change for this):
/* Disable digital input buffer */ PORTD.PIN6CTRL &= ~PORT_ISC_gm; PORTD.PIN6CTRL |= PORT_ISC_INPUT_DISABLE_gc; /* Disable pull-up resistor */ PORTD.PIN6CTRL &= ~PORT_PULLUPEN_bm;
Because they say "disable digital input buffer and pull-up resistor". So when I read the 2nd and 3rd lines of code, I assume that second line is for disabling digital input buffer and the 3rd line is to disable pull-up resistor.
But when I read the 1st line of code, I ask myself what is this for?