Please forgive me for crossing wires on top of IC's but I wanted to get things done, yet still have no luck. Let me explain the circuit.
I created a circuit in which three parallel port data lines are connected to three status lines through buffers (74HC125). The status lines are also connected to a sub-circuit (not shown) through a 3 inch 10 conductor ribbon cable.
The sub-circuit contains a radio module which won't work at 5V (which is why I included 3V on the connector). It also contains a microcontroller (AT89C4051) in which the three lines (DI, DO, and ICLK) are connected to its port pins.
Also, on the sub-circuit, I included LEDs for debugging. I setup my microcontroller program so no LED goes on until ICLK becomes low then high again.
So I did a loopback test of each pin. I plugged this circuit in my computer and tested each line one-by-one with Quick Basic. Yes that program comes in so handy, all I had to do was run these instructions:
out &H378,&Hx0 ;where x=number representing what bits are set or cleared print inp(&H379) ;if high nibble except MSB is same as what was put in then everything works
So this particular circuit works even with the parallel port connector metal shield removed.
Here's where strange results happen.
As soon as I plug it into the PC port with no external power, some LEDs glow dimly yet I never asked for this.
Once I apply the 5V power after, sometimes the circuit works and sometimes it doesn't. Sometimes a light goes on right away.
I could suspect ground loop issues but I have not spot any of them in either of the PCBs
So the only thing I could guess is the parallel port producing interference?
The circuits are very close to the computer.
This tempts me to ground every unused input of the parallel port in an attempt to cut interference but then again should I?
The only other option for me is to ditch this circuit and make one with a few buttons and press them a million times to run tests which is what I don't want to do.
I setup my port on the PC to AT compatible (SPP mode).
If not that, is my PC completely guilty?