You are on page 1of 4

Engs 31 / CoSc 27 — Digital Electronics

Introduction to Capture and Pspice A/D
L.F. Wilson, D.A. Fraser, E.W. Hansen; rev 3/01 In this class, we try to expose you to both theoretical and practical aspects of digital design. Design software is a very valuable tool, and this term we will use packages called Capture and Pspice A/D. In addition to offering schematic tools, Cadence has tools for circuit simulation, circuit board layout, and programmable logic. Although we will not use them in this class, capabilities for analog and mixed analog/digital circuits are also available. You will use many of Cadence’s tools in your final project. The Capture and Pspice A/D software is very powerful and has the potential to make your life much easier. Please take the time to learn how to use it. There may be some confusion with the apparent interchangeability of the terms “MicroSim”, “Orcad”, and “Cadence”. We have been using Microsim’s DesignLab software in Engs 31 for many years. Recently, Orcad bought MicroSim and combined the MicroSim Pspice product with the Orcad suite; even more recently, Cadence bought Orcad. We are presently running release 9.2 of the Cadence software, which is an industry-leading package. Note: Unless otherwise noted, “click” and “double-click” refer to operations using the left mouse button.

Getting Started
The “Orcad Family Release 9.2” is installed on the six Windows 2000 workstations (labeled A through F) in Room 221. You must have an account on the Thayer School computing network (Unix and PC). If you don’t have one, or have forgotten your user name or password, see one of the system administrators in Room 225. Log on to one of the workstations in the lab. Typically, you will need to press the following three keys simultaneously to get the login prompt: Ctrl-Alt-Delete. At the login prompt, enter your login name and password, and make sure the domain is CUMMINGS. If someone has left the machine without logging off, you will need to sign that person off and logon to your own account. To do so, click the Start button in the lower lefthand corner of the screen and select “Shut Down…”. In the dialog box, select the option “Close all programs and log on as different user” and hit OK. At the prompt, enter your login name and password. Please make sure that you always log off when you finish using a machine. The first time you log in, check to make sure that you have a printer selected. From the Windows Start Menu in the lower-left corner, select Settings and then Printers. If you see only the “Add Printer” icon and no icons representing specific printers, you will need to select a printer; otherwise, the Orcad software will hang when you try to print. Follow the instructions in the “Introduction to Windows 2000” handout to select a printer. You should need to do this only once, rather than each time you login. Next, find the software using the Start Menu. Choose Programs > Orcad Family Release 9.2 > Capture. The first time you use Capture, you will need to create a new “project”. From the top menu, select File > New > Project. Give the project a name (such as Lab_0), and select “ Analog or mixed A/D”. Ensure that your project is located on your server account by giving the location as N:\user_name\sub_directory. (Assuming you had created sub_directory earlier.) If you fail to locate your project on the server, your files will be saved on the local hard drive and could be lost. Check OK and then select Create a blank project. Click OK again and you should now see a window labeled Schematic1:Page1. The blank schematic will have a border and title block. (You will have to scroll to the lower right to see the title block.) Put your personalized information in the title block by double-clicking on the placeholders i.e. <Title> and entering your text in the resulting window.

Entering a Schematic
Click in the schematic window and note that besides the top bar being highlighted, the menu options in the parent window Orcad Capture also change. Click in each of the windows and notice how the menu choices change. This is one of the “gotchas” where Orcad may differ from what you expect for a Windows program.

Orcad Capture tutorial

Page 1

Engs 31 / CoSc 27 — Digital Electronics

Capture has active bubble help, so if you hold the pointer over something for a second or two, you will see a bubble which tells you the meaning of the tool to which you are pointing. This can be a quick way to determine what functions are available in a new toolbar. Make sure you have a good idea of what you want to do before you sit down at the computer. If you first work out your design on paper, you will save yourself the confusion of trying to learn the software and create a design at the same time. Getting Parts Since you have already developed your design (you wouldn’t logon without it, right?), it is time to create the corresponding schematic. Note: Always keep the “snap-to-grid” feature turned on. Placing parts with it turned off can result in serious problems with wiring connections later on. As a warning, the snap-to-grid button in the top toolbar turns red when off . Click the Parts button on the right-hand toolbar. Alternatively, select Place > Part form the Place menu. (The Place menu will be absent from the menu bar if the schematic window isn’t highlighted.) You will then see the Place Part window. Select the library that contains the part you want, in this case 74LS. If 74LS isn’t one of the libraries listed in the lower left window, you will need to add it. Select the Add Library button and find 74LS.OLB (“Orcad Library”). If you’re lost and can’t find it, the libraries for digital parts are in C:\Program files\Orcad\Capture\Library\Pspice. Unless you specifically need a part from another library, use only the 74LS.olb library. Components in this library match most of the components that you will use in the lab. There are several other similarly-named 74-series libraries, but you should not use them unless otherwise instructed. With 74LS highlighted, select the 74LS08 in the Part List window. You will now see a 2-input AND gate in the right window. Note the “Packaging” information. There are 4 gates in a 74LS08 package, and you will be placing gate “A”. Also note the two colored icons below the drawing of the gate. One indicates there is simulation data available for this part and the other indicates there is circuit board layout information. (Pause the cursor over them to tell which is which). Click OK and the part will attach to the cursor. You can place it on the schematic by clicking the left mouse button. A second part is now ready to be placed. Place 2 gates on the schematic as shown below. End the placement by clicking the right mouse button and selecting End Mode. (Note the other options available to you in this menu.) Follow the same steps to place a 74LS32 on your drawing. The Select button changes the cursor to an arrow. With the Select button pushed, you can click-and-drag a part to move it around on the drawing. If you click on the body of the part (the logic symbol), the entire part is selected and the various labels move with the body. If you click on just a label, you can move it independently of the other segments of the part. Reference Designators When you select a 74LS part from the Place Part list, you get one gate at a time. In the lab, however, there may be multiple gates on a single 74LS chip. When you place a part, it comes with an alphanumeric label called a reference designator that tells which gate is used on which chip. Reference designators for ICs (integrated
Orcad Capture tutorial Page 2

Engs 31 / CoSc 27 — Digital Electronics

circuits) always start with U, followed by a number, followed by a letter. For example, U1B would be the second gate (B) on the first chip (1). By default, Orcad makes each gate you place the first on a new chip. If you placed three 2-input NAND gates (74LS00), you would get default reference designators of U1A, U2A, and U3A. In fact, there are four such gates on a 74LS00 chip. It is common practice (and to your advantage) to change the reference designators such that you place as many gates as possible on one chip. Double-click on the gate’s reference designator to edit it. This will bring up the Display Properties window. Change the Value field to the desired reference designator. If you double-click on the body instead of the reference designator, you will get a spreadsheet of all the attributes for the chip. If you’re curious, you can search for the REFERENCE and DESIGNATOR attributes, but you may find it easier just to cancel the operation and double-click on just the reference designator to get the simpler menu in the Display Properties window. One advantage of changing the gate selection is that the pin numbers are automatically re-numbered for the chip configuration. Furthermore, your schematic becomes much easier to use if you are going to implement your design in the lab. If you need multiple chips, such as when you need gates of different types, change the package reference (e.g. U1, U2) as appropriate. The following figure shows an example of a partial Orcad schematic with two AND gates (74LS08) and one OR gate (74LS32). The two AND gates are located on the same chip while the OR gate must be on a different chip. Pins 4 and 5 are the input pins and pin 6 is the output pin for the second gate on a 74LS08. (You can confirm this by looking at the class handouts showing the pinouts for common 74LS gates.)

Wiring Parts Together Once you have placed the gates, you need to connect them as appropriate for your design. You do this using the wiring tool, in the right toolbar in the schematic. (SHIFT-W can also be used to activate the wiring tool.) Once the wiring tool is selected, left-click on one of the package pins to start the wire. You may be able to just click a second time on the pin at the other end of the wire, but often you will want to put bends in the wire to make the layout easier to read. Click once for each bend. To stop using the wire tool, right-click and select End Wire, or click the Select button. If you have inserted any turns, each section of the wire will be treated as a separate line segment. To remove a line segment, left-click to select it and use the Cut command (CTRL-X) or the DELETE key to remove it.

Orcad Capture tutorial

Page 3

Engs 31 / CoSc 27 — Digital Electronics

Use caution when adding or moving wires. Capture is very unforgiving and will break wires and/or add extraneous connections if you place a wire so it touches junctions. The good news is that it will warn you before doing so by marking the changes with red dots. If you left-click with the wire making unwanted connections, it can take some effort to clean up the mess. With patience and practice you’ll get the hang of it. Once you have connected the gates for your design, you may wish to label some of the wires. For example, you may wish to indicate the names of the input and output variables, in which case you need to add wires to the input and output pins. To add a label to a wire select the Place Net Alias button and enter a label in the box. Click on the wire and place the label. End by right clicking and selecting End Mode from the menu. If your label has a numeric last character, Place Net Alias will increment it before each placement. This is useful for labeling each wire in a family of related wires (A1, A2, …). The figure below shows a labeled schematic for the function F = AB + CD. (In this example, the wire labels (A, B, C, D, and F) were moved to the ends of the wires.) With such a schematic, it should be a simple matter to implement the circuit in the lab, especially since the pin numbers for each gate are shown.

Saving and Printing
Save your work frequently, by selecting File > Save from the menu bar, or clicking the Save button in the upper toolbar (the floppy disk icon). To print your schematic, select File > Print or use the Print button from the upper toolbar (the printer icon). The default page size is A (8.5” x 11”). For larger schematics, you may wish to change to size B (11” x 17”). To change the page size, select Options > Schematic Page Properties from the menu. The lab workstations print to the printers in Room 225. If Orcad hangs when you try to print, you probably did not select a printer when you first logged on. See the “Introduction to Windows 2000” handout to learn how to select a printer. You should have to select a printer only once.

Other Resources
The lab in 221 has manuals for Capture and for all of the other Orcad tools that you will eventually need. For most tasks, you will start by entering a schematic, so the Capture manual will be the most useful. The workstations have online copies of the manuals as well as useful help files. In addition, Doug Fraser and the TAs have experience using the software, so they should be able to help you with any problems that arise.

Orcad Capture tutorial

Page 4