Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Reading 74HC165 through parallel port? (schematic included)
Hi,
This problem is driving me nuts! I'm using a 74HC165 shift register and am simply unable to properly read the data using the parallel port. Writing data to it works smoothly but receiving the output isn't working and I believe it's something to do with the electrical characteristics of the parallel port status lines. My schematic is at: http://www.trzy.org/pport.jpg Here's the problem: When the connection between PAPER_OUT (the status pin I'm using to receive input) is broken, the circuit seems to work fine. The first 4 bits that are read back are the same as were written. However, if the connection is made, after the first 1 appears on the output pin, it seems to "stick" for the remaining output cycles (though sometimes it goes low for a cycle.) What could be wrong? I've tried a lot of things with no luck at all. Some examples: Wrote 0x5, read 0x7 Wrote 0xA, read 0xF Wrote 0xC, read 0xD Wrote 0x8, read 0x9 Wrote 0x4, read 0x3 (?!) Things I've tried to troubleshoot this: 1. I tried breaking the connection when I knew the output should be 0 (to see if the parallel port was driving it high somehow) but it remained at 1! I'm using a multimeter to test this. The voltage on the parallel port PAPER_OUT pin (when disconnected and left floating) is always 0, I've never seen it change. Even if I don't actually perform the read operation in my C code, the problem persists! 2. I disconnected the 165's output from the parallel port and then, when the output was 0, I made a connection to +Vcc (+6V in my set up.) The voltage went high but as soon as I removed this new connection, it returned to its actual state as it should. This doesn't happen when connected to the parallel port. 3. I've tried writing both 1 and 0 to the status port (in software) before sampling the input. It didn't have an effect. 4. I've confirmed that the chip is not bad. In summary: The circuit does not work if Q7 of the 74HC165 is connected to any input pin on the parallel port. Removing this connection will not fix the problem until the 165 has new data written to it. Has anyone successfully used the parallel port to read back data from a circuit? I've seen one design that used transistors but I'm afraid I don't understand why they were necessary. I've seen some designs that don't do anything special and they work fine. I really think my design should be fine. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Parallel port electronics | Electronics | |||
parallel port driving 74hc164 | Electronics | |||
FA: PMDX-120 Parallel Port I/O Board, CNC | Metalworking |