I have etched a PCB to program a ATMEGA328P. Currently, it consists of this (note: the capacitor at top right is part of a 3.3V regulator circuit). I have used some spare pins to route certain nets (RESET, 3.3V, GND) to different places easier for components I will add later.
Here is ATMEGA328P datesheet.
I am unable to program the MCU. I am using a usbtinyisp programmer, and it gives an error code stating that rc=-1 (unable to read device ID).
I have checked the pins with an oscilloscope, and all of the programming pins appear to be working.
Does anyone know what the problem could be? Is it necessary to tie all the GND pins together on the device? Or can I just connect one and use the others for reference?
edit: I should mention that this MCU has an internal 8 MHz oscillator.