1. Introduction

 

This is the fourth part of my EAGLE Tutorial series, following on from EAGLE Tutorial: Library Part Creation Part 3 - Creating Devices. 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.

 

So far we have created our MSP430F22x2 library with just one package option, the TSSOP-38 (DA) package. If we look at the datasheet for the part we can see it's available in two other packages, a VQFN-40 (RHA), and a DSBGA-49 (YFF) package. For this tutorial we'll be looking at how to deal with package variants in EAGLE libraries so we'll start with creating the packages for the VQFN-40 and DSBGA-49. The process is similar to what we did in part 1 of this series but we will introduce additional techniques required to help building more complicated packages. If you haven't read that article or are unfamiliar with the process then I recommend you take a look there first before reading this article.

 

The datasheet for the MSP430F22x2 can be found on the TI website here:

 

http://www.ti.com/lit/ds/symlink/msp430f2232.pdf

 

2. Creating Additional Packages

2.1. Creating the VQFN-40 (RHA) package

 

Whilst the general principles for creating packages is the same as for the first package we designed, when creating very fine pitched devices like some QFN's and BGA's there are a few extra tricks required in order to get the device so that it works correctly when manufacturing a board. In the TSSOP package, the pads required were a standard rectangular shape and we relied on the solder mask (tStop) and paste mask (tCream) layers as defined automatically by EAGLE.

 

Taking a look at the datasheet linked above we can see we have the following drawing for the PCB footprint requirements:

 

MSP430_RHA.png

 

Looking at this image we have the following:

 

Top Left - This shows the copper pads required on the PCB.

Top Right - This shows the required solder paste stencil to ensure the device has the optimal amount of paste and reflows correctly.

Bottom Left - This shows the detailed sizes for the copper pads and the solder mask openings.

Bottom Right - This shows the thermal pad geometry and the suggested positioning of thermal vias.

 

You'll notice the required copper pads are not standard rectangular pads as the inside edge of each of these is round. There is also a large copper thermal pad in the middle which is not shown as a pin on the device symbol and this contains a number of thermal vias for connection to copper fills on adjoining layers for heat dissipation. Note in particular the thermal pad has paste in nine separate segments. This is to ensure that there isn't too much paste, its evenly spread and doesn't lead to air bubbles underneath pushing the device off as its reflowed.

 

As mentioned above, the procedure for creating this package is similar however, we need to do some more work to create the required copper pads, solder mask and stencil cutouts before we can create multiple pads and use the grids as we did previously to position them. This may seem overly complicated at first but once you get the hang of it then things become much more straightforward. We'll start by sketching out a drawing of just one pad with all the various dimensions marked up:

 

IMG_0905.JPG

 

The first thing we shall do is create the rectangular portion of the pad using as standard SMD pad as we did in the first part of this tutorial series. We have an overall pad size of 0.85mm wide by 0.28m tall with a 0.14mm radius on the round end. A quick bit of maths to subtract the radius of the round end reveals that the size of the rectangular portion of the pad is 0.71mm wide by 0.28mm tall.

 

SMD 0.71 0.28 '1'

 

After doing this we right click on it and go to the properties for the pad. Here we will uncheck the Thermals, Stop and Cream check boxes. This will give:

 

Creating Package RHA 1.png

 

Now, we need to add a polygon to this to enable us to create the pad shape. One thing to note is that the line width of the polygon has an effect on how accurate we can create the required shape. If we set it really fine (i.e. to 0) then we can get all the detail we need, but it will give DRC width errors and cause large gerber files. If we set the line width too thick then it will pass DRC but the footprint will be inaccurate and poor.

 

With a device with a footprint like this in your design are very likely doing a board with generally fine geometries so you'll likely be running DRC setting which would allow 4 mil track. If we set the polygon line width to 4 mil (0.1016mm) then we will avoid DRC errors when doing boards with these fine DRC setting but will still have pretty good accuracy on the pad.

 

Lets draw a polygon around the inside of the pad. The polygon points are the centre of the lines so in order to trace the existing pad accurately and keep just within its bounds we need to subtract 0.0508mm from each corner. The only exception to this is we want the line which sits at the end where the rounded edge will be to sit directly centred on the edge of the pad (all will become clear shortly!).

 

So what we'll do here is use the grid again as we did when we were drawing the package body outline in the first tutorial.

 

GRID MM 0.3042 ON; GRID ALT MM 0.0892;

 

With the Top layer selected we'll go ahead and draw our polygon with 4mil width.

 

POLYGON 4mil

 

And using the main and ALT grids we'll draw the polygon around the inside of the pad.

 

Next we need to move the right hand edge of the polygon so that is it centred on the edge of the pad. In this way in the next step, when we make rounded part of the custom pad it will start in the right place and give us a smooth curve of the correct radius. We make the curve by moving the centre point of the line to the point it would be in the curve. This is done by setting the grid to the correct size such that the centre of the line would pass through it on the x axis (y = 0). In the case of the copper pad the setting for this crossing point is 0.355mm + 0.14mm - 0.0508mm (or 0.442mm). We'll go ahead and set the grids up to facilitate these operations.

 

GRID MM 0.4442 ON; GRID ALT MM 0.0508;

 

Using the ALT grid, move the right hand edge of the polygon one grid space to the right.

 

Creating Package RHA 2.png

 

Using the main grid we will now turn the right hand edge into a smooth curve by selecting MOVE and then holding Ctrl (Cmd on macOS) before clicking and dragging the edge until it snaps to the grid point to the right.

 

Creating Package RHA 3.png

 

Now we need to repeat these actions for the solder mask aperture on the tStop later and the solder paste aperture for the stencil on the tCream.

 

For the tStop layer, the polygon needs to be 0.07mm larger than the pad all round so we will adjust our grids to be 0.07 greater that those specified above.

 

GRID MM 0.3742 ON; GRID ALT MM 0.1592;

 

Remember that again, the right hand edge needs to be centred on the edge of the pad so once you've draw it use the grids to move it left 0.07mm and then right again 0.0508mm (or just left 0.0192mm). Once done, create a curved edge the same as last time, this time with the grid set to 0.355mm + 0.14mm + 0.07mm - 0.0508mm (or 0.5142mm).

 

Creating Package RHA 4.png

 

Finally for the tCream layer, the polygon is 0.025mm smaller than the pad all round so we will adjust out grids to be 0.025 smaller than those specified for the copper pad above, again adjusting for the right hand edge being centred on the right hand edge of the pad. For the curved edge the grid setting will be 0.355mm + 0.14mm -0.025mm - 0.0508mm (or 0.4192mm). The three grid setup's required are:

 

GRID MM 0.2792 ON; GRID ALT MM 0.0642;

 

to draw the polygon around the inside of the polygon, and:

 

GRID MM 0.0758 ON;

 

to move the right hand line to be sat centrally on the pad edge, and:

 

GRID MM 0.4192 ON;

 

to create the curved end of the polygon. Once you've completed the above you should see the following:

 

Creating Package RHA 5.png

 

Once finished you should have a single pad centred on the origin (offset by the radius of the curve) which you can then group and use as the basis for creating the remaining pins as described previously. Be watchful of accidentally introducing offsets when rotating for the other 4 sides. In order to move the groups onto the appropriate locations the grid will need to be set up for the maximum copper to copper dimension of the device of 6.8mm / 2 - 0.355mm which is half the width of the smd pad and the distance from the origin to the straight edge.

 

GRID MM 3.045 ON;

 

After copying and duplicating the pins the result will be the following:

 

Creating Package RHA 6.png

 

Now we'll go ahead and add the thermal pad, remembering again to turn off Thermals, Stop and Cream in it's properties.

 

SMD 4.15 4.15 'PAD'

 

The grids can now be set for drawing a polygon on tStop 0.07mm larger than the size of the pad, again using a 4mil width. 4.15mm / 2 + 0.07mm - 0.0508mm.

 

GRID MM 2.0942 ON;

 

Go ahead and draw the 4mil polygon on tStop.

 

Now we need to set up for drawing the paste mask on tCream. The grid for drawing the central square is determined by 1.15mm / 2  - 0.0508mm (or 0.5242). We also need to set the ALT grid to the pitch between the squares as defined by 1.15mm + 0.3mm.

 

GRID MM 0.5242 ON; GRID ALT MM 1.45;

 

Draw the initial inner polygon of the 9 paste mask polygons around the origin. Now using the COPY command and the ALT grid create the remaining 8 polygons to complete the tCream layer. The result should look as follows:

 

Creating Package RHA 7a.png

 

Finally we'll add the package outline and orientation markers on tPlace and tDocu and also add the >NAME and >VALUE text as we did previously. Once you've added these you should have a completed footprint which looks like the following:

 

Creating Package RHA 8a.png

 

TIP: Once completed you can check the pads are the correct size and in the correct locations by adjusting the grids to the inner and outer pad dimensions as shown in the datasheet. From above we can see that the outer distance is 6.8mm and the inner distance is 5.1mm so if we set the grid first to 3.4mm and check the outside edge of all the external pads just touches the grid line and then second to 2.55mm and do the same for the inner rounded edge of all the pads.

 

2.2. Creating the DSBGA-49 (YFF) package

 

Useful blog from Mentor Graphics regarding BGA footprints:

 

https://blogs.mentor.com/tom-hausherr/blog/2011/01/08/pcb-design-perfection-starts-in-the-cad-library-part-9-bga-components/

 

I'm going to start this section by quoting from the above Mentor Graphics blog directly:

 

There are 2 types of BGA Ball Leads -

 

Non-collapsing – this is normally 0.5 mm pitch and smaller, where the Land (pad) is larger than the ball to allow for via-in-pad technology and provide an adequate annular ring. The solder mask can be the same size as the Land. In some cases the Land for fine pitch BGA’s is solder mask defined where the solder mask encroaches slightly over the land. This provides protection for any trace routing between the lands but the most significant benefit is to help secure the Land to the PCB. During cell phone “drop testing”, the BGA solder joint normally holds better than the land to the Prepreg. i.e.: drop tests prove that the non-solder mask land will rip from the PCB before the solder joint breaks. So the solder mask defined land is secured better to the PCB for drop testing.

 

Collapsing – this is normally 0.65 mm pitch and higher, where the Land (pad) is smaller than the Ball size to allow the Ball to collapse around the sides of the Land. This requires a non-solder mask defined Land where the solder mask must be larger than the Land.

 

They then go on to quote two tables and a figure for Non-collapsing and collapsing balls:

table-1-land-approximation-mm-for-collapsible-solder-balls.png

Table 1: Land Approximation for Collapsible Solder Balls from IPC-7351B

table-2-non-collapsing-bga-ball-land-calculations.png

Table 2: Non-Collapsing BGA Ball Land Calculations from IPC-7351B

 

figure-3-non-collapsing-bga1-520x196.png

Figure 1: Non-Collapsing 0.5 mm pitch BGA

 

From the datasheet for our part we see that we have a pitch of 0.4mm so from the description above we would think we are dealing with Non-Collapsing BGA balls. However, the ball diameter for the part is 0.25mm which from the description would lead us to believe we'd need to use 0.35mm pads going on the maximums. This is clearly wrong for a 0.4mm pitch part so let this be a warning to never assume anything when it comes to PCB land pattern generation and always check with the manufacturer if you are unsure. A little while and a lot of searching later I discovered this document:

 

https://e2e.ti.com/cfs-file/__key/telligent-evolution-components-attachments/00-693-01-00-00-51-94-57/WCSP_5F00_PCB_5F00_Design_5F00_Application_5F00_Note.pdf

 

Within this document we find all the information we need for creating our specific package:

 

WCSP_PCB_Design_49YFF.png

 

You can create this part just like we did above for the VQFN package. When creating the pads, you can create them with square dimensions and set the roundness to 100%. This will give you round pads.

 

When you copy your first pad/stop/cream group to make your first set of pads, do all the 1's first, i.e. A1, B1, C1 etc. You'll need to do a bunch of renaming to get the right. Follow the datasheet to ensure you get the correct letters and don't forget that certain letters are omitted (I, O, Q). Then when you copy the column you'll automatically get A2, B2, C2, ...., A3, B3, C3, ...., etc.

 

3. Adding Multiple Packages

3.1. Renaming the device

If we look at the datasheet for the part we can see a pattern for the part numbering with regard to the package style. If we ignore any R on the end denoting being supplied in bulk on a reel we can see that all the device names end in either DA for the TSSOP-38, RHA for the VQFN-40, or YFF for the DSBGA-49. EAGLE has the ability to substitute a package variant name in place of a ? within a device name so we shall use this feature to help us build up meaningful part numbers into the library part.

 

The first thing we need to do here is to rename the package to include the ? character in the appropriate location:

 

RENAME MSP430F22X2.dev MSP430F22X2?.dev

 

Note that we require the .dev on the end as there is both a symbol and a device with this name currently and without the explicit type identifier EAGLE cannot determine which you mean to rename.

 

3.2. Adding the additional packages

 

We'll now open up our renamed device. Either double click on it in the main library browser window or issue the following command:

 

EDIT MSP430F22X2?

 

We want the existing package to correctly populate the part number with DA so we need to rename the variant from the default '' to DA.

 

PACKAGE -'' DA

 

Note that the default variant name is two apostrophes ' and not a single quote ".

 

Now we want to also add our new packages to the device.

 

First for the VQFN-40 package with the command:

 

PACKAGE VQFN-40_6.0MMX6.0MMX0.5MM(RHA) RHA

 

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

 

Alternatively we can click on the 'New' button in the bottom right quadrant of the device window and select our VQFN-40 package in the resulting dialog and enter RHA in the Variant name field.

 

We'll repeat this again for the DSBGA-49 package we enter the command:

 

PACKAGE DSBGA-49_3.49MMX3.33MMX0.4MM(YFF) YFF

 

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

 

Alternatively we can click on the 'New' button in the bottom right quadrant of the device window and select our DSBGA-49 package in the resulting dialog and enter YFF in the Variant name field.

 

After adding the new packages we have the resulting device:

 

Package Variant Tutorial 1.png

 

You'll notice that we have the yellow warning symbol next to the YFF package variant. This is because we still need to map its pins which we will do in the next section. If you look where it says "Technologies" in the lower left quadrant you will see the device name is showing as MSP430F22X2YFF. Clicking on the DA variant and this will change to show MSP430F22x2DA.

 

3.3. Mapping the pins to the package

 

In the previous article we mapped pins manually with the CONNECT dialog box. This works well enough but can take a long time and required care to ensure errors don't creep in. Another way we can do this is to create scripts to automate the connections.

 

From part 2 when we created the symbol, in the process we created a text file with all the pin names for the symbol. We are now going to use that text file as a basis for our scripts. It may seem on the face of it that we are just swapping one manual effort for another and not saving on time. However there are several benefits for writing scripts to do this. Firstly, it's easy to visually check what we've done in a text editor and making quick changes to correct errors is quicker. If we need to remove and replace the package at a later date then we simply need to rerun the script. If we want to create similar devices or similar footprints within the device then it's a case of copying and editing one script to make another. In our example, If we were to want to create a set of library parts for the MCP430F22x4 then we only need to make a few minor changes to each script to change some pin names.

 

Lets go ahead and create scripts for all our packages (including the DA package from the previous articles. For this we'll be using the CONNECT command but the first thing we need to do in the script is ensure that the correct package is selected when we run it. To do that we first start with a PACKAGE command as follows:

 

PACKAGE DA;

 

The CONNECT command takes the form:

 

CONNECT  '<pad(s)>';

 

Where GATE is the assigned gate number in the device editor, PIN is the name of the pin in the symbol, and PAD is the number of a pad in the package. For example:

 

CONNECT G$1.AVCC '16';

 

For our DA package the script will be:

 

PACKAGE DA;
CONNECT G$1.AVCC '16';
CONNECT G$1.AVSS '15';
CONNECT G$1.DVCC '2';
CONNECT G$1.DVSS '4';
CONNECT G$1.P1.0/TACLK/ADC10CLK '31';
CONNECT G$1.P1.1/TA0 '32';
CONNECT G$1.P1.2/TA1 '33';
CONNECT G$1.P1.3/TA2 '34';
CONNECT G$1.P1.4/SMCLK/TCK '35';
CONNECT G$1.P1.5/TA0/TMS '36';
CONNECT G$1.P1.6/TA1/TDI '37';
CONNECT G$1.P1.7/TA2/TDO/TDI '38';
CONNECT G$1.P2.0/ACLK/A0 '8';
CONNECT G$1.P2.1/TAINCLK/SMCLK/A1 '9';
CONNECT G$1.P2.2/TA0/A2 '10';
CONNECT G$1.P2.3/TA1/A3/VREF−/VeREF− '29';
CONNECT G$1.P2.4/TA2/A4/VREF+/VeREF+ '30';
CONNECT G$1.P2.5/Rosc '3';
CONNECT G$1.P2.6/XIN '6';
CONNECT G$1.P2.7/XOUT '5';
CONNECT G$1.UCB0STE/UCA0CLK/A5/P3.0 '11';
CONNECT G$1.UCB0SIMO/UCB0SDA/P3.1 '12';
CONNECT G$1.UCB0SOMI/UCB0SCL/P3.2 '13';
CONNECT G$1.UCB0CLK/UCA0STE/P3.3 '14';
CONNECT G$1.UCA0TXD/UCA0SIMO/P3.4 '25';
CONNECT G$1.UCA0RXD/UCA0SOMI/P3.5 '26';
CONNECT G$1.A6/P3.6 '27';
CONNECT G$1.A7/P3.7 '28';
CONNECT G$1.TB0/P4.0 '17';
CONNECT G$1.TB1/P4.1 '18';
CONNECT G$1.TB2/P4.2 '19';
CONNECT G$1.A12/TB0/P4.3 '20';
CONNECT G$1.A13/TB1/P4.4 '21';
CONNECT G$1.A14/TB2/P4.5 '22';
CONNECT G$1.A15/TBOUTH/P4.6 '23';
CONNECT G$1.TBCLK/P4.7 '24';
CONNECT G$1.TEST/SBWTCK '1';
CONNECT G$1.RST/NMI/SBWTDIO '7';

 

For our RHA package the script will be:

 

PACKAGE RHA;
CONNECT G$1.AVCC '14';
CONNECT G$1.AVSS '13';
CONNECT G$1.DVCC '38 39';
CONNECT G$1.DVSS '1 4 PAD';
CONNECT G$1.P1.0/TACLK/ADC10CLK '29';
CONNECT G$1.P1.1/TA0 '30';
CONNECT G$1.P1.2/TA1 '31';
CONNECT G$1.P1.3/TA2 '32';
CONNECT G$1.P1.4/SMCLK/TCK '33';
CONNECT G$1.P1.5/TA0/TMS '34';
CONNECT G$1.P1.6/TA1/TDI '35';
CONNECT G$1.P1.7/TA2/TDO/TDI '36';
CONNECT G$1.P2.0/ACLK/A0 '6';
CONNECT G$1.P2.1/TAINCLK/SMCLK/A1 '7';
CONNECT G$1.P2.2/TA0/A2 '8';
CONNECT G$1.P2.3/TA1/A3/VREF−/VeREF− '27';
CONNECT G$1.P2.4/TA2/A4/VREF+/VeREF+ '28';
CONNECT G$1.P2.5/Rosc '40';
CONNECT G$1.P2.6/XIN '3';
CONNECT G$1.P2.7/XOUT '2';
CONNECT G$1.UCB0STE/UCA0CLK/A5/P3.0 '9';
CONNECT G$1.UCB0SIMO/UCB0SDA/P3.1 '10';
CONNECT G$1.UCB0SOMI/UCB0SCL/P3.2 '11';
CONNECT G$1.UCB0CLK/UCA0STE/P3.3 '12';
CONNECT G$1.UCA0TXD/UCA0SIMO/P3.4 '23';
CONNECT G$1.UCA0RXD/UCA0SOMI/P3.5 '24';
CONNECT G$1.A6/P3.6 '25';
CONNECT G$1.A7/P3.7 '26';
CONNECT G$1.TB0/P4.0 '15';
CONNECT G$1.TB1/P4.1 '16';
CONNECT G$1.TB2/P4.2 '17';
CONNECT G$1.A12/TB0/P4.3 '18';
CONNECT G$1.A13/TB1/P4.4 '19';
CONNECT G$1.A14/TB2/P4.5 '20';
CONNECT G$1.A15/TBOUTH/P4.6 '21';
CONNECT G$1.TBCLK/P4.7 '22';
CONNECT G$1.TEST/SBWTCK '37';
CONNECT G$1.RST/NMI/SBWTDIO '5';

 

For our YFF package the script will be:

 

PACKAGE YFF;
CONNECT G$1.AVCC 'C6 C7 D5';
CONNECT G$1.AVSS 'B7 C5';
CONNECT G$1.DVCC 'C1 C3 D4 E4 E5';
CONNECT G$1.DVSS 'A3 B1 B2 C3 C4';
CONNECT G$1.P1.0/TACLK/ADC10CLK 'F2';
CONNECT G$1.P1.1/TA0 'G2';
CONNECT G$1.P1.2/TA1 'E2';
CONNECT G$1.P1.3/TA2 'G1';
CONNECT G$1.P1.4/SMCLK/TCK 'F1';
CONNECT G$1.P1.5/TA0/TMS 'E1';
CONNECT G$1.P1.6/TA1/TDI 'E3';
CONNECT G$1.P1.7/TA2/TDO/TDI 'D2';
CONNECT G$1.P2.0/ACLK/A0 'A4';
CONNECT G$1.P2.1/TAINCLK/SMCLK/A1 'B4';
CONNECT G$1.P2.2/TA0/A2 'A5';
CONNECT G$1.P2.3/TA1/A3/VREF−/VeREF− 'F3';
CONNECT G$1.P2.4/TA2/A4/VREF+/VeREF+ 'G3';
CONNECT G$1.P2.5/Rosc 'C2';
CONNECT G$1.P2.6/XIN 'A2';
CONNECT G$1.P2.7/XOUT 'A1';
CONNECT G$1.UCB0STE/UCA0CLK/A5/P3.0 'B5';
CONNECT G$1.UCB0SIMO/UCB0SDA/P3.1 'A6';
CONNECT G$1.UCB0SOMI/UCB0SCL/P3.2 'A7';
CONNECT G$1.UCB0CLK/UCA0STE/P3.3 'B6';
CONNECT G$1.UCA0TXD/UCA0SIMO/P3.4 'G6';
CONNECT G$1.UCA0RXD/UCA0SOMI/P3.5 'G5';
CONNECT G$1.A6/P3.6 'F4';
CONNECT G$1.A7/P3.7 'G4';
CONNECT G$1.TB0/P4.0 'D6';
CONNECT G$1.TB1/P4.1 'D7';
CONNECT G$1.TB2/P4.2 'E6';
CONNECT G$1.A12/TB0/P4.3 'E7';
CONNECT G$1.A13/TB1/P4.4 'F7';
CONNECT G$1.A14/TB2/P4.5 'F6';
CONNECT G$1.A15/TBOUTH/P4.6 'G7';
CONNECT G$1.TBCLK/P4.7 'F5';
CONNECT G$1.TEST/SBWTCK 'D1';
CONNECT G$1.RST/NMI/SBWTDIO 'B3';

 

Running these scripts from within the device editor window will result in a completed device with all packages correctly mapped to pins.

 

Completed device 1.png

 

4. The Completed Multi-Package Device

 

For this video I have chosen to show how using the scripts facilitates rapidly creating a variant of the part. I'll create an MSP430F22x4 based on the MSP430F22x2 we've been creating in these first four tutorial parts. Firstly lets show all the scripts.

 

The script used to edit the pin names in the new copy of the symbol:

 

NAME P2.0/ACLK/A0 P2.0/ACLK/A0/OA0I0;
NAME P2.1/TAINCLK/SMCLK/A1 P2.1/TAINCLK/SMCLK/A1/OA0O;
NAME P2.2/TA0/A2 P2.2/TA0/A2/OA0I1;
NAME P2.3/TA1/A3/VREF−/VeREF− P2.3/TA1/A3/VREF−/VeREF−/OA1I1/OA1O;
NAME P2.4/TA2/A4/VREF+/VeREF+ P2.4/TA2/A4/VREF+/VeREF+/OA1I0;
NAME A6/P3.6 OA0I2/A6/P3.6;
NAME A7/P3.7 OA1I2/A7/P3.7;
NAME A12/TB0/P4.3 OA0O/A12/TB0/P4.3;
NAME A13/TB1/P4.4 OA1O/A13/TB1/P4.4;
NAME A14/TB2/P4.5 OA0I3/A14/TB2/P4.5;
NAME A15/TBOUTH/P4.6 OA1I3/A15/TBOUTH/P4.6;

 

The script for the DA package:

 

PACKAGE DA;
CONNECT G$1.AVCC '16';
CONNECT G$1.AVSS '15';
CONNECT G$1.DVCC '2';
CONNECT G$1.DVSS '4';
CONNECT G$1.P1.0/TACLK/ADC10CLK '31';
CONNECT G$1.P1.1/TA0 '32';
CONNECT G$1.P1.2/TA1 '33';
CONNECT G$1.P1.3/TA2 '34';
CONNECT G$1.P1.4/SMCLK/TCK '35';
CONNECT G$1.P1.5/TA0/TMS '36';
CONNECT G$1.P1.6/TA1/TDI '37';
CONNECT G$1.P1.7/TA2/TDO/TDI '38';
CONNECT G$1.P2.0/ACLK/A0/OA0I0 '8';
CONNECT G$1.P2.1/TAINCLK/SMCLK/A1/OA0O '9';
CONNECT G$1.P2.2/TA0/A2/OA0I1 '10';
CONNECT G$1.P2.3/TA1/A3/VREF−/VeREF−/OA1I1/OA1O '29';
CONNECT G$1.P2.4/TA2/A4/VREF+/VeREF+/OA1I0 '30';
CONNECT G$1.P2.5/Rosc '3';
CONNECT G$1.P2.6/XIN '6';
CONNECT G$1.P2.7/XOUT '5';
CONNECT G$1.UCB0STE/UCA0CLK/A5/P3.0 '11';
CONNECT G$1.UCB0SIMO/UCB0SDA/P3.1 '12';
CONNECT G$1.UCB0SOMI/UCB0SCL/P3.2 '13';
CONNECT G$1.UCB0CLK/UCA0STE/P3.3 '14';
CONNECT G$1.UCA0TXD/UCA0SIMO/P3.4 '25';
CONNECT G$1.UCA0RXD/UCA0SOMI/P3.5 '26';
CONNECT G$1.OA0I2/A6/P3.6 '27';
CONNECT G$1.OA1I2/A7/P3.7 '28';
CONNECT G$1.TB0/P4.0 '17';
CONNECT G$1.TB1/P4.1 '18';
CONNECT G$1.TB2/P4.2 '19';
CONNECT G$1.OA0O/A12/TB0/P4.3 '20';
CONNECT G$1.OA1O/A13/TB1/P4.4 '21';
CONNECT G$1.OA0I3/A14/TB2/P4.5 '22';
CONNECT G$1.OA1I3/A15/TBOUTH/P4.6 '23';
CONNECT G$1.TBCLK/P4.7 '24';
CONNECT G$1.TEST/SBWTCK '1';
CONNECT G$1.RST/NMI/SBWTDIO '7';

 

The script for the RHA package:

 

PACKAGE RHA;
CONNECT G$1.AVCC '14';
CONNECT G$1.AVSS '13';
CONNECT G$1.DVCC '38 39';
CONNECT G$1.DVSS '1 4 PAD';
CONNECT G$1.P1.0/TACLK/ADC10CLK '29';
CONNECT G$1.P1.1/TA0 '30';
CONNECT G$1.P1.2/TA1 '31';
CONNECT G$1.P1.3/TA2 '32';
CONNECT G$1.P1.4/SMCLK/TCK '33';
CONNECT G$1.P1.5/TA0/TMS '34';
CONNECT G$1.P1.6/TA1/TDI '35';
CONNECT G$1.P1.7/TA2/TDO/TDI '36';
CONNECT G$1.P2.0/ACLK/A0/OA0I0 '6';
CONNECT G$1.P2.1/TAINCLK/SMCLK/A1/OA0O '7';
CONNECT G$1.P2.2/TA0/A2/OA0I1 '8';
CONNECT G$1.P2.3/TA1/A3/VREF−/VeREF−/OA1I1/OA1O '27';
CONNECT G$1.P2.4/TA2/A4/VREF+/VeREF+/OA1I0 '28';
CONNECT G$1.P2.5/Rosc '40';
CONNECT G$1.P2.6/XIN '3';
CONNECT G$1.P2.7/XOUT '2';
CONNECT G$1.UCB0STE/UCA0CLK/A5/P3.0 '9';
CONNECT G$1.UCB0SIMO/UCB0SDA/P3.1 '10';
CONNECT G$1.UCB0SOMI/UCB0SCL/P3.2 '11';
CONNECT G$1.UCB0CLK/UCA0STE/P3.3 '12';
CONNECT G$1.UCA0TXD/UCA0SIMO/P3.4 '23';
CONNECT G$1.UCA0RXD/UCA0SOMI/P3.5 '24';
CONNECT G$1.OA0I2/A6/P3.6 '25';
CONNECT G$1.OA1I2/A7/P3.7 '26';
CONNECT G$1.TB0/P4.0 '15';
CONNECT G$1.TB1/P4.1 '16';
CONNECT G$1.TB2/P4.2 '17';
CONNECT G$1.OA0O/A12/TB0/P4.3 '18';
CONNECT G$1.OA1O/A13/TB1/P4.4 '19';
CONNECT G$1.OA0I3/A14/TB2/P4.5 '20';
CONNECT G$1.OA1I3/A15/TBOUTH/P4.6 '21';
CONNECT G$1.TBCLK/P4.7 '22';
CONNECT G$1.TEST/SBWTCK '37';
CONNECT G$1.RST/NMI/SBWTDIO '5';

 

The script for the YFF package:

 

PACKAGE YFF;
CONNECT G$1.AVCC 'C6 C7 D5';
CONNECT G$1.AVSS 'B7 C5';
CONNECT G$1.DVCC 'C1 C3 D4 E4 E5';
CONNECT G$1.DVSS 'A3 B1 B2 C3 C4';
CONNECT G$1.P1.0/TACLK/ADC10CLK 'F2';
CONNECT G$1.P1.1/TA0 'G2';
CONNECT G$1.P1.2/TA1 'E2';
CONNECT G$1.P1.3/TA2 'G1';
CONNECT G$1.P1.4/SMCLK/TCK 'F1';
CONNECT G$1.P1.5/TA0/TMS 'E1';
CONNECT G$1.P1.6/TA1/TDI 'E3';
CONNECT G$1.P1.7/TA2/TDO/TDI 'D2';
CONNECT G$1.P2.0/ACLK/A0/OA0I0 'A4';
CONNECT G$1.P2.1/TAINCLK/SMCLK/A1/OA0O 'B4';
CONNECT G$1.P2.2/TA0/A2/OA0I1 'A5';
CONNECT G$1.P2.3/TA1/A3/VREF−/VeREF−/OA1I1/OA1O 'F3';
CONNECT G$1.P2.4/TA2/A4/VREF+/VeREF+/OA1I0 'G3';
CONNECT G$1.P2.5/Rosc 'C2';
CONNECT G$1.P2.6/XIN 'A2';
CONNECT G$1.P2.7/XOUT 'A1';
CONNECT G$1.UCB0STE/UCA0CLK/A5/P3.0 'B5';
CONNECT G$1.UCB0SIMO/UCB0SDA/P3.1 'A6';
CONNECT G$1.UCB0SOMI/UCB0SCL/P3.2 'A7';
CONNECT G$1.UCB0CLK/UCA0STE/P3.3 'B6';
CONNECT G$1.UCA0TXD/UCA0SIMO/P3.4 'G6';
CONNECT G$1.UCA0RXD/UCA0SOMI/P3.5 'G5';
CONNECT G$1.OA0I2/A6/P3.6 'F4';
CONNECT G$1.OA1I2/A7/P3.7 'G4';
CONNECT G$1.TB0/P4.0 'D6';
CONNECT G$1.TB1/P4.1 'D7';
CONNECT G$1.TB2/P4.2 'E6';
CONNECT G$1.OA0O/A12/TB0/P4.3 'E7';
CONNECT G$1.OA1O/A13/TB1/P4.4 'F7';
CONNECT G$1.OA0I3/A14/TB2/P4.5 'F6';
CONNECT G$1.OA1I3/A15/TBOUTH/P4.6 'G7';
CONNECT G$1.TBCLK/P4.7 'F5';
CONNECT G$1.TEST/SBWTCK 'D1';
CONNECT G$1.RST/NMI/SBWTDIO 'B3';

 

Finally here is the video:

 

 

This concludes the fourth 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