I am using ATmega64 for serial communication. Based on the schematics(attached below) I have connected all the VCC and AVCC pins to 5V and all the GND pins to ground. I have placed decoupling capacitors of 100nF at each of those VCC and GND pins combined and all those have common ground and VCC. I have burned my code to print serial data and everything is working fine, I am using FT232R breakout board for the serial communication. Here are my connections details for reference(although it's trivial, please correct me if I am wrong). Problem is that Pins 23,27,28 are supplying out only 2.5 volts instead of 5V even when I activated those.
Pin 21,52,64 to VCC
Pin 22,53,63 to GND
Pin 62(AREF) to GND via 100nF capacitor
External 16MHz crystal oscillator output to pin 24, for SAME REASON pin 23 isn't supplying out 5V so I connected the other end of the Crystal oscillator to VCC directly and it's also working fine in that case.
M64 pin 2,3 also works as Rx and Tx pins and they are working well when I connect it to the FT232R for serial communication but when I used pin 27,28 which are also Rx and Tx pins, they aren't working, in fact low voltage of ~2.5V is being produced out of those pins, while pin 2 and 3 gives out 5V as expected and working well.
I have measured voltages across all those pins and problem is pin 27,28 aren't producing enough voltage to the output. I even tried to activate pin 25 and when I checked its output is ~2.5V but it should be 5V.
My fuse settings are as follows, lfuse-0xDA hfuse-0x98 efuse-0xFD. so my problem is that Pins 23,27,28 are supplying out only 2.5 volts instead of 5V even when I activated those. Thanks in advance.