I have designed a sensor that uses the ATMega 328p as its µC since I wanted to just be easily test my code.
After building and testing the sensor I combined it all on a pcb and basically copied the the design for the Arduino Pro Mini.
Now while trying to upload a sketch (via programmer) or the bootloader I just get the error that the device ID ist invalid. avrdude ist just reading 0x000000 as the deviceID what made me first think I had some errors in my wiring however I checked all wires, used shorter or longer, etc.
Then I tried using an bench power supply instead of the battery that I used. That did not help as well.
I have attached the part of the ATMega of the schematic.
If anyone has an idea I would really appreciate it.
Edit: I just saw I messed the schematic up a bit while rearranging it. Of course the gnd of the decoupling caps is not connected to the pin 19. Please ignore that.