Hello,
I'm working on a project and hoping to expand my basic understanding of electronics. I've written a program that interfaces with the printer port. I can send a byte to the data lines, and change some of the control registers around. I used a breadboard with some led's to verify and test the logic.
My next step was to hook this up to an 8 bit shift register (SN74HC164N), and drive some led's. Understand that the shift registers cannot drive a lot of current, so I hooked the 8 led's up in parallel and tied them to ground with a 1k ohm resistor. I wired up the clock and clear pins to the strobe and init lines of the parallel port. Lastly I combined the A & B inputs on the shift register with the D0 data line.
I wrote a small program that would set the clear pin high, while sending data to D0 and cycling the clock on and off. Unfortunately the results were not as expected.
the output led's from the shift register all cycle on and off. I was expecting them to cascade as data was shifted down to each paralell output. I'm a bit stumpted at the moment. It's basically flip flopping all 8 led's.
The data I'm sending through is a series of 1's and 0's. Sometimes I'll pass just 0 through and it still cycles. I'm not sure if the shift register is bad or if I wired the circuit wrong. I tried from scratch twice and still got the same results.
Lastly I tried skipping the parallel port altogether and tested the shift registers with three momentary pushbuttons simulating data, clock and clear. This got really interesting because the led's would seem to light up any time my fingers got near the shift register or the data / clock jumpers. It seemed to be picking up static electricity or capacitance from my hands? I found that annoying. When I tried to manually use the shift register the LED's would blink in an irregular sequence.. differently from the computer driving it, but not in an expected manner.
Any suggestions on how to troubleshoot would be appreciated. The circuit is pretty simple but I can attach a diagram if needed. Ultimately I'm not looking to drive LED's but I wanted to test with them.
I'm working on a project and hoping to expand my basic understanding of electronics. I've written a program that interfaces with the printer port. I can send a byte to the data lines, and change some of the control registers around. I used a breadboard with some led's to verify and test the logic.
My next step was to hook this up to an 8 bit shift register (SN74HC164N), and drive some led's. Understand that the shift registers cannot drive a lot of current, so I hooked the 8 led's up in parallel and tied them to ground with a 1k ohm resistor. I wired up the clock and clear pins to the strobe and init lines of the parallel port. Lastly I combined the A & B inputs on the shift register with the D0 data line.
I wrote a small program that would set the clear pin high, while sending data to D0 and cycling the clock on and off. Unfortunately the results were not as expected.
the output led's from the shift register all cycle on and off. I was expecting them to cascade as data was shifted down to each paralell output. I'm a bit stumpted at the moment. It's basically flip flopping all 8 led's.
The data I'm sending through is a series of 1's and 0's. Sometimes I'll pass just 0 through and it still cycles. I'm not sure if the shift register is bad or if I wired the circuit wrong. I tried from scratch twice and still got the same results.
Lastly I tried skipping the parallel port altogether and tested the shift registers with three momentary pushbuttons simulating data, clock and clear. This got really interesting because the led's would seem to light up any time my fingers got near the shift register or the data / clock jumpers. It seemed to be picking up static electricity or capacitance from my hands? I found that annoying. When I tried to manually use the shift register the LED's would blink in an irregular sequence.. differently from the computer driving it, but not in an expected manner.
Any suggestions on how to troubleshoot would be appreciated. The circuit is pretty simple but I can attach a diagram if needed. Ultimately I'm not looking to drive LED's but I wanted to test with them.