ECE 201 Lab - Multiplexers and ECE 201 Lab - Multiplexers and Serial Communication

Objectives

To familiarize students with the internal realization of multiplexers. To show an application of multiplexers and demultiplexers for use in serial communications.

Procedure

Part I - The realization of a 4-bit multiplexer

A multiplexer works a lot like a 4 position switch. A schematic for a 4 position rotary switch lookl like this:

lab6_mux1.png

The switch contact can be moved to any one of the four positions. The switch can not be moved anywhere else, i.e. it must be in contact with one of the four inputs at any time. It should be obvious that the output signal of the rotary switch equals the signal on the input to which the switch rotor has been positioned. (Did you get that last sentence? Make certain, for it is vital to comprehension of multiplexers).

By now, you may be wondering what this has to do with multiplexers, which are little electronic gizmos having no actual switch contacts, no knob to turn or lever to position, or anything of the sort. It is helpful to think of a multiplexer as a rotary switch whose position is controlled by a binary number input to the device. How many control bits would we need to select one of 4 positions? The control inputs will henceforth be called select lines due to the fact that they select one (and only one) input to be routed to the output. We can redraw our rotary switch as follows:

lab6_mux2.png

S1 and S0 are the select lines and determine which ``position'' the ``switch'' is in. Note that the order of S1 and S0 is important; S1 is the most significant bit whereas S0 is the least significant bit. If we want to be slightly more technical, we can formulate the boolean equation for the output function of a four input multiplexer as:

f = S1¢S0¢I0 + S1¢S0I1 + S1S0¢I2 + S1S2I3

Note that when a binary 0 is on the select lines, f=I0 ; when a binary three is on the select lines, f=I3 ; etc.

Using the above equation, we can realize this function with the following circuit:

Part II - Application - Serial Communication

Some notes before we get started: In this section, in addition to using multiplexers and demultiplexers, we will use a 74193 counter chip. You probably have not seen counters yet in your 201 lecture. Don't worry, you don't have to know how counters work in order to do this lab. You just have to know what they do (Hint: they count!). Hook the counter up as shown at the end of the lab, and it will count repeatedly through the numbers 000 to 111 on the ``Q'' outputs, incrementing once on each clock cycle. We'll revisit counter design before the end of the semester.

You'll also need to to make use of your 74151 8x1 multiplexer chip, and your 74155 chip. Some extra info to use with the 74155 diagram on the chip sheet is given below.

demux.png

Time multiplexing is often used with LED displays on calculators to reduce the amount of current the battery must supply to light the LED's. Rather than lighting all digits at once, one digit (or group of digits) will be lit for a short time (perhaps 1ms) then the next digit (or group will be lit for an equal time, and so forth until the cycle repeats). The LED's flash on and off so fast that the display appears continuous to the human eye, but the battery is required to supply a much smaller peak current than with a true continuous display. Note: LED's use a lot of current, around 10mA (all digits = 8). [Turn on your display as opposed to only 0 in the display.] Time Multiplexing is also often use in communication systems where independent data streams must be sent over a single line or channel. (The phone company does this in places.)

We are going to time-multiplex the seven segments of a 7-segment display. The 74193 counter will be used again, the 3 least significant bits driving both the Multiplexer and the Demultiplexer. The Demultiplexer is essentially a backwards multiplexer - one input and 2 outputs which are selected by N select lines. We will construct a 1 to 8 demultiplexer from the 74155 Dual 1 to 4 demultiplexer. The 74155 has 2 1:4 demultiplexers, one of which has an inverting input (just to make life more difficult). A clock diagram of the 74155 looks like this.

lab6_74155.png

To use as a 1:8 demultiplexer, connect as follows:

lab6_74155_8to1.png

Now connect the following circuit:

lab6_finalblock.png

WARNING!!

DO NOT WIRE any pin of the seven-segment display to ground. You can destroy it. Be sure that the bare leads of the resistors do not touch before turning on power.

To operate: wire the inputs to the 74151 as appropriate to light the proper segments for a 5. Set the clock on 1 Hz and check that the proper segments light. (Have patience, this will take about 8 seconds.) Once all segments light (or stay dark) as they should, speed the clock up one notch at a time and observe the effect at each speed. At 1 kHz, the display will appear constant though a bit dimmer.

Extra notes for those who are interested:

Actually, each segment is lit by its input going low: (TTL can sink more current in the low state than it can source in the high state is the reason it is done this way.) This is remedied by the fact (unmentioned to avoid confusion) that the output of the 75151 is actually inverting outputs.

Circuit for Single Segment:

When the output of the 74155 goes high, there is no voltage drop across the LED, thus it is off. When the 74166 does low, there is a voltage drop across the LED (and the resistor) thus a current flows, lighting the segment.

INSERT FIGURE

Questions to turn in with the lab report.

  1. Explain why the circuit connection on page 2 acts like a 1:8 demultiplexer
  2. If this circuit were being used to transmit data over a single wire, which connection on the final circuit (page 3) corresponds to the data wire? (Ignore timing problems with the counter.)
  3. How do you think the phone company uses multiplexing to put many conversations over a single line?
  4. What other types of multiplexing can you think of?

Some notes on the simulation of this lab

In lab 7, you need to use an 8 x 1 MUX with a 4-bit counter to transmit a byte across a single wire. You can easily wire this circuit with the 74151 and 74193 chips in your lab kit, as shown in your lab manual.

Simulation is made more complicated by the fact that you do not have models for these 2 chips. So, we'll have to make some!

First, the 74151 MUX. You can do this in one of two ways. One approach would be to simply draw the AND-OR diagram of an 8x1 mux. It's pretty simple, you just need 8 4 input AND's (each of which and's the appropriate input line with the right minterm of the 3 select lines) and an 8-input or function. Hint: Once you place a gate in Digital Works, you can right click on it to increase the number of inputs to 3 or 4.

Another approach would be to take advantage of the 4x1 Mux you made for part I of this lab. Two 4x1 Muxes can easly be connected to form an 8x1 mux. The circuit diagram below shows you how:

8mux.gif

Next, we need to deal with the 74193 chip. Digital Works does supply a 4-bit counter macro, but none of the pins are labeled which it makes it a little hard to use. Since we haven't covered counters yet (Hint: They count!) I've designed a new counter macro that you may find easier to use which you can download from the lab home page.

You'll also find a macro for an 8x1 Demux on the lab page. It's not exactly like the 74155 (which can also be used as two 4x1 demuxes), but it does have the low-active outputs you expect for this lab.




File translated from TEX by TTH, version 2.86.
On 26 Mar 2001, 18:31.