The conversion was made from an incorrect source when the GPIO pin was not PB7. Added functions and macros used to select the correct ADC channel.