0
\$\begingroup\$

UPDATE

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?

Question

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

circuit

Sample of layout used in test Sample

\$\endgroup\$
  • 1
    \$\begingroup\$ Bizarre. I'm not quite sure why would you have to low-pass the SCK signal. \$\endgroup\$ – Richard the Spacecat Mar 5 '18 at 18:06
  • 1
    \$\begingroup\$ I meant the VCC pins on each IC have resistance of 0 ohms \$\endgroup\$ – Mike Mar 5 '18 at 18:23
  • 1
    \$\begingroup\$ That is a really bad photo.. and whats with the extra twisted pair antenna that does not look like it goes anywhere? \$\endgroup\$ – Trevor_G Mar 5 '18 at 18:30
  • 3
    \$\begingroup\$ I'd suggest removing the LPF after the buffer, there may be some weirdness involving 'the edges being too slow'. There may be some minimum slew rate specified for the SCK somewhere in the datasheet, be sure to stay within that. \$\endgroup\$ – Richard the Spacecat Mar 5 '18 at 18:35
  • 2
    \$\begingroup\$ Have you tried removing the monitor while the programming is happening? \$\endgroup\$ – Annie Mar 5 '18 at 18:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.