|
TechWatch
Technical hints from Premier EDA Solutions Ltd.
www.eda.co.uk |
This TechWatch is based on the 2nd part of the Altium Designer presentation performed at our UK User Conference on the 6th Sept 2005 In this section we aim to look at some of the more advanced uses of the user parameters including component classes and document linking. We will also look at shortcuts for creating large pin components and updating schematics from libraries. For the purpose of this TechWatch I have made the files I used available here Download, most of files are based on standard Examples available with Altium Designer 2004. Component ParametersSchematic components in Altium Designer 2004 allow the user to add information using Parameters. The information in these parameters can then be made visible on the schematic or outputted to the BOM. There are some more advanced features that can be derived from the user-defined parameters using special keyword parameter names, which we shall take a look at. The first thing we are going to look at is the ability to add URL links to components which will allow us to access documents such as datasheets using the help Key F1 or by right clicking on the component. If we look at our 4 Port Serial Interface design, from the provided example files, we have 3 Line Drivers on the 4 Port UART and Line Drivers.SchDoc. If we double click on U2 you can see that there us a user parameter called HelpURL The HelpURL points to the datasheet for the MC1488N device. Close the component properties and press F1 over the component to open the datasheet.
If we wish we can add additional document links to the component using a pair of keyword parameters called ComponentLinknURL and ComponentLinknDescription Where n is the number that links the pairs together. Lets add in a new document link into our line drivers. Select the 3 components U2,U3 and U4. Open the Inspector panel and within the Add User Parameter: cell put in the URL C:\Delegate Working Folder\Datasheets\mc1488.pdf#page=13 Press Enter and add Parameter Name of ComponentLink1URL. Then add another new Parameter with value of Mechanical Dimensions, press Enter and give it a parameter name of ComponentLink1Description Now if we Right Click on one of these components we see we have a Reference menu item with the Help, which is our HelpURL link, and the new description of Mechanical Dimensions. Select this and you should see the datasheet open on the correct page. There is a Movie on the Altium Demo site which illustrates this feature
The next keyword parameter we shall look at is going to allow us to create components classes on the schematic that will be taken across to our PCB. By default Altium Designer automatically creates a Component Class per schematic sheet within the design. In order to create a component class we need to assign a parameter to all of the components on our schematic that we want to be included. We could select them and use the inspector panel again but for a little variety we shall use the Parameter Manager this time. Go to Tools » Parameter Manager and select Parts and Exclude System Parameters. >The Parameter Manager is basically a spreadsheet view of our user and, if you choose, system parameters. Here we are going to add a new parameter called ClassName to our line drivers.
Using the Add Column... button add a parameter with name ClassName. Select the 3 Drivers (U2, U3 and U4) and Right Mouse Button (RMB) click and select Add and then RMB and Edit and enter the parameter value Driver. Finally select Accept Changes (Create ECO) and the Execute the ECO and Close. Now if we switch back the schematic we can see our ClassName parameters have been added to these components. To ensure that these go across to our PCB we need to change some settings in the project options. Go to Project » Project Options » Class Generation and under User-Defined Classes check the Generate Component Class option and Generate Rooms for Component Classes, if you wish to generate a placement room for each component class. Note we can also create Net Classes on the schematic using a Net Class directive, which we can place on wires and busses. This can be found under Place » Directives » Net Class. There is a Movie on the Altium Demo site which illustrates this feature Creating Large Pin count componentsOne of the biggest challenges of creating a component with a large number of pins is to enter all of the pin information such as designators, display names and electrical type. Lets quickly create a component. File » New » Library » Schematic Library Place » Pin and press TAB for properties. Set Designator 1 Display Name 1 Place pin at 0,0 and then Select and use Edit » Copy, select your reference at 0,0 and then Edit » Paste Array. Within the paste array dialog box set Item Count 43 Primary Increment 1 Vertical –100mil. Paste 1 row under pin 1. Select all but one pin and use Edit » Rubber Stamp and chose the reference point and place second row. Finally Place » Rectangle for the component shape and if it is covering the text of your pins move it to the back using Edit » Move » Send to back.
Now we have a basic component we can import our pin data using the List panel from our source document. Easiest is probably a spreadsheet as it is in a column and row format already. Open the BC213159AXX-BN.xls from the example files and then select and copy the pin information, you can copy the entire block but don't include the column titles. Open the List panel, ensure its set to Edit, Current Components, Include only Pins and that the columns are in the same order as the spreadsheet (Name, PinDesignator, Electrical Type and Description) using the RMB menu Choose Columns... . Select the top cell of Pin Designator and RMB menu Paste. An alternative method for importing pin information is to use the script provided by Altium http://www.altium.com/forms/kb/kb_item.asp?ID=4441. Using this script you can import all pin data from a *.cvs file. The advantage of this is that we don’t need to sort our columns into the correct order to import all of the pin data. The main difference is the script will place the pins into your for you where as copying and pasting into the list panel will update what ever you have placed previously. So far we have been updating our parameters directly onto our schematic but we could be updating them into our schematic libraries. What happens to our parameters on the schematic if we make a change to our library component and update our schematic documents? If you update from the library using the Tools » Update Schematic command they will get removed and replaced with what ever happens to be in our library. So a better, more controlled method is to use a feature called Update from Libraries, which is performed from your schematic document. For example lets go to our 4 Port serial interface.schlib library and select our Digital to Analogue converter and add a new parameter. Select the TL12C554 component use Tools » Component Properties and under Parameters click Add. In the new parameter set the Name: Number of Bits and Value: 10 Now if we switch back to our schematic and perform an Update from Library we can choose to only add that parameter without removing all of the ones we have imported from our database. Open the 4 Port UART and Line Drivers.SchDoc and select Tools » Update from Libraries. We are only interested in the TL16C55 so lets turn off the others, RMB click All Off in Component Types and check the TL16C55 and click Next. We don’t want to fully replace the component we are only interested in the parameters. Uncheck Full Replace, Graphical and Models. We need to modify this still further as currently this will over write all of our schematic parameters in favour of he library so we go to parameter changes. Click the Parameter Changes button and you will see a spreadsheet style view of the parameter change, much like the Parameter Manager. You will see that it wants to update our existing parameters and add our new parameter. To stop it updating our existing parameters select them and then reject the parameters that we don’t want removed using the Reject Selected button.
Once you are ready click OK and Finish, you will get an ECO so we know exactly what’s going to happen, Execute the ECO and then go and check the properties of U1 for our new parameter. |
||||||||||||||||