Oscillation error with flip-flop
Posted: Sun Aug 09, 2020 2:42 am
Hello, guys.
I'm reading Charles Petzold's book "C.O.D.E" and there is an adding machine example that uses 8-bit latch to save the sum for further addition. Here's the circuit image from book: https://i.imgur.com/aVF9Rwp.png.
I've built this circuit in program, but it throws the error "Oscillation" when I try to add some numbers.
I attached project below, find category "14. Feedback and Flip-Flops" and circuit named "Adding Machine (2)" if you want to help me.
There is no error if I don't set first number by switches, which means adding 00000000 and latch contents.
"Add" button is actually the Clock input of the flip-flops.
I even tried to test components of the circuit separately (e.g. checked if the adding machine works properly or 8-bit latch saves data as it should) and they seem to work well.
But when I wire them like in the example in the book I'm getting error. I think the connection between latch output and adder's B input (it's the single 8-bit wire that goes back to adder) causes the problem, but I don't understand what exactly going on, because circuit is too complex for me, there is so much components.
I'm reading Charles Petzold's book "C.O.D.E" and there is an adding machine example that uses 8-bit latch to save the sum for further addition. Here's the circuit image from book: https://i.imgur.com/aVF9Rwp.png.
I've built this circuit in program, but it throws the error "Oscillation" when I try to add some numbers.
I attached project below, find category "14. Feedback and Flip-Flops" and circuit named "Adding Machine (2)" if you want to help me.
There is no error if I don't set first number by switches, which means adding 00000000 and latch contents.
"Add" button is actually the Clock input of the flip-flops.
I even tried to test components of the circuit separately (e.g. checked if the adding machine works properly or 8-bit latch saves data as it should) and they seem to work well.
But when I wire them like in the example in the book I'm getting error. I think the connection between latch output and adder's B input (it's the single 8-bit wire that goes back to adder) causes the problem, but I don't understand what exactly going on, because circuit is too complex for me, there is so much components.