in the last two videos we use these
triple five timers to build an a stable
circuit with the pulsing output and a
monostable circuit that's normally off
but when we push the button it turns on
and it's D balanced so that you know we
get a single clean output when we push
the button so this we can use for our
clock and then we can also use for a
manual pulse now what we need to do is
figure out a way to switch between the
two and so you might think well we
should use a switch and I've got a
pretty good switch here this is a little
push button switch and it's either out
or in and it's got these three leads and
so there's a center there's a center
common pin and then it's connected to
either this pin or this pin depending on
whether it's in or out and there's
there's two so that's double throw it's
called and then it's double pull as well
there's sort of two sets that are
independent letters connect to the same
button it's a double pole double throw
and it's a fairly common type of switch
this is another switch here that's the
same thing and you've got the the two
sets of three connections there of
course this doesn't plug into my
breadboard and annoyingly neither does
this this is actually just a little bit
to this pin spacing a little bit too
close together to fit into the
breadboard and so what I've done is gone
ahead and soldered these little header
pins to the switch and so that fits in
very nicely into into the breadboard and
so one thing we could do is we could
just connect the output of you know this
here that's not the output let's connect
the output of that to one side of the
switch and we can connect the output of
our manual trigger over here to the
other side of the switch and then you
know we could look at the middle of the
switch connect that to you know an LED
and then of course our current limiting
resistor here and we see that it's
pulsing and then we could flip the
switch here and now it's connected to
our manual clock pulse and we can flip
it back and it's connected to the
no sort of automatic clock pulse there
so this is great we could we could use
this this will work one problem with it
is you know again we have the switch in
here that's not be bounced and so we
could have some situation where you know
maybe we have a really slow clock pulse
and we're going step by step by step and
we want to we're watching our computer
execute maybe we're troubleshooting some
problem and we're watching it go step by
step and then we see we see the problem
that we're trying to catch develop and
we push the button to try to get it back
into manual clock pulse to stop the
computer and so we can figure out what's
going on well if when we push that we
have that D balancing problem and we we
get a couple extra clock pulses in there
when we were going so slow to catch that
one point that we're trying to they were
trying to catch that could be really
frustrating so we really should find a
way to D bounce this switch and you
could build exactly this circuit and
that would work fine I'm going to show
you a different way to use the triple
five just just for fun just to see yet
another use for the triple five and so
for this next circuit what we're going
to do is we're basically going to take
advantage of the fact that the triple
five timer has an SR latch built into it
and we're really only going to use the
SR latch we're just going to kind of try
to ignore the rest of this stuff as much
as we can and what we're going to do is
we're going to you know basically hook
this switch up to you know imagine we
could somehow get rid of all this stuff
and just hook the switch up to the S and
they are so in ones in one state it's
it's setting and in the other state it's
resetting and then we have our output
the SR latch will actually act as a D
bouncer and one of the reasons it will
do that is kind of a property of the
switches which is if we look at the
switch if I just hook up a couple LEDs
so we can kind of examine what the how
the switch normally works what you'll
see is that you know it switches between
the two states when we push the switch
which is which is what you'd expect but
if we push it very gently you see it
actually that you can kind of get it in
between and it turns off and that's
actually a pretty useful property so
it's called break
or make and you can buy switches that
are make before break if that's what you
want but I think most switches are
typically break before make and so what
that means is that you know it can be
you know if we're if this is say our
reset or our set a condition let's say
we're putting a set into this SR lie to
forget the fact that it's part of a five
oh five just just imagine we're looking
at an SR latch if we're setting it and
then we start to push this switch as we
let go or as we let go as we as we push
the switch gently we're kind of in this
middle region our latch is still going
to be set right and then as we continue
to push the switch down we get into the
reset then that reset comes on well if
there's any bouncing in the switch it
doesn't matter because as soon as that
first reset happens the latch is reset
and and our output is going to be off
and then the same thing as we push this
and then as we gently let go the reset
goes off we're still reset right because
we haven't said it yet and then even if
there's some bouncing as we go into the
set state it doesn't matter because as
soon as it's first sees that set state
boom the output comes on so we can use
an SR latch as a D bouncer with a switch
like this so the question is if we're
using a 5 5 10 well we could use a just
an SR latch on its own which we know
I've got a video that shows how to build
one but you know we can we can use the 5
5 5 timer we can use its SR latch by
essentially using the trigger right so
remember we've got 5 volts up here right
and then we've got this voltage divider
network so this gives us 3 point 3 3
volts here and 1.6667 volts here and
then of course 0 volts down here and so
if this trigger goes below 1 point 6
volts then that sets the latch and then
if the threshold goes above 3.3 volts
that resets it but we're actually going
to ignore the threshold we're going to
we're going to just tie this to ground
and so this will never this will never
do anything instead we're going to use
pin 4 which we haven't used yet on the
triple 5 and that's this reset pin and
it it's not wired exactly like this in
here but you can kind of
imagine it but this this just gives you
kind of a shortcut to the reset and so
if we pull pin for low because it's
inverted that resets it and if we pull
the trigger low below 1 point 6 volts
that will turn this comparator on and
send it until that gives us a way to
kind of get into this this SR latch and
so what we can do is we can hook our
switch up sort of draw the switch down
here and so we can hook our switch to
ground the middle connection of our
switch to ground and we hook one side up
over to our reset and hope the other
side over to our trigger and then if we
flip our switch over to this side
that'll ground the trigger which takes
this now below one point 6 volts we
should probably have a little pull-up
resistor here of some sort maybe a 1k
resistor we'll do so that normally you
know this is going to be 5 volts so
it'll be well above our one point 6
volts and so this will be off and so we
won't be setting it but then when we
flip our switch here and this goes to
ground that will pull this down to 0
volts and 0 volts of course is below 1
point 6 volts and so that will sit the
the flip-flop and the output will turn
on and then when we flip our switch over
to the other side you know we do that
break before make which you know this
this diagram actually shows pretty well
when we break and no big deal we're not
setting it anymore but it's a latch so
the output stays set but then when we
first make contact over here even if it
bounces doesn't matter the first time we
make contact over here we reset the
latch and then the output turns off and
so we have this nice debouncing that we
can use so let's so let's hook that up
ok here it is so we got our switch here
and the center pin is connected to
ground which which is what we wanted
here and the other two pins one is
connected over here you can see two pin
two and the other one is connected to
pin 4 and so just like we've got here so
one is connected over here to pin -
that's our trigger and the other one is
connected over here to pin 4 and on both
of those I have pull-up resistors so you
can see on pin 2 and pin 4
I've got a resistor going to five volt
and draw that over here but you know we
want to make sure that these are
normally getting 5 volts unless our
switches set pin three of course is our
output so I just have that going to this
LED for now with a current limiting you
know 220 ohm resistor over there and
then you know pin six is our threshold
so we have that just at ground so this
comparator is never going to be is never
going to be on so we don't have this
resetting this way the only way we're
resetting the only way we're resetting
the the latches through our through our
reset pin so threshold is is to ground
and then pin seven is our discharge pin
no need to connect that we're not
discharging anything there's no
capacitor in here we're just so we just
leave that disconnected and then pin
five as usual we have our low point zero
one micro farad capacitor in there for
you know for noise as recommended so now
what we've got is you push the button a
light comes on push the button again
light turns off so not very exciting but
it is fully dee bounced and we're using
the SR latch part of the five five five
timer and so with that we've actually
got the sort of three different modes
that you can use the triple five time
ring we've got the a stable mode where
it's not stable in either state we've
got the mono stable mode where it's got
one stable state which is off and then
when we push this it goes to its other
state but then reverts back to the the
state that it's stable in and then this
is the by stable mode where it has two
stable States and so it's either in this
state or that state and so now all we
need is a bit of logic to combine all
three of these into our final clock
output and we'll do that in the next
video