Hi there,
I'm building an 8-bit breadboard computer, based on Ben Eater's excellent 8-bit computer project but with some of my own extensions. Goal is just to have some fun and learn a bit about HW (I'm a SW guy by training/profession)
I'm having trouble building an output register, and while I've found a fix for my bug (involving a random 220 Ohm resistor, see below), I have no idea why it works (or even why it should), and I'm trying to fully understand the system and not just place the randomly discovered band-aid and paper over it.
Before I post a schematic below, let me explain at a high level the breadboard I'm debugging:
1. A 555 timer generates a clock frequency (probably not relevant so I'm omitting details).
2. A 74LS76 Dual J-K Flip Flop is used to build a 2 bit timer, iterating forever over (00, 01, 10, 11). Those 2 bits drive a decoder (see below). Those 2 bits also serve as input address lines to an EEPROM. Let's call these 2 bits the high-order bit and the low-order bit. The low-order bit output also serves as the clock for the high-order bit.
3. A 74LS139 decoder (see above) takes the 2 bits and outputs a repeating pattern of (1110, 1101, 1011, 0111). Those 4 bits are connected to the common cathode of 4 adjacent 7-segment LCD displays.
4. An EEPROM is addressed by the 2-bit counter, and sends "what segments of the displays to light up" to each of the 4 7-segment displays.
In this way, I can turn on 1 of 4 LCD displays, and drive "what segments to light up" from the EEPROM. When I run the clock fast enough, it looks like all 4 displays are driven at once and I have a nice output for an 8 bit register (sign bit and then 3 decimal digits).
I am following the design from: https://eater.net/bbcpu8-output-register/
Here is the problem: The Dual J-K flip flop should output 2 square waves, with the high-order bit at half the frequency of the low-order bit. It doesn't. The low-order bit looks great, but the high-order bit is just flat in the low position (~0.15V):
<<See Attachment: System_Broken_Without_Resistor.png>>
Here is the weird part (which I randomly discovered while inserting a bunch of debugging LEDs... before I just borrowed an oscilloscope so now I don't use LEDs for debugging!). Even though the problem is with the output of the high-order bit from the JK flip flop, if I connect the "low-order" bit output to ground via a 220 Ohm resistor, everything works fine!
It changes the high-order bit output and I get the desired result:
<<See Attachment: System_Working_With_Resistor.png>>
[In both these diagrams, Channel 0 is the low-order output of the J-K flip flop (pin 10), and Channel 1 is the high-order bit (pin 14)]. You can see that logical high for channel 0 is only 2.5 volts, which I believe is due to the resistor to ground. Logical high for the high order bit is 3.6V. If I remove the resistor, I get a good 3.6V on Channel 0 for the low-order bit, but of course then Channel 1 is just DC at 0.1V or so
So, given that something is weird with the output of the high order bit, I started to think maybe one of the "consumers" of that output was behaving badly. As you can see from the schematic below, this high order bit output goes both to the 139 chip, and also to an address input of the EEPROM (2 green lines in my hand drawn schematic). Here is the weird thing: when both of those output lines are connected, the signal is wrong (the low, noisy image above). However, if I disconnect *either* the line into the 139, OR, the line into the 9th address bit of the EEPROM, the output signal from the JK flip-flop becomes fine again, and I get the 2nd oscilloscope screenshot. Disconnecting *either* of them is sufficient to get the output signal from the JK flip-flop correct again (but of course the LCDs don't work properly with either line disconnected, so this, unlike the random 220 Ohm resistor, isn't really a functional fix).
So, this would lead me to believe something is weird with either of those chips. FWIW, I've replaced all 3 chips (JK, decoder, and EEPROM) with spares but that doesn't fix anything. Also, I'm totally confused by why a 220 Ohm resistor to ground, on the LOW ORDER output, fixes the HIGH ORDER output bit of the JK flip-flop chip.
One more note on power: The breadboard is connected to a 5V DC bench power supply. Across +%5V and GND I have a 0.1uF decoupling capacitor and a 330uF power storage cap (thanks to others on this forum who taught me about that in previous threads!)
In case you can't tell by the above, I'm very new to electronics. I've tried to include all the relevant details above, but also omit what I think are extraneous details for clarity. However, if you read this and think "how can I help when he didn't say X", that's certainly b/c I don't know enough to know what is relevant to post. Please just ask and I'll provide any info that is useful. I greatly appreciate any help!
Hand-drawn Schematic Attached as: Output_Register_Schematic.pdf
The outputs from the high-order bit of the JK Flip Flop are labelled green. Disconnecting either one of these two wires gets the waveform on this output back to normal. The outputs of the low-order bit are red/pink. This is where we can add a 220 Ohm resistor to ground to make everything "work"
I'm totally perplexed at this point. Thank you so much in advance!
I'm building an 8-bit breadboard computer, based on Ben Eater's excellent 8-bit computer project but with some of my own extensions. Goal is just to have some fun and learn a bit about HW (I'm a SW guy by training/profession)
I'm having trouble building an output register, and while I've found a fix for my bug (involving a random 220 Ohm resistor, see below), I have no idea why it works (or even why it should), and I'm trying to fully understand the system and not just place the randomly discovered band-aid and paper over it.
Before I post a schematic below, let me explain at a high level the breadboard I'm debugging:
1. A 555 timer generates a clock frequency (probably not relevant so I'm omitting details).
2. A 74LS76 Dual J-K Flip Flop is used to build a 2 bit timer, iterating forever over (00, 01, 10, 11). Those 2 bits drive a decoder (see below). Those 2 bits also serve as input address lines to an EEPROM. Let's call these 2 bits the high-order bit and the low-order bit. The low-order bit output also serves as the clock for the high-order bit.
3. A 74LS139 decoder (see above) takes the 2 bits and outputs a repeating pattern of (1110, 1101, 1011, 0111). Those 4 bits are connected to the common cathode of 4 adjacent 7-segment LCD displays.
4. An EEPROM is addressed by the 2-bit counter, and sends "what segments of the displays to light up" to each of the 4 7-segment displays.
In this way, I can turn on 1 of 4 LCD displays, and drive "what segments to light up" from the EEPROM. When I run the clock fast enough, it looks like all 4 displays are driven at once and I have a nice output for an 8 bit register (sign bit and then 3 decimal digits).
I am following the design from: https://eater.net/bbcpu8-output-register/
Here is the problem: The Dual J-K flip flop should output 2 square waves, with the high-order bit at half the frequency of the low-order bit. It doesn't. The low-order bit looks great, but the high-order bit is just flat in the low position (~0.15V):
<<See Attachment: System_Broken_Without_Resistor.png>>
Here is the weird part (which I randomly discovered while inserting a bunch of debugging LEDs... before I just borrowed an oscilloscope so now I don't use LEDs for debugging!). Even though the problem is with the output of the high-order bit from the JK flip flop, if I connect the "low-order" bit output to ground via a 220 Ohm resistor, everything works fine!
It changes the high-order bit output and I get the desired result:
<<See Attachment: System_Working_With_Resistor.png>>
[In both these diagrams, Channel 0 is the low-order output of the J-K flip flop (pin 10), and Channel 1 is the high-order bit (pin 14)]. You can see that logical high for channel 0 is only 2.5 volts, which I believe is due to the resistor to ground. Logical high for the high order bit is 3.6V. If I remove the resistor, I get a good 3.6V on Channel 0 for the low-order bit, but of course then Channel 1 is just DC at 0.1V or so
So, given that something is weird with the output of the high order bit, I started to think maybe one of the "consumers" of that output was behaving badly. As you can see from the schematic below, this high order bit output goes both to the 139 chip, and also to an address input of the EEPROM (2 green lines in my hand drawn schematic). Here is the weird thing: when both of those output lines are connected, the signal is wrong (the low, noisy image above). However, if I disconnect *either* the line into the 139, OR, the line into the 9th address bit of the EEPROM, the output signal from the JK flip-flop becomes fine again, and I get the 2nd oscilloscope screenshot. Disconnecting *either* of them is sufficient to get the output signal from the JK flip-flop correct again (but of course the LCDs don't work properly with either line disconnected, so this, unlike the random 220 Ohm resistor, isn't really a functional fix).
So, this would lead me to believe something is weird with either of those chips. FWIW, I've replaced all 3 chips (JK, decoder, and EEPROM) with spares but that doesn't fix anything. Also, I'm totally confused by why a 220 Ohm resistor to ground, on the LOW ORDER output, fixes the HIGH ORDER output bit of the JK flip-flop chip.
One more note on power: The breadboard is connected to a 5V DC bench power supply. Across +%5V and GND I have a 0.1uF decoupling capacitor and a 330uF power storage cap (thanks to others on this forum who taught me about that in previous threads!)
In case you can't tell by the above, I'm very new to electronics. I've tried to include all the relevant details above, but also omit what I think are extraneous details for clarity. However, if you read this and think "how can I help when he didn't say X", that's certainly b/c I don't know enough to know what is relevant to post. Please just ask and I'll provide any info that is useful. I greatly appreciate any help!
Hand-drawn Schematic Attached as: Output_Register_Schematic.pdf
The outputs from the high-order bit of the JK Flip Flop are labelled green. Disconnecting either one of these two wires gets the waveform on this output back to normal. The outputs of the low-order bit are red/pink. This is where we can add a 220 Ohm resistor to ground to make everything "work"
I'm totally perplexed at this point. Thank you so much in advance!
Attachments
-
210 KB Views: 14
-
159 KB Views: 12
-
100.7 KB Views: 16