Placeholder Image

字幕表 動画を再生する

  • In a previous video, we looked at the J K flip flop and saw how it works similarly to the S R flip flop.

  • Except that it has this feedback so that if both inputs are one than on the rising cluck, the output toggles rather than going into a sort of undefined state.

  • This video, I want Thio actually build this and take a look at how this works in practice.

  • So here I've built Jake a flip flop following this circuit diagram here on, I want to kind of walk through a couple things.

  • One thing I noticed that when I was building it was I in diagram here.

  • I got a couple things.

  • I got one thing wrong, which is that this is actually the K input.

  • And this is the J input because J corresponds to setting.

  • So when this goes hi, we want to see the Q output go high.

  • And then when this input goes high than the queue up which you go low, So okay, reset.

  • So I just had that labeled wrong, but otherwise everything is is fine.

  • So what hadn't built this?

  • And I'm using the 74 l s zero to for the nor gates.

  • So on the topside of the chip, I'm using the two nor gates there.

  • And then this chip over here is the 74 l s 11 which is Ah, Triple three Input and gates.

  • So I'm using these two and gates that have three inputs each in this for these and gates here.

  • They hook up power here.

  • It should go in tow, some state or other.

  • So it looks like this is the cue output.

  • That's just on, uh and then I can also connect my clock over here, and I've got o'clock circuit over here.

  • And, uh, basically what's going on here is that these two switches are tied to ground through these pull down resistors, and then when you push the button, it goes high.

  • So both of these are connected via these green wires to the two and gates.

  • So there's air, the K and the J imports.

  • Also going into the and gates is our clock.

  • And so the clock comes in here and it's going through this R C circuit.

  • So there's a capacitor here which is a 0.1 micro fared capacitor, and then a resistor here, which is, Ah, 1000 ohm resistor.

  • And then the output of that goes into these two white wires which go into another input on both of those and gates.

  • And then the outputs of those and gates are these blue wires.

  • They go to two of the inputs on two of the nor gates over here.

  • The other inputs of those nor gates come from the outputs.

  • And so that's where these two yellow wires here on dhe, then also the outputs of these go back around the end gates, which were these yellow wires that go back over here to the end gates on, then also the outputs of these nor Gates Go to these two ladies.

  • This is our cue, and this is our cue compliment.

  • So if we push the K input, if we send that high than that should reset the latch and Q should go off, and indeed it does.

  • And if we push the J that should set it in.

  • Q should go on, and indeed it does.

  • And you see it goes on with with the clock.

  • So it's not immediate when I push the button that it happens on the next clock signal because this is gated on this clock rising edge.

  • So now, because this is a J K flip flop.

  • If we, uh, put both inputs J NK high, we should see this toggle, and it's not ta going.

  • Um, but sometimes it does.

  • And if I hold it just the right angle or poke at it, not there.

  • Toggled.

  • Now it's occasionally toggle ing.

  • Make sure I'm pushing both of these buttons.

  • Yes, sometimes it toggles up there toggled a couple times.

  • What I'm finding is that the circuit is is pretty inconsistent.

  • So I'm gonna do is, rather than trying to push those buttons if I put a little jumper in here across that button and then another jumper here across this button, that's the same as, you know, in putting a one for both J NK.

  • So this should be toggle ing right now.

  • Each time the clock rising edge goes and you see now it's sometimes struggling.

  • Now it's tackling again.

  • Now it's actually working pretty well, but it's definitely very inconsistent.

  • Uh, and it turns out there's a good reason why it's behaving in consistently.

  • They just stopped then.

  • Now it's started again.

  • Um, there's a very good reason that it's behaving in consistently and in order to understand what's going on here.

  • Really, the only way to really see what's happening is to use in a cell a scope to take a look at the signals in here.

  • Start by just looking at the clock input.

  • Just so we have a reference of what that looks like.

  • And so here it is.

  • This is our clock.

  • You can see it's going on and off and it looks like it's about twice per second.

  • Uh, each of these divisions here is 100 milliseconds.

  • So over 10 divisions, it's pulsing twice, so twice per second.

  • And the next thing I want to look at is the output, because this is what we want to see.

  • Uh, toggle ing with each clock pulse, you can see our clock is pulsing here again.

  • It, you know, twice per second to each of these pulses we would expect to see we would expect to see our output toggle ing, and right now it's not toggle ing, although, yeah, if I kind of hold my hand the right place, I don't know.

  • It's kind of kind of flaky, but sometimes it toggles.

  • So I'm gonna look at the output here and see what that looks like.

  • And here's our output and it looks like it is actually doing something.

  • No.

  • And there you can see it, actually, toggled announce high.

  • Okay, so it is.

  • It's kind of inconsistent and their toggled again.

  • And so when it is, toggle ing is toggle ing at the's clock rising edges, which is what we want.

  • But where it gets interesting is if we zoom in other wife, Visa, man, and look at that rising edge of the clock.

  • You see, there is something going on here, and if we zoom in even more, what you see is pretty interesting, which is when that clock goes high.

  • The output does in fact, toggle, but it toggles back and forth a bunch of times before then settling somewhere.

  • And that's actually why this is behaving so inconsistently is because it is toggling, which is what we want right when that clock is high.

  • But it's toggling again shortly thereafter.

  • And if we look at this, you can see the period.

  • Here's 80 about 84 82 nanoseconds.

  • So every 82 nanoseconds here.

  • This is Todd going on and off.

  • That actually makes some sense if you look back at the circuit diagram here, because what's happening is this.

  • Pulses is coming in and the output is toggle ing.

  • But as soon as it toggles, that feedback goes back around to the input and it toggles again, you know, because this this clock Paul's even though we're trying to look at the leading edge of the clock if this pulse.

  • So the clock, of course, is you know this is on for 250 milliseconds is on for quite some time, but this pulse should be.

  • Just be looking at just that very first instant when it turns on.

  • But if his pulse is too wide then and the output switches before this pulse goes back to zero, then it will switch again.

  • It'll switch again.

  • It'll switch again, and this is a phenomenon called racing.

  • And that's exactly what's happening.

  • Here is when this pulse goes high.

  • It's switching on, but then it's immediately switching off and on and off and on.

  • And if I get this, where is toddling?

  • You see, sometimes it does toggle, but it's totally luck of the draw because it switches on and off and on and often on and off, and then eventually gets to hear, and it settles into whichever state it happens to be in.

  • And so sometimes we get kind of lucky sometimes Onda toggles, but not always.

  • And the reason for that is this R C circuit and mentioned before that the capacity I'm using as a 0.1 micro fared capacitor, and the resistor is a 1000 ohm resistor.

  • And so if you multiply those together, you get the time constant of this R C circuit, which is effectively gives you some indication of the width of this pulse.

  • And in this case, uh, this time constant is gonna be I think it's 100 microsecond, but we can actually measure it.

  • So let me look at the at the clock or the pulse input here for the circuit and put that here on channel two.

  • And here you see that pulse and sell freeze him out.

  • It looks great, right?

  • The Yeah, this is This is kind of what we're looking for, right?

  • When the clock goes high, this pulse just quickly pulses the problem is that that pulse is not is not quick enough.

  • And so you can see here at one microsecond.

  • So one microsecond, uh, pulse.

  • And for that one microsecond, we get this on and off and on and off.

  • And then finally, that gets back down to this area here where it's considered a zero on and then it finally settles down.

  • So what can we do about this?

  • Was a couple of things we can do.

  • One is we can try to make this pulse shorter.

  • Um, so right now, this is one microsecond.

  • You know, we saw that if we zoom in here measuring the period here of this on and off its 80 nana seconds, you know, we could try to get this pulse down.

  • So if we you get 200 Nana seconds pretty easily if we go from ah, 1000 home resisted a 100 ohm resistor.

  • It's only try to swap that out.

  • This is the resistor here and put the 100 homers history in.

  • And so here.

  • You see?

  • Okay, we have a much smaller pulse, but it's still not quite working.

  • Um, and you know, we're frankly getting into the limits of what we can do on a bread board.

  • You know, these, uh, this kind of high speed, you know, tens of Anna seconds type type of stuff.

  • You know, these bread boards really, really aren't made for that because, you know, within this this bread board, you have all sorts of stray capacitance is and and induct ins's and all sorts of stuff.

  • And that's why you know, just me kind of waving my hands over it where it was changing the behavior of it.

  • Just now, you see, it went low.

  • Yes, that now looks like it's going high, then low and staying low.

  • But I bet if I stick my hand in just the right place, I could maybe get this to toggle.

  • Yeah, and I'm not changing any.

  • I'm just kind of moving my hand around.

  • And it's just because my hand is changing the capacitance because I'm grounded.

  • And, uh, yeah, you could see there.

  • It's, uh now it's tackling, but but now it stopped ogling.

  • So really, we're getting into.

  • And you could even see you know, this this rising edge of our clock is not, you know, on this time scale It's not a real sharp, rising edge.

  • And again, that's just because, you know the bread board.

  • There's limits to what we can D'oh!

  • This pulse.

  • We're not detecting a nice clean.

  • We're not generating a nice clean pulse like we were when we had the larger resister in there.

  • And again, it all comes down to, you know, we're really pushing the limits of what we could do on a bread board.

  • You know, in general, this this particular way of detecting the rising edge by using an RC circuit like this is his pretty fraught in in Jake, a flip flop like this because of this race in condition you have this.

  • You have this racing where You know, if if this if it's pulses and narrow enough, um and it's, you know, it needs to be, you know, just a few nanoseconds.

  • Really?

  • Uh, then the output is gonna feed back in and toggle more than once per rising edge of the clock.

  • So what can we do about this?

  • Well, in the next video, I'll show you Ah, much better way to build a Jake.

  • A flip flop that doesn't have this racing problem at all.

  • And that's something called the master slave Jake.

  • A flip flop.

  • It's much more robust, and we shouldn't have any problems getting it working on a bread board.

In a previous video, we looked at the J K flip flop and saw how it works similarly to the S R flip flop.

字幕と単語

ワンタップで英和辞典検索 単語をクリックすると、意味が表示されます

B1 中級

JKフリップフロップレーシング (JK flip-flop racing)

  • 2 0
    林宜悉 に公開 2021 年 01 月 14 日
動画の中の単語