I took a suggestion of disconnecting my external monitor from my laptop and the results were the same. What I did notice however is that the AT89S52 chip always reports the correct signature when I use the new circuit (with the filters) but when I use the older version (without filters), the chip couldn't be recognized half the time.
Now I'm curious. would my problem be solved if I wrapped plastic wrap around the circuit and aluminum foil as the outer layer and only cut the portion off where I insert and remove parts?
I'm baffled as to what is really going on. I'm trying to make a circuit that can successfully program an AT89S52 everytime.
I made two versions of my circuit. In the first version, I didn't include the components in red boxes (resistors in red boxes before were wires) decouple each IC and it only had 1 100uF capacitor and 1 47nF capacitor (not included in schematic) for decoupling.
This is where things get crazy.
When my laptop lid was still intact with my laptop and I was using my first circuit, everything worked continuously. Sadly the hinges to the lid broke and now I have to use my laptop with an external monitor. I included a picture of my current setup. I then used the exact same circuit with the same software setup and everything else EXACTLY the same, and now I get continuous failures in programming (example: byte verification fails).
So now I took a hunch that maybe with the absense of the lid, the laptop is sending unwanted spikes to my circuit making my circuit think there's extra clocks.
I did some research and then I redid my circuit by adding components shown in red boxes. I did a double-filter setup on the clock line using RC filters (330 ohms for R and 10nF for C). I even made my software write one byte every 100 microseconds while I was on lunch and I still get errors.
The resistors feeding to the VCC pins of each IC are 0 ohms but I wanted to try ferrite beads so I tried them and they didnt work.
I also tried a parallel port extension cable and that gave worse results (couldnt validate signature).
In all other tests (minus those with the extension cable attached), the chip signature can always be read correctly.
Is there something I can do hardware wise to rectify this issue (before I install a new laptop lid) even if it means another capacitor?
The chip number of the other IC I used in my circuit is a 74HC125