ok, some more info is needed his.
If i read you correctly. I think what you need is a
is a data flip flop.
Look about half way down on this page and read alittle about
them.
http://www.cc.gatech.edu/classes/AY2005/cs2200_summer/tutorial/sectio...
Basically, you have a Data input, this would be for example your switch 2
input.
then you have a C (clock) input, this would be from your switch 1..
depending on the type of D-FF you want to use.
for example, the C input (clock) goes from low to high using your
switch 1, it will take what ever state the D (input) is in and place
that to the Q output and thus hold that state until the next time the
C input gets a low to high transition input, which will repeat the
process over again.
the Q output can be used to light up an LED if you wish.
now when i said there are different kinds of data flip-flops? i meant
there are different types of triggering styles
for example.
the one i just used would be a Positive edge which means that it takes
the D input status and transfers it to Q when the C (Clock) goes high.
so that means while the C is being held to low (common), the Q output
holds the current value that was there before.
Now, if you used a negative edge type, it will capture the state at D
and transfer that to Q when C goes low (ground).
both edge types ignore changes taking place at D while
the C input is being held at the trigger level.
this means, it will only capture what D is at the time of transition
of the CLOCK level change per type that your using.
Now, you have level type D-FF's, and they have high capture
logic for the CLock, and what this means is, while the Clock is in
the high state, Q will reflect all activity of changes from D until C
goes back to the low state at which point Q holds the last state of D..
I hope you understood that and i didn't get anything twisted here.
I noticed that the sight i gave you has their description of the level
type miss leading. I double checked some doc's i have here to make sure,
they state that Q holds the last value until C goes low, that wouldn't
really make sense because why would you need a Negative edge FF ?, so
the statement there is a little incorrect, D will show at Q it's value
while C is high, and when C goes low, Q will hold the value at
transition time.
Basically, if your attempting to create some synchronizing circuit
where you need an output to appear when switch 1 is on and switch
2 is on to show that you have sync, this would be the way to do it.
because the next time
also remember that you will need a deboucer on the Clock input
because if you have a poor connection there, it will trip that input
multiple times.
if you plan on using a contact switch, i would suggest using a small
capacitor on the input to common. something like a 0.01 uf..
Also, if you require a minimum time for Switch one to hold it's
state? you can adjust the cap size on the clock input.
just remember to select the type of flip flop you need and to drive
an LED, use a TTL type.
the 74xx series is good for that. other wise you will need driver
transistor.
Like many other Flip Flops, many have Set and Resets..
all this means is, you can force the Q output to what you want at start
up if you wish..
A positive Edge D-FFhttp://focus.ti.com/lit/ds/symlink/sn7474.pdf
One with 8 D-FF's with common Clock for all.
http://ee.usc.edu/library/ee459/datasheets/DM74LS273.pdf
A list of Quads etc..
http://www.ortodoxism.ro/datasheets2/1/03ldaq2whf1qu7dlj4g216t704py.pdf
they come in different varieties, just remember the 74xx, 74xxx series
are TTL which can handle the current of the LED and is 5 volt logic etc..
other types are static sensitive.
the 74HCxxx series allow for a wider range of supply voltages.
--
"I'm never wrong, once i thought i was, but was mistaken"
Real Programmers Do things like this.
http://webpages.charter.net/jamie_5- Hide quoted text -
- Show quoted text -