Hi guys I had a breadboard design set up using an ATMEGA328P-PU and ESP8266-01 and a PIR sensor. I replicated this circuit exactly and it will not work.
First of all I started a new PCB circuit and left out the ESP as I had found out the the ATMEGA was actually not outputting of port B5 when motion was detected.
I have done continuity tests and everything seems fine, when I wave my hand in front of the PIR I can detect using a multimeter that the it is working and can also detect off pin AC0 that that is being detected by the ATMEGA. What isn't happening is on detection output from port B5 to turn on an LED and Port B4 to turn on the ESP, no out put is coming out of those pins at all. I have checked with multimeter and 4.89v is going into bot VCC and AVCC correctly ground is connected to pin 8 and pin 22 (VCC and AVCC pin 7 and pin 20) I have a 16 clock with 2 x 22 capacitors connected to ground, 10k resistor connected to pin 1 and vcc. Power is a 12v mains plug going through a 10uF and then a 5v regulator and a final 10uf.
This is exactly the same setup as the breadboard which I have had functioning for some time yet it will not work any ideas please guys.
Thanks in advance.
UPDATED IMAGES WITH THE HELP OF THE COMMUNITY: