Sunteți pe pagina 1din 2

THE UNIVERSITY OF THE SOUTH PACIFIC

SCHOOL OF ENGINEERING & PHYSICS


EN222 - DIGITAL ELECTRONICS LABORATORY
LABORATORY 02

CREATING MACROS

INTRODUCTION:
The aims of this experiment are to
1: Introduce the student to the CircuitMaker Macro facility.
2: Teach students how to learn new skills on their own from the Help Manual of CircuitMaker.

The student is therefore required to study the material in the CircuitMaker Manual on Macros in particular and on
"Creating New Devices" in general. This material is available from CircuitMaker Help (Help / Contents / Chapter 16:
Creating New Devices). The material in this chapter covers creation of new devices as well as Macros. The chapter
contains examples and tutorials to assist the student understand the material covered in the chapter. The appendix
contains material from part of this chapter. It is recommended that students read and study this material before the
laboratory class.

INSTRUCTIONS:
1: The circuit to be used for the macro device is shown in Fig. 1. The pin layout to be used for the macro device
is shown in fig. 2. Create a macro named EE222Mac based on the circuit of Fig. 1 and the pin layout of fig.2. Save the
macro.

74LS10

FIG 1: INTERNAL CIRCUIT FOR MACRO

2: Start a new window and load your macro. Connect Logic Switches (Digital/Power / Switch) to input terminals
X1, X2 and X3 of your macro. Connect +V 5V to the 5 V terminal and Ground to
the GND terminal of your macro. Finally connect a logic display (Displays / Digital
/Logic Display) to the output terminal Y of your macro.

3: Successively apply the input combinations given in Tables I to your circuit.


For each inout combination note and write down the value of output Y in Tables 1.

4: Ensure that your work is assessed before you leave the laboratory.
APPENDIX
CIRCUITMAKER MACRO (Extract from CircuitMaker Help)

If you cannot find a device in CircuitMaker’s library of devices (or elsewhere) that performs a particular function, you can
create a functional macro device by attaching hidden circuitry to a custom symbol.
A macro device can contain internal circuitry that you can base on CircuitMaker’s library of existing devices. You can also
nest macro devices, meaning that a macro can be used within another macro device, letting you create building blocks and
piece them together in order to create the final device.

When you save a macro, all of the circuitry you have added to it is hidden within its symbol. The new macro device
functions according to the circuitry hidden within. You can then use the new macro in any circuit.
To create a macro device with internal circuitry,

1 Make a backup copy of the USER.LIB file.


In case the library is damaged or altered in any undesirable way, you will always have a copy of the library as a
backup.
2 Create a symbol as described earlier in this chapter (see Creating Device Symbols earlier in this chapter).
3 Place the symbol that you created in the drawing area and expand it by selecting it and then choosing Macros >
Expand Macro (see Expanding an Existing Macro Device earlier in this chapter for more details).

4 Construct the circuitry which performs the function your new macro device is to have.

Note: If a macro device


Contains internal
circuitry as well as SPICE
data, the SPICE data will
be ignored.

Figure 17.8 You can add functional circuitry


such as this AND-NOR function.

For example, suppose you want to build a device that performs an AND-NOR function. You would construct something
like the circuit shown in Figure 17.8 in the user manual.

5 Select the Wire Tool from the Toolbar and connect wires from the macro symbol's pins to the other points within
the circuit. Figure 17.9 in the user manual shows an example of a completely wired macro device.

Figure 17.9. The functional circuitry is wired to the


Symbol to create a functional macro device.

6 If default data was not added when the symbol was created, then double-click on the macro symbol and click the
Netlist button. Add any necessary data such as Package and Auto Designation Prefix. Data entered now in the Device
Properties dialog box will be there every time this macro device is selected from the library menus. Note: For compatibility
with TraxMaker, the Package field must match the name of the corresponding component in TraxMaker.

7 Save the Macro (choose Macros > Save Macro).

S-ar putea să vă placă și