I have three HC-SR04 sensors connected to a PIC18F4431 with the schematic provided below. Before building the PCB I've tried testing all three sensors with a bread board and they worked fine. But now I have my PCB and when I connect them to that and tried testing, they work only for a few seconds and then stop working.
I set timers and a set of LEDs to lit if an item is in between 40cm from each sensor. As I've tried from the bread board, when I cross my arm withing that range, the appropriate bulbs are lit and when I take my arm off the other bulbs are lit. But using the PCB, when I upload the code through a PICKIT2 they work fine for a few seconds and then they freeze. If I reset the MCLR pin it works again for another few seconds and freeze again. And sometimes randomly if I touch the receiving part of the sensor it works but that happens randomly. Not always working. What could be the issue?
Is my oscillator burnt while I was soldering it? Once I connected two 0.33uF polar capacitors and found out that for one second, it takes one minute or more to blink a bulb.