Placeholder Image

字幕列表 影片播放

  • So in the last video, we used a 555 timer here to build this little clock circuit.

  • So we have our pulsing clock output on pin three of the triple five timer, and we can control the speed using this potentially ometer.

  • So that's great.

  • But there might be times when we wantto manually control the clock.

  • We wanna be ableto is push a button.

  • And each time we want the clock to advance one.

  • Why are we want their computer to advance one clock tick?

  • And so you might think, Well, that's pretty easy.

  • We just hook a button up, And so we have.

  • You know, this output here of the button is is pulled to ground through this resistor normally, but then when we push the button, it connects it to R R.

  • Five volt supply here.

  • And so I push the button to comes on, and so we can manually pulse the clock like that.

  • He might think what?

  • That works pretty pretty well, and that's almost true.

  • It, in fact, you might be able to use this, and you might be fine with it, depending on the button that you have.

  • Uh, what happens is inside that button when you push it there, two metal contacts that come together to close the circuit.

  • And sometimes what will happen when you push the button is those contacts will bounce on.

  • So it'll it'll close and then bounce and then close again there.

  • Maybe it'll bounce a couple times.

  • And so what happens is when you push that button, you actually get a couple quick pulses.

  • And if that's hooked up to, you know, the clock of our computer and we push that button, we could actually trigger a couple of pulses when we only meant to trigger one.

  • And that could be really frustrating.

  • If you've got you know, some issue that you're trying to debug in the computer and you've spent a couple of minutes getting it all set up just perfectly, and you're you're right at that point where the next clock pulse is where you're gonna figure out what's wrong with it, and you push this button to get a clock pulse and you get three clock pulses and it goes right past the problem.

  • You're trying to find that I could be really frustrating.

  • So what we want to do is want to figure out a way to get rid of that.

  • The air, you know, avoid that bouncing.

  • And, uh, you guessed it.

  • We can do that with our friend, the Triple Five timer.

  • But first I hooked up the oscilloscope just to take a look at the switch here.

  • And so when we pushed the switch, you can see this is what we'd expect, right?

  • It transitions from off to on.

  • But if we try this a few times, we might see some different stuff.

  • Oh, there's something.

  • Yeah, look at that.

  • So that that definitely bounced right there, eh?

  • So that's that's not good.

  • You don't You don't want that, because that would, you know, that would look like 123 potentially clock pulses when you've only push the button once.

  • So you definitely want to get rid of that into this.

  • Now is a triple five circuit that is gonna help us with this, uh, with the switch bouncing problem and so well, before we get into it.

  • Let's just try it out.

  • Was pushed the button and see what happens.

  • Push the button.

  • The light comes on.

  • And then a while later, the light turns off, Um, and importantly, what happens if we push the button multiple times from the light?

  • Only comes on once and that's what we want and this is called a D bouncing circuit.

  • And there's, you know, there's a lot of other ways to build de pouncing circuits.

  • But, uh, you know, I'm using the Triple five time or just because I think it's a fun chip to play with, and so the time you're here that's controlling how long this stays on when you push the button is controlled by the resistor and capacitor over here.

  • And so, you know, you remember before we had to resistors in a capacitor that were controlling the pulsing.

  • Here we just have one resister in a capacitor, and we'll go into more about how it works.

  • But basically the time that the led stays on is just you pretty much multiply the value of the resistor.

  • Times value the capacitor.

  • So this is, ah, one Megan resistor.

  • And this is ah is a two micro fared capacitor.

  • It says one m f d on it.

  • But, uh, apparently, these air to Micro Fareed's, uh, but anyway, the nice thing about about this is one mega own is Ah, 10 to the sixth and Micro Fareed's are 10 to the minus six.

  • So the math works out really easily here so that a two micro fared capacitor.

  • When you multiply together, you just get to S O.

  • That gives us a two second delay.

  • And sure enough, we push the button in the led stays on for two seconds, which I guess is further confirmation that this one m f d capacitor, is really to my Crawford's anyway.

  • S o.

  • You know, two seconds is kind of long for what we want.

  • So what we could do is we could put in a 20.1 micro fared capacitor instead of this to my prepared capacitor.

  • And if we stick that 0.1 micro fared Pastor in there, that's going to give us 0.1 seconds because we're multiplying by this one.

  • Megan Resistor.

  • So now it stays on for 10.1 seconds.

  • How quickly I push.

  • It's kind of hard to tell, but that's what we want when we want it toe pretty much follow what we're doing when we push the button.

  • But we critically are getting rid of those balances and so as long as that any balances that happened within the 1st 100 milliseconds or 1000.1 seconds we've gotten rid of and that's what we want.

  • It's understand how this works.

  • Let's look again at our circuit diagram and I've got the triple five time Are here the guts of it exposed here.

  • But the green bits out here are our circuit.

  • Of course, we haven't led hooked here.

  • The opportunity didn't draw.

  • But, um and of course, we're just looking at this.

  • This lower half here is you know, this is what we built in the last video.

  • And so we've got our resistor here, which is our 11 mega home resistor.

  • Then we have our capacitor, which is Ah, 0.1 micro fared capacitor And then, you know, over here I've got the button hooked up.

  • And if you look at how this is hooked up, the button is connected between ground and pin, too.

  • And then it's also from pin too.

  • You can see we've got a one k pull up resistor.

  • Basically what that does is it insures that pin too is normally connected to five volts.

  • But then when we push the button.

  • It connects it to ground and then pin to goes to zero votes.

  • So just like before, we've got this voltage divider network going on inside the Triple five timer.

  • And so we're We've got five volts up here, and then we've got 3.3 volts here at this first point.

  • And then we've got 1.667 volts here at the second point.

  • Then, of course, ground is zero volts, and that's just a voltage divider.

  • Resistor, Voltage divider.

  • We've got 1/3 of our voltage, 2/3 of our voltage, and then appears our full voltage.

  • It's so we can see right now, you know, our output is off.

  • You know, the led is off.

  • So if our output is off, then you know, that must mean you know that the Q output of this s our latches off into the inverted que output must be on.

  • And so that's on.

  • Then that's gonna be, you know, putting current into the base of this transistor.

  • And so this transistor will switch on and will be discharging.

  • There will be, you know, we'll be pulling current through this transistor.

  • And so you know, in this in this state right now.

  • Current is flowing from our voltage source through the transistor to ground on.

  • If this capacitor had any charge on it, that would also be, you know, discharging to ground.

  • And so this capacitor doesn't have any charge on it.

  • And so our threshold is it zero?

  • And of course, zero is not above, uh, 3.3.

  • And so this is gonna be off.

  • And then this down here is five volts, right?

  • So, you know, trigger Pin two is five volts and five volts is not not below 1.6 votes.

  • This is also off.

  • So both of our s and R R inputs into RSR latch are off right now.

  • And so somehow this latch has just latched into the state where it's off.

  • But what happens when we push the button?

  • We push the button, we now pull this trigger low.

  • We pulled us to zero volts, and so zero volts is is definitely below 1.6 volts.

  • And so this comparator here turns on and that triggers the set, uh, of rs are latch.

  • And so that turns the output on and so sure enough, you know, we push the button.

  • The output comes on, so no surprise there.

  • But the other thing that happens is when that output comes on, uh, this turns off and so we're no longer, you know, pulling current through this transistor here, and we're no longer discharging this capacitor.

  • So instead, we're charging the capacitor and we're charging the capacitor through this resistor, And so this capacity is gonna charge.

  • It's going to start to charge, and eventually, you know, it's gonna get above 3.3 volts.

  • And so when the capacitor charges to above 3.3 volts now, the reset is going to be triggered.

  • This this Comparator is gonna turn on, it's gonna trigger the reset, and that's gonna turn off our output, and it's gonna turn on our inverted output here or in inverse Q.

  • And that's gonna push us back into this state where we're now discharging capacitor.

  • And and now there's no there's no resistor between this capacity.

  • Remember the circuit before we had another resisting here?

  • There's no resistor here, so this capacity is gonna just charged, you know, immediately.

  • And so it's just gonna, you know, drop right back down to zero volts um, which, of course, is going to immediately turn off this, uh, this comparator, right, Because zero volts is is certainly not going to be above 3.3.

  • And so this Comparator is gonna turn off and we're not gonna be triggering this reset anymore.

  • But if we're not pushing the button, you know, we're not triggering our set anymore either.

  • Instead of the latch is it's going to stay in its last state and our power output will be off, you know?

  • So if we're looking at what are what are output did as soon as we you know, as soon as we as we hit this trigger, our output comes on right, because we set the latch and then it stays on while the capacitor charges up.

  • But then once the capacitor gets to the 3.3 volts boom, our output goes off and it just stays off, man, it stays off until we Until we hit that trigger again, we until we push the button again.

  • And so you might hear this.

  • Referred to is a mano stable mode of the triple five timer because he's called mono stable because there's one state where it's stable.

  • And then if you push this button, it goes into this other state where it's not stable, where it's gonna you know, eventually this capacity charge and then it'll drop out of that state.

  • Where is the you know what we did in the last video with this?

  • This is called a stable multi vibrator, a stable mode for the Triple five because it doesn't have a stable state.

  • It's, you know, constantly altering between two states on and off.

  • He might hear those terms mano stable and a stable.

  • So take a look at that in action.

  • I've hooked it up to the scope here, and I've also gone ahead and put the two micro fared capacitor in there again.

  • Just so we get that nice slow to second pulse there.

  • So if we fire up the telescope here, push the button, you can see the output goes immediately higher than you can watch the capacity or charge and then boom as soon as it hits that 3.3 volts.

  • So let's see.

  • 123.3.

  • Yeah, 3.3 volts capacitor gets there and boom it just that discharge pin flips and the capacity just instantly discharges.

  • And of course, our output turns off then and so you can see any bouncing that the switch is doing in here.

  • Doesn't matter.

  • Outputs already high.

  • We've got that latch that's that that's latched it high.

  • And then, you know, as long in this capacity will just charge away and then boom turns off.

  • So I've got that 0.1 micro fair to pass her back in there with our one meg resistor.

  • I think that's what I'm gonna go with.

  • And, uh, you know, just like before we've got that control voltage pin, which is up in five here that we're not using.

  • And that's just kind of tied into here and again.

  • The data she recommends putting a point point 01 micro fared capacitor between that and ground.

  • So go ahead and had that in there.

  • And it's just for that noise reduction that we you saw in the last video.

  • So good practice put it there, and then the other good practices pin four.

  • Also not using that, that's a reset pin that kind of ties right into the reset of the S R.

  • Latch just inverted, reset so normally should be at five volts and then bring it to zero volts.

  • Forces this to reset regardless of what's going on over here.

  • Kind of override things.

  • So we'll tie that thio five volts there.

  • Just tow, prevent that from accidentally tripping or anything like that.

  • And I think that'll that'll do it.

  • So now we've got are our timer here.

  • So we've got that and we can adjust the speed.

  • So we saw that in the last video and go really fast, really slow.

  • And if we don't want to use that, we've got a manual clock pulse here.

  • Now we just need to come up with some way to switch between the two of those, and we'll look at that in the next video.

So in the last video, we used a 555 timer here to build this little clock circuit.

字幕與單字

單字即點即查 點擊單字可以查詢單字解釋

B1 中級

單穩態555定時器 - 8位計算機時鐘 - 第二部分 (Monostable 555 timer - 8-bit computer clock - part 2)

  • 6 0
    林宜悉 發佈於 2021 年 01 月 14 日
影片單字