B
Bart T.
Guest
Hi,
I've built a simple circuit which sends data to the computer via a
single line (an output from a 74HC165 shift register connected to a
parallel port status pin.) It doesn't work correctly unless that
connection is broken (I've confirmed with a multimeter that the '165
output is correct.)
Here's what I noticed: If the most significant bits of the byte loaded
into the 165 are 1's, they will consistently be returned correctly to
the PC:
80 -> 80
C0 -> C0
E0 -> E0
....
But when a zero appears in the stream, it'll screw up the rest (even
if there are 1's later on, they still appear as 0):
90 -> 80
A0 -> 80
FA -> F8
If I load F9 into the shift register, I get FC out, which is really
strange. This only happens when the parallel port input line (pin 12,
to be specific) is connected to Q7 (the output) of the IC. If that
connection is not made, the IC actually outputs the correct sequence.
The parallel port connector is grounded to the rest of my circuit.
Does anyone know what I'm missing? The connection is direct (pull-up
and down resistors don't affect it) and my code simply reads the
status port (BASE_LPT_ADDRESS + 1.) Writing a 1 or 0 before each read
doesn't have any effect.
Thanks in advance...
I've built a simple circuit which sends data to the computer via a
single line (an output from a 74HC165 shift register connected to a
parallel port status pin.) It doesn't work correctly unless that
connection is broken (I've confirmed with a multimeter that the '165
output is correct.)
Here's what I noticed: If the most significant bits of the byte loaded
into the 165 are 1's, they will consistently be returned correctly to
the PC:
80 -> 80
C0 -> C0
E0 -> E0
....
But when a zero appears in the stream, it'll screw up the rest (even
if there are 1's later on, they still appear as 0):
90 -> 80
A0 -> 80
FA -> F8
If I load F9 into the shift register, I get FC out, which is really
strange. This only happens when the parallel port input line (pin 12,
to be specific) is connected to Q7 (the output) of the IC. If that
connection is not made, the IC actually outputs the correct sequence.
The parallel port connector is grounded to the rest of my circuit.
Does anyone know what I'm missing? The connection is direct (pull-up
and down resistors don't affect it) and my code simply reads the
status port (BASE_LPT_ADDRESS + 1.) Writing a 1 or 0 before each read
doesn't have any effect.
Thanks in advance...