1. Introduction

 

This is the third part of my EAGLE Tutorial series, following on from EAGLE Tutorial: Library Part Creation Part 2 - Creating Symbols. If you haven't read the previous articles then I recommend you take a look there first as they set the scene for this part of the tutorial series and gives some general tips on using EAGLE. In this third part, we'll be taking a look at creating devices in a library and in particular, our example from the previous parts will continue using the MSP430F22x2 as the basis for demonstration with the result being a device which can be used in the schematics and board.

 

As with the last tutorial, I will refrain from using keyboard accelerators and ULP to speed up the process creating the device. In a later tutorial I will go through how we can use these powerful features to create devices much more efficiently. For now we are going to take the slightly more labour intensive approach of creating everything by hand so you know exactly what is required.

 

For this follow-on tutorial we are going to create a device to complete the part creation process for a Texas Instruments MSP430F22x2 device using the package and symbol created in the previous two parts of this series. The datasheet of which can be found on the TI website here: http://www.ti.com/lit/ds/symlink/msp430f2232.pdf

 

2. EAGLE Library recap

 

As discussed in the previous article, EAGLE libraries (.lbr) consist of three parts. Firstly there is the package which defines the copper placed on the board as well as the silkscreen and assembly drawing information. It is also possible to define keepout and restrict areas to indicate how close other packages can be placed and where routing is not allowed. Secondly there is the symbol(s) which define what is placed within a schematic. Finally there is the device which combines symbols and packages to form a part which maps symbol pins to package pins and defines additional properties, all of which can then be added to a design.

 

3. Creating a Device

3.1. Obtaining the required data

 

The usual place to go for all the required information for building a EAGLE device is the data sheet for the part. Sometimes for large parts with many variants within the range such as FPGA's the manufacturer may provide spreadsheets which contain all the required signal names for the pins for the different variants of the part. The information required to create the device is:

 

  • The package(s) for the device (created in part 1)
  • The symbol(s) for the device (created in part 2)
  • The mapping of symbol pins to package pads
  • An high level description of the device

 

All this information should be easily accessible but sometimes you may need to do a little digging through the datasheet to pull it all together.

 

3.2. Naming the device

 

For this initial version of the device we'll just call it MSP430F22x2, however in a future tutorial when we learn about package variants and technologies then we will rename this device to all more sophisticated device naming to take place. For now we'll just create the device in the same way we did for the package and symbol in the previous tutorials.

 

EDIT MSP430F22X2.dev

 

After confirming that you wish to create a new device you will be presented with an empty device window as shown below:

 

Device Tutorial 1.png

 

3.3. Adding the symbol

 

The first thing we need to do is add our symbol to the device.

 

ADD 'MSP430F22X2'

 

Click on the origin of the symbol to place the symbol centrally in the window.

 

Alternatively we can click on the 'Add" button on the toolbar and select our symbol in the resulting dialog.

 

After adding the symbol we have the resulting device:

 

Device Tutorial 2.png

 

3.4. Adding the package

 

Now we want to also add our package to the device.

 

PACKAGE 'TSSOP-38_12.5MMX6.1MMX0.65MM(DA)'

 

This will automatically add the package with the default variant name into the device.

 

Alternatively we can click on the 'New' button in the bottom right quadrant of the device window and select our package in the resulting dialog.

 

After adding the package we have the resulting device:

 

Device Tutorial 3.png

 

3.5. Mapping the symbol pins to the package pads

 

This is the longest part of the process and the place where errors could occur so it is important not to rush and to check as you are going along that you have mapped everything correctly and to double check again at the end to ensure you haven't missed anything.

 

Start by double clicking on the package name in the list on the right hand side or use the following command:

 

CONNECT

 

This will open up the pin mapping dialog box. There are three columns to this dialog, the left hand column lists all the available symbol pins, the middle column lists all the package pads and the final right hand column list the currently connected pins and pads.

 

Now by referencing the datasheet, select each pin in turn in the left hand column and for each of these select the appropriate pad in the middle column then click the 'Connect' button. If more than one pad is associated with a pin (which is not the case in our current example) then you can select multiple pads by holding down Ctrl (Cmd on macOS) and clicking on all the pads required before clicking connect. If you have missed any pads from a connection, then select the connection in the right hand column, select the pads as previously described and then click the 'Append' button. If you've made a mistake with a connection then select it in the right hand column and click on 'Disconnect' to delete the connection.

 

After working through the pin mapping we have the resulting device:

 

Device Tutorial 4.png

 

Notice the green tick which has appeared next to the package to indicate that it has been fully connected and is ready to use.

 

At this point you are probably thinking you are glad there are only 38 pins to the package. There is however a much quicker way which, with a bit of cleverness with what we did in the text file in the previous article, will make connecting up the device much quicker. We'll cover this in a future article.

 

3.6. Setting the device prefix

 

We would like the reference designator on the schematic when this part is placed to have the letter prefix of U. So we issue the following command:

 

PREFIX U

 

You will see the specified prefix updating the box in the bottom right quadrant of the device window.

 

Alternatively click on the 'Prefix' button and enter U in the resulting dialog.

 

3.7. Updating the device description

 

Having a useful description for a device can make searching your libraries for a suitable part far easier. The description for the device must be written in HTML but don't worry, you just need to know a few bits and pieces and have a template and then you can copy and paste from the device datasheet to create your description. Here is a basic template to make a start with a simple description:

 

DEVICE AND BRIEF TITLE


DESCRIPTION
The description goes here.....

Add as many paragraphs as you need....

Further information is available in the datasheet for the part which can be found here.

 

So now we'll go ahead and create a basic description for our part. We start by clicking on the "Description" link in the bottom left quadrant of our device window or issuing the following command:

 

DESCRIPTION

 

Now we copy our template into the bottom half of the resulting dialog and update it with useful information from the datasheet. Here is a short description as an example:

 

MSP430F22x2 - MIXED SIGNAL MICROCONTROLLER


DESCRIPTION
The Texas Instruments MSP430™ family of ultra-low-power microcontrollers consist of several devices featuring different sets of peripherals targeted for various applications. The architecture, combined with five low-power modes is optimized to achieve extended battery life in portable measurement applications. The device features a powerful 16-bit RISC CPU, 16-bit registers, and constant generators that contribute to maximum code efficiency. The digitally controlled oscillator (DCO) allows wake-up from low-power modes to active mode in less than 1 µs.

The MSP430F22x4/MSP430F22x2 series is an ultra-low-power mixed signal microcontroller with two built-in 16-bit timers, a universal serial communication interface, 10-bit A/D converter with integrated reference and data transfer controller (DTC), two general-purpose operational amplifiers in the MSP430F22x4 devices, and 32 I/O pins.

Typical applications include sensor systems that capture analog signals, convert them to digital values, and then process the data for display or for transmission to a host system. Stand-alone radio-frequency (RF) sensor front ends are another area of application.

Further information is available in the datasheet for the part which can be found here.

 

Once you have pressed 'OK' the description will be shown in the main device window as follows:

 

Device Tutorial 5.png

 

4. The Completed Device

 

The result of everything above enables the creation of a complete and usable device with relative ease. The video below shows how long it took me to create the device for a Texas Instruments MSP430F22x2 microcontroller. In the video, to help clarity and to show what is being done, I don't use any keyboard shortcuts or ULP to accelerate anything and as a result this completed device takes longer to create than it would when using shortcuts and ULP. I'll cover how to speed the process up even further using these methods in a future blog article.

 

 

This concludes the third part of my new EAGLE tutorial series. Let me know what you think in the comments below and if you have any questions please feel free to ask!

 

Blog Series Reference
EAGLE Tutorial: Library Part Creation Part 1 - Creating Packages
EAGLE Tutorial: Library Part Creation Part 2 - Creating Symbols
EAGLE Tutorial: Library Part Creation Part 3 - Creating Devices
EAGLE Tutorial: Library Part Creation Part 4 - Advanced Packages and Package Variants
EAGLE Tutorial: Library Part Creation Part 4b - Supplemental worked example
EAGLE Tutorial: Library Part Creation Part 5 - Multiple Symbol Devices

 

UPDATE 2017-06-15: Added missing content from section 3.1. Obtaining the required data