QFTP package overheating

I've made up a board with an ATmega328P-AU (TQFP package). It has one analog in and one PWM out (yes waste of a chip and yes arduino based).

Problem is that the MCU is getting VERY hot and drawing about 290 mA and the 5V has dropped to 3.3Vish because i have a series resistor on the regulator to help limit current like this. There are no shorts of any of the I/O's used and i've not been able to program it (via AVRISP from the arduino IDE), it comes out with:

avrdude: verification error, first mismatch at byte 0x0000
0x0c != 0xff
avrdude: verification error; content mismatch

Any idea's ?should I try the excruciating experience of removing the MCU ?

Got a schematic & code?
Sounds like design is bad, or construction is bad.
Any chance IC is installed 90 degrees, 180 degrees off?

the chip is correctly orientated. schematic attached. i'm using the 8MHz breadboard bootloader/settings but have not been able to even get any code onto the chip as i get the error reported above.

Printing Print Schematic.pdf (37.2 KB)

ADC0 is being used as analog input? You will need power on Avcc then as well as a 0.1uFR cap to gbd, and should have 0.1uF cap from Aref to gnd as well.

I don't see anything obviously incorrect. Can only guess maybe overheating during chip installation? This was assembled by hand? Or reflowed in an oven?

Are you sure the regulator is putting out 5V?

Right, notes for the next build, Well the regulator is putting out 3V instead of 5V because it is overloaded, according to the voltage drop resistor in series the reg is outputting over 250mA

It is hand soldered, I'm thinking i may have done some damage, time to break out the desoldering braid once i find it.

Can you start by removing the regulator? Then buzz Vcc/Gnd on the chip, aybe its the regulator that is the issue.
I see symbols for polarized caps - could they be backwards?

hm, no the Atmega is getting hot so fault is definitly there, I have probably overheated it in soldering

got the MCU off and the reg is outputting 6.8V but i'm not surprised having overheated it pushing 290ma through it when it was made for 100mA, i'm surprised it has no protection though. I'll replace the reg first and make sure it's working then put the MCU in.

Could be the transistor too. If you haven't soldered the AVR in yet, try triggering the gate manually to see if that's the problem. I have a perfboard now turning on some FETs via a shift register. The attached LED on one FET didn't light up, but no other sign of trouble .. so I put the shift reg pins in high-impedance and tapped the gate with USB bus power. The computer then informed me that I had unplugged the USB device... The FET was shorted (internally). Yours could be sinking current to ground/Vcc through the gate.

impedence on the FET gate is a few Mohm so it is not shorting the MCU

Well i took it off and found the (SOIC) regulator supplying 6.8V ! so i replaced the reg and still supplying 6.8V! replaced with a standard through hole 78L05 and now outputs 5.25V, Someone at Farnell is in for a bollocking !