0
\$\begingroup\$

I want to create a game like "pimball" using 4 leds to state the game. One exit to define if the game is still running. And 2 inputs that are switches.

1) To begin with, the first is to assemble 4 FlipFlops to do the ascending or descending sequence circuit, where in the illuminated LED goes to the left or right depending on a control input I, that is, has the sequence from right to the left (taking the binary values ​​1,2,4,8) or (taking the binary values ​​8,4,2,1) from left to right:

1000 -> 0100 -> 0010 -> 0001 (left to right) if I = 0 0001 -> 0010 -> 0100 -> 1000 (right to left) if input = 1

2) started to create the game: it's two players, each with a switch. The left switch is controlled by the player on the left and the right by the right. The aim is to keep the lit LED led away from the tip of each player. For this the players each have one switch which jointly control the direction of travel: where two switches are equal (both 0 or both 1) and take the clock, the lit LED moves to the right, otherwise it moves to the left. My schematic is below. Am i doing this right?

Could someone sho me on Logisim how to implement this? Or any tips? Thanks in advance! ^_^

enter image description here

\$\endgroup\$
  • \$\begingroup\$ "Pimball"? "One exit"? \$\endgroup\$ – Andy aka Jan 22 '16 at 0:40
  • \$\begingroup\$ Sorry. English is not my first language, forget about the exit. Could you help me do this? Just the sequence from 1 to 8 and 8 to 1 would help me a lot! \$\endgroup\$ – CP_PT Jan 22 '16 at 0:45
  • \$\begingroup\$ Look up a Johnson counter. \$\endgroup\$ – Andy aka Jan 22 '16 at 0:46
  • \$\begingroup\$ it looks OK to me, you want to XOR the D and E inputs and use that value to control the direction. \$\endgroup\$ – Jasen Jan 24 '16 at 3:49
1
\$\begingroup\$

I think you want to XOR the players inputs and use the result to control the direction.

also the inputs to the end multiplexers look wrong, probably the last flip-flop should feed back to itself somehow

you might get a better result using and "up/down" counter and a binary decoder as this setup would simplify setting the initial state.

| improve this answer | |
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.