Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Drag racing game help

Status
Not open for further replies.

devkwondoe

New Member
Hello, and please excuse me as this is my first post. I am making a drag racing game and need help with a certain part. I need a way to tell which button was hit first, and make it so the other button is frozen at a 0. I currently am using two D-type flip flops with the buttons put to an and gate with the Q bar of the other flip flop, the D is the Qbar of the same flip flop. My problem is one flip flop starts at a 1 and i would like them both to be to start at 1 or 0 if its easier. Thank you for your time
 
Assuming RESET on both devices is active High.....

Use the output of each flip flop (i.e. Q) to drive the reset of the other flip flop thus when one is set, it prevents the other from functioning.

So Qa drives RESET B &
Qb drives RESET A.

Pull both RESET pins high using a diode OR to reset both devices.
 
Depends on how you choose your config. RESET=1 should give Q=0 & /Q=1 if RESET is active high. Some may require a RESET=0 to clear the devices. You need to decide which flip flop you are going to use and then read the PDF.
 
the main problem is that the circuit will choose one flip flop to start on and the other to start off. Any ways to counter this?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top