Powering 5V IC with 3.8V
If your battery voltage is 3.8V then you will get 0/3.8V logic levels from the ATMega128. This voltage is perfectly fine for ATmegas, the only limitation may be maximum clock speed (check it in the datasheet).