Friday, April 27, 2012

Advanced Eagle Layout Tutorial - Building Better Library Parts - Variants and Technologies

Advanced Variants

Everybody knows that to create a device set you must have at least one variant of the device that binds the symbol to the package. The default variant is called ''. That is right. Double single quotes. It represents an empty string.

Naming Variants

You may have also noticed that if you name a variant, the name is appended to the device name. For example, if you have a device named

WIDGET

and a variant

123

the resulting name will appear as

WIDGET123

Pretty cool, huh? Often manufacturers will have a package code embedded in the device part number. For example, if

WIDGET-

is the base part number, and the manufacturer has package codes

S

for the SOT23 footprint and

XS

for SC70 footprint. The resulting part number would be

WIDGET-S

for the SOT23 version and

WIDGET-XS

for the SC70 version.

As you may already know, if you name your device with the base part number, and variants to match the package codes of the manufacturer, the resulting name for the device in your library will match the manufacturer's part number. Cool, huh?

Advanced Variant Naming

Time to blow your mind. What if the package code is embedded in the part number and not just at the end?

For example, if the part name is

WIDGET-X-AWESOME

where the X represents the package code, you would still want the resulting parts to be named

WIDGET-S-AWESOME

for the SOT23 variant and

WIDGET-XS-AWESOME

for the SC70 variant. Eagle will let you do this. All you have to do is put a ? where you want the variant name to appear. If no ? is present, the name of the variant is appended to the end of the device name. For example,

WIDGET-?-AWESOME

would turn into

WIDGET-S-AWESOME

for the S variant.

Technologies

Eagle has a very powerful feature that isn't used often enough. Technologies. Technologies allow you to create multiple devices of the same variant (with the same package) with different part numbers. Going back to our widget example, there are two different WIDGET devices, a 1.8V widget with a part number

WIDGET-1.8V-S-AWESOME

and a 3.3V variety with a part number

WIDGET-3.3V-S-AWESOME

You can easily generate these with technologies. First, we need to rename our device to include the character for technologies.

WIDGET-*-?-AWESOME

The character * will be replaced by the name of the technology. If * is not present, the technology name will be appended to the end of the device name. In the case that neither ? or * is present, the resulting name will be

device_set_name+technology+package_variant

Now, create 2 technologies, 1.8V and 3.3V.

Like the variant, the default technology is a pair of single quotes, ''. The default technology is marked by default and can be unmarked. Once the new technologies are created in mark, you should now see the technologies appear.

And the result in the Eagle console

Notice that the technologies only appear for the one variant on which the technologies were marked, in this case the XS variant. If you want the technologies active for a particular variant, you must mark them active for each specific variant you wish to have the technology. With variants and technologies, you can replicate a large majority of part numbers for your devices. A good device in a library matches the part number as closely as possible.

Now, that you have created and marked technologies for the device, you can add specific attributes for each technology. A later tutorial will cover attributes a little deeper.

No comments:

Post a Comment

Youtube Channel

Loading...