 Because when I'm making my risk five processor that has 32 registers and they're all gonna be lined up on a bus Well, it's gonna be probably something like this long But the point is that at least now I know how to properly terminate that bus He did not know how to properly terminate that bus It's chiptips, chiptips, I have no music and I can't sing Let's review what we know so far. So we have a transmission line. This is a printed circuit board We know that the characteristic impedance is something like 100 ohms so we have a driver on one end and we have a 100 ohm source termination and Then we've got our 100 ohm Characteristic impedance transmission line and on the other end is basically an open circuit And we know that this nicely terminates the signal So we get a nice clean signal it bounces off the end of the transmission line It comes back and it gets absorbed done Now the thing is that I want to use this in a bus So we have a long bus with lots of tracks going all the way across and we have cards That sit on the bus Some of the cards are at the end some of the cards are in the middle and some of the cards are somewhere in between so If this is the driver for one of the cards Then this is not an accurate portrayal of what's going on on the bus with the exception for the cards on the very end so first of all, let's suppose that we had another driver that does exactly the same thing and It's also terminated it feeds another transmission line it's also 100 ohms and They're both doing exactly the same thing they there are both source terminated with 100 ohms So basically I'm taking one of these and I'm taking you know like another one of these and I'm putting them together So the driver is basically sitting right in the middle of the bus and the ends are open circuit Well, if these drivers are doing exactly the same thing and these transmission lines are doing exactly the same thing Then at any time the voltage at this point is identical to the voltage at this point and if we have two nodes with Identical voltages you can simply connect them because well there would be no current flowing because there's no voltage difference and Since this is basically doing exactly the same thing. We can also coalesce those drivers and so these two nodes are connected and Finally because we've got these two resistors now in parallel. We can simply Make this as the equivalent resistor and There is the equivalent driver. So this is the driver sitting in the middle of the bus this is our source termination and basically we have one side of the bus going off in that direction and The other side of the bus going off in the other direction So we can see that to terminate Card on the end of the bus properly. We would need 100 ohm source termination But to terminate a driver of that sitting smack in the middle of the bus We would need a 50 ohm source termination resistor not a hundred ohms So then the question is well, what happens if we have a driver somewhere in between? So if this is our bus and we know that at the ends we have to use a hundred ohms and In the middle we know that we have to use 50 ohms Then as we vary the position smoothly Between the midpoint and the end point that resistance also has to change smoothly From 50 ohms to a hundred ohms now We don't exactly know how that Resistance is going to change does it go smoothly and monotonically from 50 to a hundred Does it go up and then down does it go down and then up? We don't know and that's why I Have another test board So with this test board I have this chip. It's physically in the middle of this board. However, I have 60 centimeters equivalent over here because of these Zigzaggy traces and I have 90 centimeters over here. So basically this is not sitting in the middle It's sitting closer basically to this end. So let's see what happens when I use just the plain old 100 ohm resistor Okay, so the setup is the same as before I have a buffer over here and I have my square wave generator feeding the input to this buffer and the output of the Buffer goes to a 100 ohm source termination resistor and we've got 60 centimeters on one side and 90 centimeters on another side so First what I'm going to do is I'm going to take a look at what's going on on the 60 centimeter side Okay, so here's what's happening on the 60 centimeter side. So remember that At the time that we detect the wave form the wave form has already hit the end so if I pull up my cursors and Move one of them to Approximately where the wave form starts and we can see that we hit the end up here Go away go away so we hit the end over here, you know, let me get a pointer and Immediately the waveform rises up to it looks like around two volts and then it sort of Slowly goes up it goes down a little bit and then it goes back up to well looks like about 3.3 volts it, you know jiggles around a little bit, but in any case if we take a look at maybe I don't know when that voltage starts to dip maybe We get a difference of 7.6 nanoseconds now we've already determined that The wave on this printed circuit board goes something like 18 centimeters per nanosecond It's a little faster than half light speed. So if we see how long 18 centimeters is over 7.6 nanoseconds that's 136 Well, let's call it 140 or so centimeters. So clearly Something happens a hundred and forty seven a hundred and forty centimeters later. So here's maybe what I think is going on So by the time the wave hits 60 centimeters over here the wave has also hit 60 centimeters on the other side So that's our starting point now this wave goes 30 centimeters and then it comes back to here a hundred and twenty centimeters and then You know if it goes past this resistor then it would have to go an additional 60 centimeters to a hundred and eighty centimeters So that's clearly not what's going on So maybe what is going on is the wave over here goes 60 centimeters over to the termination resistor and then bounces off of it for whatever reason and comes back That's about a hundred and twenty centimeters. So that's a little closer. So maybe that's what's going on over here What is clearly not happening is that the bounce is not getting fully absorbed by that hundred ohm termination resistor which we expected because of our intuitive Exploration of what happens with a driver in the middle of a termination line Nevertheless, this is a reasonable wave now. Let's take a look at what happens on the other end This is the 90 centimeter end Okay, so that's what's happening at the 90 centimeter end now again. We've got one cursor Right at the very beginning of the wave we can see that it goes up to about two volts which again would be expected Actually, what that means is that we've probably got a one-volt wave Floating this way and then when it bounces off it doubles So that means that we get two volts over here and then it seems to slowly creep up And then it starts bouncing around like crazy Let's take a look at where that peak is So that peak is three point seven volts. That's not great And then it bounces down to something like 2.75 volts Which is okay? It is still above the threshold It's just that this bouncing around is a little Disconcerting and I also don't like the fact that the wave actually goes above our supply voltage of three point three volts So again clearly, you know, not the best termination and just for completeness. Let's see what happens Right at the source. So here maybe it's a little clearer what's going on So we start from zero and we bounce up to a little bit over one volt which makes sense We already know that One volt must be traveling down the line because it got double to about two volts and in fact That's probably what this little Plateau right in the middle is all about So let's take the second cursor and move it to just about Where the wave form starts to rise again? So it's showing Six point sixty seven nanoseconds Okay, so that's six point six seven centimeters. So Sorry six point six seven nanoseconds. So let's take six point six seven and multiply that by our 18 centimeters per nanosecond and we get wow just about 120 centimeters well, that's not a coincidence because that is exactly the distance between the source the end Back to the source again. So obviously that's what this wave is. This is the wave coming back over here now this next plateau If we move our cursor to the very beginning of where it starts to rise It looks like something like two point seven nanoseconds now What I think is going on here is we've got a hundred and twenty centimeters of time over here now during that a hundred and twenty centimeters This wave on the other end has traveled 90 centimeters and 120 centimeters. So it's got basically 60 centimeters to go So what's two point seven or so? Two point seven times 18 is 48. Well, okay, it's 50. It's not exactly 60 Maybe this isn't exactly 90. I don't know but in any case, that's probably the wave that's coming back from here So it looks like that jumped up by an additional vault So now the next thing that happens is we get another rise So if we go, let's see To something like that that's six point twenty seven nanoseconds, which we know is approximately a hundred and twenty Is a hundred and twenty centimeters. So that's probably this wave that came From here and maybe it's bouncing back over here So The thing that I want to really point out and the takeaway from this is that again without a proper source termination You're going to get waves sloshing back and forth between the ends of the transmission lines Now this isn't bad It doesn't go up and then all the way down and then all the way up again And once it does hit three point three volts, it stays there very nicely So that's in the middle again on the ends. This end was pretty good. This end had some bouncing around So this was with a hundred ohms now Let's go and take something closer to 50 ohms and see what happens So I have another stick over here. This one is terminated with a 51 ohm resistor I don't have any 50 ohm resistors. So I'm simply going to transfer power and signal over to the new stick and Now that's connected up And now we're going to look at well, how about the 60 centimeter end again? okay, so We would expect that the wave as it hits the end of the transmission line and it doubles We would expect that to be higher simply because we have a lower source resistance So, you know with that voltage divider, we're feeding more more of a voltage kick over to the transmission line So it looks like it rises up to well something like 2.0. Well, what is it? 2.7 volts so we know that the initial wave being launched was about half that or 1.35 volts So it goes up and then it sort of creeps up and then it bounces down a little bit and the Point at which it bounces down Looks to be again something like 2.7 volts and then it goes up to about 3.3 volts And then it starts, you know sort of ringing around that again. This isn't that bad Now let's take a look at the 90 centimeter end. That's even worse So again, we have what we expected which is Something like 2.7 volts when we get the voltage doubling at the end of the transmission line Then it slowly starts to creep up, but then it really jumps up So clearly something's going on where we double the voltage It comes back and then something else comes back and really adds the heck out of the voltage in fact It goes all the way up to 4.7 volts or so That's very high That's like 1.3 volts above our supply voltage And what's worse is that the bouncing is also worse if we look at this Bounce down. It's well, that's not too bad. It's 2.7 volts So again, it's above the logic threshold But nevertheless this peak is kind of worrisome and it does seem to take a while to sort of calm down Now let's take a look at the wave right in the middle and you know again We could probably explain this where we get the initial voltage rise It sort of shoots up and then it settles down to something like what we expected And then it sort of stays there until the wave from the short end comes back and then it rises And then we get another rise and then we get you know a little bit of bouncing, but you know it doesn't look too bad So with 51 ohms of termination, we know that we've sort of got a bad Result at the long end of the termination line So if going down to 50 ohms wasn't correct in fact it made it worse What happens if we go above the original 100 ohms? so what I have here is another stick that I've prepared and If I measure it's 200 ohms. So I've got a 200 ohm resistor over here So again, let's take a look at the wave And let's see what we get So why don't we go right to the Worst point which is the long end. So this is interesting It's certainly not going above The supply voltage which certainly is a good thing so when we start we see an immediate rise to It looks like about one point Two volts or so so we know that The wave being launched was about half that which is something like point six or point seven volts Which again makes sense Because our Source termination is a lot higher Then it kind of creeps up and then it jumps up again Just about by the same amount Now we're at something like Two point four volts or two point five volts then it droops down to two point two volts or so And then it goes up to something like three point one volts and then it sort of bounces around a little bit In fact, it doesn't seem to rise To three point three volts, but that's okay. At least it's above the logic threshold So that's not very good either, but at least we've solved one problem Which is we don't get that huge rise above The supply which is certainly a problem because we don't want to fry our inputs Now granted the inputs of most logic chips are protected by diodes But you don't really want to rely on that protection. That's that's not for Extended use let's take a look at the short end and here's what we see on the short end again We see the usual doubling rise. It stays there for a little while Rises again stays there for a little while rises again, and it you know slowly makes its way up to three volts We're three point three volts. So again, this is an okay termination. It's not really ideal And What it seems to be doing is stretching out the wave So it's actually taking longer for us to get to its final state. So what do we do? Well, we know that 50 ohms is too low 200 ohms is clearly too high. We know that For a driver that is not in the middle, but probably somewhere over here, maybe We want something between 100 ohms and 100 and 200 ohms. So let's just call it 150 ohms. So if we were to graph The resistor that we would want at the end At the very end, we would want 100 ohms at this end. We would want 50 ohms. So that's here and And then somewhere maybe over here, we would want say 150 ohms So that would be like this. So it looks like we're getting a curve maybe like this and Then it would probably do this Unfortunately, we do not want to use a different resistor for every single card along the bus first of all, I'm going to have 32 cards, so So first of all, there is no middle card, right? We would have two cards next to each other So we would have 16 on one side 16 on the other side So we would basically have 16 different values of resistor Now the second thing is that that means that every card could fit in only one of two slots or two of The 32 slots and you would have to get that right. Otherwise you wouldn't have a correct termination So one possibility is to simply choose a middle value. Now, what would that middle value be? Well, is it a hundred ohms? Well, it could be that would certainly work for the end It didn't seem to work that well for this end But if we were to look at the datasheet, we see that we have some limiting values over here So the input voltage can go between negative point five and plus six point five Now does that mean that with a three point three volt supply? We can go up to six point five volts I don't think so Here are the recommendation recommended operating conditions So here's the supply voltage could go up to three point six volts and the input voltage the maximum is five point five volts So in fact, you know, maybe going above the supply voltage a little bit is actually okay So we may be able to get away with a 100 ohm resistor Now just for fun what I've done is I've taken the 100 ohm termination which is what I guess we've settled on to use and I'm putting in a 20 megahertz Square wave signal into it and let's see what it looks like on the long end And that's what we're getting on the long end so Even a hundred ohm Source termination is just not very good If we take a look at where this peak occurs It occurs around Point eight volts or so And if we look at where this trough occurs it's About two point six volts But again, the wave is just not very clean And let's take a look at the short end That's really a crazy wave We can see that During the transition it doesn't even go down all the way to zero Eventually it does but it does actually pop back up to 1.5 volts, which is unfortunately Above the logic threshold for zero, which is around point eight It does go below that eventually In going up there's this other little trough over here, which goes down to 2.85 No 1.93, which is unfortunately below the high threshold of two volts. So this is just not very good. It's it's just not working So what i've done is i've tried the other technique, which is end termination So what i've done here is i've put a 100 ohm resistor to ground on one end and also another 100 ohm resistor to ground on the other end And the reason that you have to terminate both sides of course is that this is 100 ohms and this is 100 ohms So you have to terminate both ends now Let's go ahead and see What the signal looks like at the end Now that's a pretty clean signal The low Voltage is just about zero volts It does dip slightly below it only goes to minus point two volts, which is just fine. That's well with intolerance And the high voltage goes only to about 2.5 volts and the reason for that of course is that clamp Current that we saw of 50 milliamps. Nevertheless 2.5 volts is still above the logic threshold And if we take a look at This little peak up there It looks like that goes up to 2.8. So that's okay. Let's take a look at the short end now And again, we've got a pretty clean waveform relatively speaking Again the low Again, the low level is just about zero volts and it does dip below that to about point 35 volts again Well within spec And for the high voltage We end up at again around 2.5 volts. So everything seems to be going pretty well The only problem with this is that Is that now we've got an output that is Required during the high periods to put out 50 milliamps and during the low periods. It doesn't put out anything And if you were to have all eight bits high, well, you know, that would be 400 milliamps, which apparently exceeds the total Capacity specified for this chip, which is 100 milliamps. So That's great The termination works perfectly But unfortunately it exceeds the specs of the chip now You could also use what's called a Thevenin termination where you have one resistor going to ground And another resistor going to plus and what you do To determine the effective resistance as you simply put them in parallel So if we were to have 200 ohms and 200 ohms, that would be a 100 ohm termination And we can do the same thing on the other side 200 ohms and 200 ohms But for any given dc level All the chip is going to see is a 200 ohm resistor to the opposite voltage rail So 200 in parallel with 200 would be 100. So basically we've halved our current requirement unfortunately again Since uh We're only allowed to go up to 100 milliamps of supply current. We'd still need 200 milliamps So this is just no good for that I suppose I could only use maybe half the chip But that would be a real waste considering that I need 32 bits And if each of these chips is four bits, then I would need eight of these chips So that's no good. What else can we do? Well another thought that I had Is to uh take this and remove the source termination replace it with a zero ohm resistor And then try the diode termination. Well, why not? I mean I've got nothing to lose at this point So let's try that Okay, so what I've done here is I have soldered in two diodes one going to ground one going to The power supply Reverse biased, of course And I've also put in the power decoupling capacitor right over there. I've also done the same thing On the other side. I've used uh bat 54s b at five fours These are SOT 23 packages There are various bat 54 packages. There's like, you know a and c and s and they all have different diode configurations This is the kind with a single diode in it for For a termination With one diode going to one place and one got diode going to the other place You can use a single package, but basically this is all I had So anyway, I've also replaced the source termination resistor with a zero ohm resistor So now we've got our 20 megahertz signal And let's see What the long end looks like Okay, so that's um, that's quite an interesting waveform Unfortunately it seems to go up to four volts And it goes down to 0.6 volts on the bottom So remember that I said that you have to use a fast diode. Well the uh, this is a shatky diode And the forward voltage on this diode is supposed to be 0.2 Of course, it takes some time to respond So it allows the signal to go down to minus 0.6 before it actually starts to Clamp that Voltage and the same thing at the top because our power supply is 3.3 volts It would take a 3.5 volt signal to Forward bias the diode, but unfortunately The signal goes up to about Four volts or so. Yeah, it looks like four volts So this is not a great termination Let's take a look at the other side Yeah, and that's got some bouncing in it. So that's not great either we've got a trough of Minus 0.8 volts or minus 0.86 volts and the high up here again is Four volts or so nevertheless, it is a better signal than the Than the 100 ohm source terminated signal So what I wonder is what happens if I put a source resistor over here Along with the diodes, I don't really know what's going to happen But let's find out So just for fun. I've put in a 62 ohm resistor Because that was the one that was immediately at hand. So let's take a look at the long end Well, again, that's um, not great. The waveform is not very straight And it does sort of bounce a little bit and if we look at the short end The short end is a little better. Um, it doesn't go all the way down to zero It does bounce up to 0.7, which is below the threshold and it does eventually go up to 3.1 volts So that's actually not so bad It it seems to Do the job. Let's go back to the long end And in terms of the long end. Yeah, again, it's it's not really very straight But at least it does go below the threshold And it only goes down to 0.25 volts, which is not that bad It does go up to three volts fairly cleanly This bottom voltage is 2.6 volts, which is above the threshold So this actually isn't that bad So it's weird, but apparently some combination between a series resistor And a diode clamp at the end seems to work. Okay Let me just lower the frequency on this just a bit to see what The long-term waveform looks like to make sure that there isn't any craziness Okay, so this is at the long end We can see that it goes pretty much all the way up to 3.7 volts and down to 2.7 volts and then it just sort of rings around there So that's okay. And let's look at the negative slope And that too is not that bad It does go from 3.3 all the way down to about 0.5 or so And then it climbs up to about 0.7 That is below the logic threshold for zero Let's take a look at the short end And again, that really isn't that bad. And if we look at the negative slope And again, that really isn't too bad. We have The maximum rise of that bounce is 0.7, which again is below the logic threshold. So So this isn't that bad. It seems to work. This is a 1 megahertz signal So you can see that, you know, there is ringing, but even with a 20 megahertz signal it worked okay, so This is probably what i'm going to end up using Again, the problem is what is the value of that series termination resistor? Well That's a really good question. I should probably go back to my Stick where I have the driver on the end And then put a 50 or 62 ohm resistor over there and see what it looks like Or what I could simply do is cut this trace right over here. I may as well Save myself all that desoldering. Let's see what happens So I went ahead and cut the trace right over there So, let's take a look at the only end that now exists, which is the long end So it looks pretty much the same. It drops down and it rings a little bit. Let's take a look at the positive slope And that's actually quite nice. It just goes up and it doesn't even ring, which is actually quite surprising Quite pleasing in fact and it goes up to 3.8 volts, which is within spec So I think we're going to call this The solution that I'm going to use so a combination of a series termination of 62 ohms because that's what I had and I'm going to just go with it and output these termination clampers And these termination diodes on the end So that is what I'm going to design in And the nice thing about this is that it doesn't actually use up any current While the output is going to be stable at you know 3.3 volts or zero volts or whatever because these diodes are not going to conduct when the signal is between Say negative 0.2 and 3.5 volts So That looks like it's going to be the solution. Excellent. All right. Well, now I have to go back and design my cards To include this series termination resistor on every output I need to include buffers on every output as well And then when I design the back plane, I'm going to need to be sure to use termination diodes on both ends So I think the next video is probably going to show the risk five register designed with the buffers and the series termination And we'll see how that works. So until next time See ya Tips I have no music and I can't sing