# Multiplexer Design and Simulation using PSpice: Tutorial 11

In this tutorial, we will explain the workings of a simple multiplexer. At the start, we will provide a brief and concise introduction to multiplexers, specifically the simplest 2×1 multiplexer. Then we will provide the explanation, along with the output. We can also refer to a multiplexer as a mux in short form, and a 2×1 mux is the simpler of its kind. After that, we will simulate the circuits using PSPICE and compare the result with the theoretical discussion (which should be the same). At the end of the tutorial, we have provided an exercise for you to do on your own, and in the next tutorials, we will assume that you have done those exercises and not explain the concept regarding them.

## Introduction to Multiplexer

A simple multiplexer is used to display a number of input signals on a single output line with the help of a select switch. A total of 2n input signals can be displayed on a single output line with the help of the n select switch. A simple multiplexer diagram and functionality are shown in the figure below.

Depending on the value of the select switch, out of all the inputs, one will reach the output, as is obvious from the above figure. To learn about the functionality of a multiplexer, refer to the simulation example below.

### How to design Multiplexer with PSpice

Let’s design a simple digital circuit for a 2×1 multiplexer without using the built-in block of an 8×1 multiplexer. So we will use AND, OR, and NOT gates to build a multiplexer in this tutorial. Open the PSPICE design manager on the PC by typing design manager in the search bar. From the design manager, click on the run schematic button to open a new blank schematic, as shown in the figure below.

After opening the new schematic, before jumping into designing, first save the schematic by clicking on the file button at the top left corner and then selecting save as so that we can access it anytime in the future. Refer to the figure below.

Click on the Get New Part icon at the top bar of the schematic window in order to search for the components that are needed for circuit design.

#### Placing Components

In the Get New Part window, type 7404. It will display a NOT Gate available in PSpice. From that list, select a simple NOT gate, as shown in the figure below.

Again, open the Get New Part window, and in the part name block, type 7408. Select the AND gate from the list given and then click on Place & Close, as shown in the figure below.

Again, open the Get New Part window, and in the part name block, type 7432. Select the OR gate from the list given, and then click on Place & Close as shown in the figure below.

The next step is to place a ground, do the same again, and in the part name type stim. Select the digital source and then click on Place & Close, as shown in the figure below.

The components placed in the schematic window are shown in the figure below.

Click on the draw wire icon at the top bar of the schematic window in order to connect the already placed components for circuit design, as shown in the figure below.

#### Complete Circuit Diagram

Connect all the components to complete the circuit diagram as shown in the figure below.

On the top of the schematic window, click on the Voltage/Level Marker button, as shown in the figure below.

#### Placing Voltage Marker

Place it at the output capacitor and at the input node, as shown in the figure below.

If we are interested in checking the voltage on a specific wire in spite of checking it at a node, double-click on the wire, and in the window that appears as a result, we will type the name of the wire to label it with, as shown in the figure below.

We can also change the name of the device, i.e., in this case, we have 3 identical sources, but each of these has a separate purpose. Two of the sources are used as inputs for the multiplexer, and the other is used for the select line of the multiplexer, i.e., which input we want to display on the output. Name one of the sources as S0 (select line).

#### Selecting Input Attributes

The next step is to set the attributes of the input digital supply. Double-click on the dstm1 supply we connected in the circuit previously and set the input commands of the digital input system as shown in the figure below.

The commands in the attributes window represent the value of the input at the corresponding time in the command before the space. The COMMAND1 = 0s 0 shows that at time 0s the value of the input dstm is 0, and the COMMAND2 = 1s 1 shows that the value will update to 1 at time 1 second. Similar is the case with COMMAND5 = 4s 0, where at 4 seconds the value of the input will be 0.

The next step is to set the attributes of the input digital supply. Double-click on the dstm2 supply we connected in the circuit previously and set the input commands of the digital input system, but these commands may or may not be the same as the commands of input 1, as shown in the figure below.

After this, we set the attributes of the input digital supply. Double-click on the dstm3 supply we connected in the circuit previously and set the input commands of the digital input system, but these commands should not be the same as the commands of dstm2, i.e., as shown in the figure below.

#### Simulation Setup

The next step is to adjust the properties of the simulations in order to produce a graph of the voltage at the marker. Click on analysis and then click on Setup, as shown in the figure below.

A window will appear. Click on the transient block on the window and adjust the properties of the window according to the requirements. Refer to the figure below.

#### Simulation

The final time of the response is 4 ms because we have set the commands for up to 4 ms. Now comes the simulation part. Click on the analysis at the top bar of the schematic window and then click on simulate, as shown in the figure below.

A schematic window will appear showing the voltage at the output wire and the input source, as shown in the figure below.

The output of the circuit shows that when the select switch is 0, the value at the input I0 will be displayed at the output Vout. Similarly, when the select switch is 1, then the value at the input line I1 will be mirrored on the output Vout. The select switch will select, out of all the inputs, which one will be displayed on the single-line output.

### Exercise

• Design a 4×1 mux using the same methodology as in case of 2×1 multiplexer (mux)

## Conclusion

In conclusion, this tutorial provides an in-depth overview of designing and simulating a multiplexer circuit in PSpice. It covers step-by-step procedures with examples and explanations to help us better understand the concept of multiplexers. You can utilize this concept to build and simulate more complex circuits in PSpice. At the end, an exercise reinforces the concept of designing a multiplexer circuit in PSpice. Hopefully, this tutorial has been helpful in expanding your knowledge of designing and simulating using PSpice software.

You may also like to read:

This concludes today’s article. If you face any issues or difficulties, let us know in the comment section below.

<<Previous tutorial                                                Next  tutorial>>