Hi there,
This is not a school project, but rather a home project to build a simple 8-bit computer, and am starting with a clock signal driving registers and a simple ALU. The project comes from: eater.net/8bit
But, I'm stuck on something, any help much appreciated!
The basic clock works great. I have a push button that is using a 555 timer to debounce the signal, so that a button push will cause a rising edge of a clock signal which is used to step a downstream "computer" consisting of 2 registers and an ALU doing some basic math. This works great, pushing the button causes the "computer" to step exactly once, releasing the button causes the clock signal to go LO, with no affect on the "computer" as I'd expect. One press/depress, one computer step. Great!
Now, instead of sending the clock output directly downstream to drive the "computer", I am sending it through a logic gate, then to the same downstream computer, and I am seeing bizarre behavior.
First I am sending it through an OR gate (SN74LS32N).
The OR quad-gate IC is connected to Vcc and ground, one input of the OR is the clock_output signal I described above, and the other input is connected via a 1K resistor to ground. I am then using the output of the OR gate to serve as the clock signal that goes to the computer, and I'd expect to see identical behavior as I saw above. However, in this setup, the computer takes a step on the button depress, but, after holding it down for a while, when I release the button and the signal goes low again, the computer takes *another* step (I should not see any step on the button release).
(I also added a 0.1microfarad capacitor across VCC and GND (pins 7 and 14), but, that didn't do anything to help).
So, that's weird thing #1.
Weird thing #2: Instead of sending through an OR gate, I replaced the OR gate with an AND gate. One input is the clock_output signal described initially, and the other input is now a 1K resistor tied to +5V. Now, when I use the output of AND to drive a clock, holding the button down causes rapid fire mode, as if I was pressing/depressing really really fast. The computer takes multiple steps, more the longer I hold down the button (like automatic fire mode). This AND gate IC also has a 0.1microFarad capactor across Vcc and GND as well, but it doesn't help.
Even stranger, pin 14 (Vcc_in) is connected to power of course (+5V) on the AND chip. However, if I *disconnect* that pin everything works fine, single press of the button through the AND gate, output of the AND gate drives exactly one step of the computer, and nothing on button release, just as it should work. I tried the same thing with the OR chip, there, disconnecting power causes the OR gate to do nothing (as I'd expect) multiple button presses have no effect.
I would expect the computer to respond identically to the debounced button clock signal, whether it's connected directly to the signal, through an OR gate (ORed with Gnd), or through and AND gate (ANDed with +5V). It's also bizarre to me that disconnecting power to the AND IC seems to help, not cause the chip to go dead.
I apologize if this is a totally obvious question. I'm a software guy by training and career, just playing around building an 8-bit computer at home for fun, to learn more about real HW, and to show my kids. I suppose a good next step would be to look at the signals with an oscilloscope, but, I don't have one.
So, I'm at a loss. suggestions much appreciated! (FWIW, I have swapped out different OR and AND gates and still see the same issue, so, I don't think it's a fried chip).
Let me know if any other information would be helpful, or even if anyone is willing to chat about this. Thank you so much in advance for any help!
-Alex
P.S. The clock I've built is the one described by Ben Eater's 8-bit computer project in the 4 youtube videos below. The reason I want to send a clock signal through logic gates is eventually I'm going to have an automatic astable pulse and a monostable push-button driven pulse, and I'll use another switch to select which clock mode goes to the computer. That way the computer can run in automatic pulse mode, or manual push button debug mode. I'm building the setup described in these 4 videos below. (And I've assembled the downstream ALU and registers described in subsequent videos, which is how I'm observing the wonky behavior above from the clock signal effects).
Part 1:
Part 2:
Part 3:
Part 4:
This is not a school project, but rather a home project to build a simple 8-bit computer, and am starting with a clock signal driving registers and a simple ALU. The project comes from: eater.net/8bit
But, I'm stuck on something, any help much appreciated!
The basic clock works great. I have a push button that is using a 555 timer to debounce the signal, so that a button push will cause a rising edge of a clock signal which is used to step a downstream "computer" consisting of 2 registers and an ALU doing some basic math. This works great, pushing the button causes the "computer" to step exactly once, releasing the button causes the clock signal to go LO, with no affect on the "computer" as I'd expect. One press/depress, one computer step. Great!
Now, instead of sending the clock output directly downstream to drive the "computer", I am sending it through a logic gate, then to the same downstream computer, and I am seeing bizarre behavior.
First I am sending it through an OR gate (SN74LS32N).
The OR quad-gate IC is connected to Vcc and ground, one input of the OR is the clock_output signal I described above, and the other input is connected via a 1K resistor to ground. I am then using the output of the OR gate to serve as the clock signal that goes to the computer, and I'd expect to see identical behavior as I saw above. However, in this setup, the computer takes a step on the button depress, but, after holding it down for a while, when I release the button and the signal goes low again, the computer takes *another* step (I should not see any step on the button release).
(I also added a 0.1microfarad capacitor across VCC and GND (pins 7 and 14), but, that didn't do anything to help).
So, that's weird thing #1.
Weird thing #2: Instead of sending through an OR gate, I replaced the OR gate with an AND gate. One input is the clock_output signal described initially, and the other input is now a 1K resistor tied to +5V. Now, when I use the output of AND to drive a clock, holding the button down causes rapid fire mode, as if I was pressing/depressing really really fast. The computer takes multiple steps, more the longer I hold down the button (like automatic fire mode). This AND gate IC also has a 0.1microFarad capactor across Vcc and GND as well, but it doesn't help.
Even stranger, pin 14 (Vcc_in) is connected to power of course (+5V) on the AND chip. However, if I *disconnect* that pin everything works fine, single press of the button through the AND gate, output of the AND gate drives exactly one step of the computer, and nothing on button release, just as it should work. I tried the same thing with the OR chip, there, disconnecting power causes the OR gate to do nothing (as I'd expect) multiple button presses have no effect.
I would expect the computer to respond identically to the debounced button clock signal, whether it's connected directly to the signal, through an OR gate (ORed with Gnd), or through and AND gate (ANDed with +5V). It's also bizarre to me that disconnecting power to the AND IC seems to help, not cause the chip to go dead.
I apologize if this is a totally obvious question. I'm a software guy by training and career, just playing around building an 8-bit computer at home for fun, to learn more about real HW, and to show my kids. I suppose a good next step would be to look at the signals with an oscilloscope, but, I don't have one.
So, I'm at a loss. suggestions much appreciated! (FWIW, I have swapped out different OR and AND gates and still see the same issue, so, I don't think it's a fried chip).
Let me know if any other information would be helpful, or even if anyone is willing to chat about this. Thank you so much in advance for any help!
-Alex
P.S. The clock I've built is the one described by Ben Eater's 8-bit computer project in the 4 youtube videos below. The reason I want to send a clock signal through logic gates is eventually I'm going to have an automatic astable pulse and a monostable push-button driven pulse, and I'll use another switch to select which clock mode goes to the computer. That way the computer can run in automatic pulse mode, or manual push button debug mode. I'm building the setup described in these 4 videos below. (And I've assembled the downstream ALU and registers described in subsequent videos, which is how I'm observing the wonky behavior above from the clock signal effects).
Part 1: