All About Circuits Forum  

Go Back   All About Circuits Forum > Electronics Forums > Homework Help

Notices

Homework Help Stuck on a textbook question or coursework? Cramming for a test and need help understanding something? Post your questions and attempts here and let others help.

Reply   Post New Thread
 
Thread Tools Display Modes
  #1  
Old 11-03-2009, 04:44 PM
Blackrobe Blackrobe is offline
New Member
 
Join Date: Oct 2009
Posts: 6
Default What happens if more than one button is pressed at the same time?

Hey there,

I have to build something similar to a LED display that only displays 1s and 0s.

The circuit will have three inputs (1, 0, and reset)..and 5 outputs (one output to display each digit so you can enter 5 digits max to display). I need to find a solution on what happens if two of the buttons or more were pressed at the same exact time..so for example what happens if 1, 0 and clear are pressed at the same time.

My solution: I was thinking of using propagation delay, that allows me to address each input at a time even when three are pressed so for instance 1 will not have delay, 0 will have one delay and clear would have 2 delays...does it make sense?.. I cant think of any other reliable way.

Thanks for your help
Reply With Quote
  #2  
Old 11-03-2009, 05:39 PM
beenthere's Avatar
beenthere beenthere is offline
Senior Member
 
Join Date: Apr 2004
Location: Missouri, USA (GMT -6)
Posts: 15,815
Blog Entries: 10
Default

Many variables come into play. If your circuit is properly designed, only the first button press will be recognized. Trivial in software, cumbersome in logic.

That said, what device/s are your buttons attached to?
__________________
First comes the hardware, then the software.
Reply With Quote
  #3  
Old 11-03-2009, 05:52 PM
MaxSmoke MaxSmoke is offline
Junior Member
 
Join Date: Oct 2009
Location: East Anglia, UK
Posts: 35
Default

It is hard to say without seeing the original question your circuit diagram, but I would look at the truth tables and datasheets for each device you have design in to your circuit, as this often helps. Further, draw a timing diagram.

By way of example, what happens to the outputs of a D type flip flop if both preset and clear are asserted at the same time? The only way to be sure is to look at the datasheet truth table. If you were using a 74LS74 then both Q and Q\ would go high, but the flip-flop is not stable. The same will apply to your design, you should be able to design the circuit on paper and then apply the truth tables to each part of the logic to see ultimately what occurs. Of course if you have access to a simulator this will show you the outputs, when all inputs are asserted.

Another approach is to give a higher priority to, say, the logic one input over the logic zero input. So, when asserting both inputs the logic one will win. However, reset should always override any circuit state or condition, this allows the circuit to to return to a know state when reset is asserted.
Reply With Quote
  #4  
Old 11-03-2009, 09:20 PM
hobbyist hobbyist is offline
Senior Member
 
Join Date: Aug 2008
Posts: 716
Blog Entries: 21
Default

Your way would work, if that's the kind of output your looking for,
but if your looking for a output that will cancell, there are several ways to approach this, for instance, you can use a "exclusive OR" gate function,
where one input goes through to the output, but if more than one input comes in then there is no output, each input cancells eachother out,
and with that you can send this multiple input into a "AND" gate function, to provide an "ERROR" signal, of some sort.
Reply With Quote
  #5  
Old 11-04-2009, 09:44 AM
Blackrobe Blackrobe is offline
New Member
 
Join Date: Oct 2009
Posts: 6
Default

Quote:
Originally Posted by MaxSmoke View Post
Another approach is to give a higher priority to, say, the logic one input over the logic zero input. So, when asserting both inputs the logic one will win. However, reset should always override any circuit state or condition, this allows the circuit to to return to a know state when reset is asserted.
I guess this is the right approach i have to consider...probably its a matter of preference (which input should be considered first) so I guess I'm just gonna go with what you advised...reset has highest preference then the one button and then the zero button. But in what way should I implement this function, I was thinking of some series of gates that works as such:

- If Reset = 1 and One = 1 and Zero = 1, disable One button and Zero button then execute Reset.
- If Reset = 1 and One = 1 and Zero = 0, disable One button then execute the Reset.
- If Reset = 1 and One = 0 and Zero = 1, disable Zero button then execute the Reset.
- If Reset = 0 and One = 1 and Zero = 1, disable Zero button then execute the One button.


Quote:
Many variables come into play. If your circuit is properly designed, only the first button press will be recognized. Trivial in software, cumbersome in logic.

That said, what device/s are your buttons attached to?
I'm actually using a left-shifting register since another part of my homework is to be able to shift each input to the left after entering a new input which goes to the rightmost position and so on.

Also I'm trying to build storage for each digit or input entered and then shift it to the left when needed. So I was wondering what kind of storage component is the best for this case? D-Flip Flop or just a simple Latch?

Thanks again for your help.
Reply With Quote
Reply   Post New Thread

Tags
, ,


Related Site Pages
Section Title
Video Lecture JK Flip-Flop - Digital
Worksheet Counters
Worksheet Flip-flop circuits
Worksheet Latch circuits
Worksheet CMOS logic gates
Video Lecture Representative System (Part 3) - Executing a Program - Microprocessors
Video Lecture Counters - Digital
Video Lecture Sequential Logic - Digital
Textbook Finite State Machines : Sequential Circuits Counters
Textbook The J-K flip-flop : Multivibrators


Similar Threads
Thread Thread Starter Forum Replies Last Post
Decade counter/555 for use as a push button ignition switch MATTY B The Projects Forum 33 03-22-2010 08:53 AM
Time scaling and Time shifting in a signal Panterulez Math 4 01-11-2010 04:57 AM
simple time delay switch- 555 or simple rc network with transistor devalvyas General Electronics Chat 16 06-24-2009 02:39 PM
intergrator waveform measurements and symmetry relicmarks General Electronics Chat 10 04-19-2008 10:45 PM
Button pressed LED indicator jgershonw1 The Projects Forum 1 02-01-2008 02:53 AM

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:43 AM.


User-posted content, unless source quoted, is licensed under a Creative Commons Public Domain License.
Powered by vBulletin
Copyright ©2000 - 2014, vBulletin Solutions, Inc.