We are trying to display the battery voltage connected to the ATmega328P, looking at the data sheet of the AN2447 it gives example code for using an ATmega328PB, which from