I'm attempting to incorporate an ATmega328P-AU into my project. I'm hoping someone can just confirm that my design will work or that I'm not making an obvious errors with my PCB layout/design. Below are my schematic layout and PCB layout in KiCAD. This is a two layer board. Green represents the bottom layer, red the top layer. C4, C5, etc at the bottom left of the pcb image is the boost converter and can be ignored.
I should mention that the boost converter is outputting 5.1V. The reason for 5.1V instead of 5.0 is programming the IC for the boost converter is done with two resisters and is given in the datasheet as Vout = 0.6V (1+ R1/R2). Since this is being assembled by JLCPCB and I'm attempting to use as many basic components as possible this was the best that I could do. It's my understanding that running the AVR chip at 5.1V should be acceptable.
I'm planning on programming the factory blank chip using THIS ISP programmer. I'm planning on using a custom made pinout of pogo pins so I've rearranged the ISP layout to make it easier to run traces to the chip. My question is, since the ISP programmer supplies 5V, is it acceptable to run the 5V traces to the 5V lines that power the chip, also is R13 set up correctly or do I need to have a separate trace run from the reset pin of the chip and to the reset pin of the ISP programmer or can I just do what I've already done in the PCB layout?
Another question I have is for pin 18 which is the AVCC pin. My understanding is its suppose to be used for analog signals but if not needed it can be attached to the VCC pins. Have I done this correctly, does it still need to be connected to 5V on its own with decoupling caps?
My last question is about the crystal (X1). Originally I had designed this as a four layer board, however I decided against that since it appears a two layer board is sufficient. In the original four layer board design I had the crystal isolated on a separate ground plane with only one trace leading to the rest of the ground around it. Now since I'm only using two layers I'm concerned that it isn't isolated enough. The other issue is that the ground for one of the switches is directly underneath the pins for the IC that the crystal connects to. Will this level of isolation be enough for 16mhz operation? As it stands I have a copper exclusion zone around the crystal and only two ground traces connecting with the rest of the ground plane around it.
Any help with these questions is very much appreciated!