Quote:
|
Originally Posted by Squall
Code:
adc_result = ADRESH;
adc_result <<= 8;
adc_result += ADRESL;
We've understood that it's reading the High bits of the ADC and then it'll copy it do the lower part of the adc_result variable, this part I really can't understand.
|
The
<<= "left shift" operator moves the value toward the
upper part of the variable. With that correction, you should understand the code fine now.