microcontroller schematic and layout tutorial · pdf filemicrocontroller schematic and layout...

19
Microcontroller Schematic and Layout tutorial Note: This tutorial is modified from the original tutorial to bring it up to date for version 9.1 and to expand on some additional features that may be useful for ECE477 senior design students. The original tutorials are located at: http://www.people.vcu.edu/~rhklenke/tutorials/PADS/PADS_Tutorial_3.3V_ Reg/SimpleReg.html http://www.people.vcu.edu/~rhklenke/tutorials/PADS/PADS_Tutorial_New_Part/NewPart Type.html The purpose of this tutorial is to amplify on the new part and 5 volt tutorials and demonstrate a microcontroller schematic and layout. The Microchip PCB18F4550 USB device was selected because it has a number of interesting features and provides a broad coverage of the topic. 1. Create a custom user library Before creating your first new part type, you will need to setup a user library. This library will be saved to your network shared drive, allowing you to access it from any computer in the VCU School of Engineering. 1.1 Start PADS Layout. Select Start > Programs > Mentor Graphics SDD > PADS 9.1 > Design Layout and Routing > PADS Layout. The PADS Layout welcome screen should appear.

Upload: vucong

Post on 06-Feb-2018

239 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: Microcontroller Schematic and Layout tutorial · PDF fileMicrocontroller Schematic and Layout tutorial Note: This tutorial is modified from the original tutorial to bring it up to

Microcontroller Schematic and Layout

tutorial

Note: This tutorial is modified from the original tutorial to bring it up to date for version

9.1 and to expand on some additional features that may be useful for

ECE477 senior design students. The original tutorials are located at:

http://www.people.vcu.edu/~rhklenke/tutorials/PADS/PADS_Tutorial_3.3V_

Reg/SimpleReg.html http://www.people.vcu.edu/~rhklenke/tutorials/PADS/PADS_Tutorial_New_Part/NewPart

Type.html

The purpose of this tutorial is to amplify on the new part and 5 volt tutorials and demonstrate a

microcontroller schematic and layout. The Microchip PCB18F4550 USB device was selected

because it has a number of interesting features and provides a broad coverage of the topic.

1. Create a custom user library

Before creating your first new part type, you will need to setup a user library. This

library will be saved to your network shared drive, allowing you to access it from any

computer in the VCU School of Engineering.

1.1 Start PADS Layout. Select Start > Programs > Mentor

Graphics SDD > PADS 9.1 > Design Layout and

Routing > PADS Layout. The PADS Layout welcome screen should

appear.

Page 2: Microcontroller Schematic and Layout tutorial · PDF fileMicrocontroller Schematic and Layout tutorial Note: This tutorial is modified from the original tutorial to bring it up to

1.2 Open the Library Manager. Select File > Library...

1.3 Press the Create New Lib... button. In this case I have created a library

N:\Mentor\USB\USB_tutorial.pt9 so that the library resides in my network drive. Press

the Save button.

Page 3: Microcontroller Schematic and Layout tutorial · PDF fileMicrocontroller Schematic and Layout tutorial Note: This tutorial is modified from the original tutorial to bring it up to

1.4 Once you have created the new library, close the library manager.

Note: To access this library in future windows sessions: open the library manager and

press the Manage Lib List... button. Then press Add..., and select the

N:\Mentor\USB_tutorial.pt9 file.

2. Selecting a PCB footprint using the PCB Decal Wizard

We will now look for a PCB footprint for the PIC18F4550 microcontroller. The

relevant datasheet can be found here , page 408.

Definitions: QFP – Quad Flat Package; TQFP – Thin Quad Flat Package shown

below. Solderability of gull wing leads make it preferable for our applications

QFN – Quad Flat No-lead; TQFN – Thin Quad Flat No-lead shown below. Leads

under the chip make it difficult and in some cases impossible to align and solder with

the technology at our disposal.

Page 4: Microcontroller Schematic and Layout tutorial · PDF fileMicrocontroller Schematic and Layout tutorial Note: This tutorial is modified from the original tutorial to bring it up to

BGA – Ball Grid Array – Do not select these devices!! We cannot solder them here.

2.1 Open the PCB Decal Editor by selecting Tools > PCB Decal Editor. Select File

> Open Decal. The PADS Layout window should now look similar to the image

below.

Notice the directory location in the Library drop-down window. All the footprints, or

PCB decals, listed in the PCB Decals window are located in this directory. Scroll down

through the list until you find the decal named TQFP44 and click on it to bring up the

picture as shown below.

Page 5: Microcontroller Schematic and Layout tutorial · PDF fileMicrocontroller Schematic and Layout tutorial Note: This tutorial is modified from the original tutorial to bring it up to

2.2 While the picture looks similar to the one shown on the data sheet for the device,

you should check the measurements to be sure that it is the footprint you need against

the data sheet. In this case the pin-to-pin spacing, otherwise known as lead pitch is 1

mm. The pitch required for our device is 0.8 mm so this footprint will not do for this

device. Exit the Decal Editor.

Creating a custom footprint for the microcontroller

2.3 Select Tools > PCB Decal Editor. Select the Drafting toolbar icon then the

Wizard to open the Pin Wizards window. Select the QUAD tab and enter the data

as taken from the data sheet as shown below.

Page 6: Microcontroller Schematic and Layout tutorial · PDF fileMicrocontroller Schematic and Layout tutorial Note: This tutorial is modified from the original tutorial to bring it up to

2.4 Make the following changes:

Set Units to Metric as defined on the data sheet.

In the Decal area, select Horizontal and Vertical, typing 11 in the Pin Count

box.

Set the Origin to Pin 1 and Pin numbering to CCW.

Look at the D1 dimension on the data sheet. This represents the row-to-row

lead spacing. The corresponding setting in the Pin Wizard is Row pitch. Set

the Horizontal and Vertical spacing to 10mm and select Inner edge to inner

edge.

Pin width is nominally 0.37mm from the Lead width line on the data sheet.

Pin length is set to 1.5mm, based on the Foot Length dimension, to allow

sufficient exposed area to facilitate soldering.

Pin 1 is noted from the data sheet. Although the sheet places pin 1 at the

bottom left my personal preference is to place pin 1 at the left side top and as

you will note on page 5 of the data sheet this is the standard schematic

alignment.

Page 7: Microcontroller Schematic and Layout tutorial · PDF fileMicrocontroller Schematic and Layout tutorial Note: This tutorial is modified from the original tutorial to bring it up to

2.5 When the Pin Wizards window looks like the one above, press OK. You will now

return to the PCB Decal Editor which should look like the image below.

2.6 Save the PCB footprint to your user library. Select File > Save Decal. In

the Save PCB Decal to Library dialog, select your directory and decal name in the box

as shown below.

2.7 Press OK. When it asks if you want to create a new Part Type, click Yes, click

OK on the Part Information window, then press OK in the Save Part Type to Library

dialog box. For the time being ignore the warning messages.

2.8 To exit the PCB Decal Editor and PADS Layout, select File > Exit Decal

Editor to return to PADS Layout. Then select File > Exit to close PADS

Layout.

Page 8: Microcontroller Schematic and Layout tutorial · PDF fileMicrocontroller Schematic and Layout tutorial Note: This tutorial is modified from the original tutorial to bring it up to

3. Create a schematic symbol using the Part Editor & CAE Decal Wizard.

We will now create a schematic symbol for the Microchip 18F4550 USB

microcontroller chip.

3.1 Open PADS Logic. Select Start > Programs > Mentor

Graphics SDD > PADS 9.1 > Design Entry > PADS

Logic. The PADS Logic welcome screen should appear.

3.2 Add your user library to the Library List. Select File > Library...

Then press the Manage Lib List... button.

Page 9: Microcontroller Schematic and Layout tutorial · PDF fileMicrocontroller Schematic and Layout tutorial Note: This tutorial is modified from the original tutorial to bring it up to

Press Add..., browse to your library and select the library where you stored the

PIC18F4550 pcb decal. You can move your library to the top of the list by pressing the

Up button.

After adding your user library, press OK and then close the library manager.

3.3 Open the Part Editor. Select Tools > Part Editor. The PADS Logic

window should now look similar to the image below.

3.4 Select File > New . On the Select type of editing item dialog, choose Part Type

and press OK.

3.5 Press the button on the toolbar to open the Part Information window.

Under Logic Family, select QFP.

Page 10: Microcontroller Schematic and Layout tutorial · PDF fileMicrocontroller Schematic and Layout tutorial Note: This tutorial is modified from the original tutorial to bring it up to

3.6 Select the PCB Decals tab and find the Library and PCB decal you have created.

Next, select the Gates tab. Click in the CAE Decal 1 field, type PIC18F4550 and press

Enter. Then press the OK button. Ignore the error message as this will be dealt with in

the next section.

3.7 Open the CAE Decal Editor by pressing the Edit Graphics button on the

toolbar. The Select Gate Decal dialog will pop up.

Press OK to continue. PADS Logic will display a warning stating that the selected

decal doesn't exist and will be created. Press OK.

Page 11: Microcontroller Schematic and Layout tutorial · PDF fileMicrocontroller Schematic and Layout tutorial Note: This tutorial is modified from the original tutorial to bring it up to

The CAE Decal Editor should now appear. Press the Decal Editing Toolbar icon, ,

to bring up the toolbar as shown below.

3.8 Start the CAE Decal Wizard. Press the CAE Decal Wizard button, , on the

Decal Editing toolbar to launch the Decal Wizard.

You are about to create the schematic representation of the device. This can be done in

two ways:

1. If you have previously worked out the input/output structure you can create a

symbol which shows the inputs on the left and the outputs on the right of the

box to illustrate product flow.

2. Use the device’s mechanical geometry for the symbol. This can be useful in the

PCB design process since the schematic can be used as the first approximation

to the actual board layout by arranging the peripheral components in positions

relative to their actual placement.

In this case we will use the 2nd

option.

3.9 Make the following changes:

In the Pin Spacing area, type 300 in the Horizontal box and 300 in the Vertical

box.

In the Left Pins area and Upper Pins area, set the Pin Count to 11.

In the Right Pins area and Lower Pins area, set the Pin Count to 11.

Page 12: Microcontroller Schematic and Layout tutorial · PDF fileMicrocontroller Schematic and Layout tutorial Note: This tutorial is modified from the original tutorial to bring it up to

When the specified values have been entered, press OK. The CAE Decal window

should now look similar to the one below.

Note: You may wish to zoom in and out on the decal while making changes to the pins.

Several methods may be used to zoom:

1. To enter zoom mode, press Ctrl + W. Use the left mouse button to zoom in and

the right mouse button to zoom out. Press Esc to exit zoom mode.

2. On a roller-button mouse you can also hold the roller button down and drag to zoom

in and out: drag up to zoom in and down to zoom out.

3. CTRL + scroll wheel will zoom in and out.

4. Roller button will pan up and down; Shift + roller pans left and right.

3.10 Name and Number the pins. Right-click in an empty area and select the Select

Terminals menu item. Double click on the left top pin. The Terminal properties

dialog will open.

Page 13: Microcontroller Schematic and Layout tutorial · PDF fileMicrocontroller Schematic and Layout tutorial Note: This tutorial is modified from the original tutorial to bring it up to

Type 1 in the number box and type RC7/RX/DT/SD0 in the Name box. Note that the

pins serve multiple functions; if you have defined the pin for a specific function then

you can label it as such to simplify the schematic. For now leave the terminal Type as

Load unless it is Power or Ground in which case set the Type appropriately. Press OK.

Time- and error- saving hint: If you have the data sheet page 5 up on a second monitor

you can cut-and-paste the pin names to the schematic

Page 14: Microcontroller Schematic and Layout tutorial · PDF fileMicrocontroller Schematic and Layout tutorial Note: This tutorial is modified from the original tutorial to bring it up to

To show a logical NOT bar on the name string for pin 18, use a back-slash to define

the limits of the bar. Typing \MCLR\/VPP/RE3 will make the name appear as

When you are done naming the pins the outline size may be modified by selecting the

Modify 2D Line icon, , and adjusting the box as needed, and moving the pins to

create a more readable symbol. The pins are not connected to the box outline so you

will need to adjust the box size then drag the pins to the periphery.

3.11 Save the schematic symbol. Select File > Return to Part. When

prompted to keep changes, press Yes. The Part Editor should now look like the part

above.

Click on the Edit Electrical icon, , and select the Pins tab as shown below. Some of

the pins may be duplicated as shown by the Number column. Click on the duplicate

pins at the bottom of the column and press the Delete Pins button so that the Part

Information box is as shown below. Click OK. Note that a partedit.err page comes up

reporting on duplicate pin names; this is not a problem since there are several Vss and

Vdd pins on the device.

Page 15: Microcontroller Schematic and Layout tutorial · PDF fileMicrocontroller Schematic and Layout tutorial Note: This tutorial is modified from the original tutorial to bring it up to

Select File > Save.

Select Tools > Check Part to make sure no errors or warnings are found. If none then

Select File > Exit Part Editor.

You can now use the microcontroller in your PADS Logic and PADS Layout designs. Click on

the Add Part icon and select the microcontroller.

Busses and off-page connectors

Grouping signal paths by type in busses is a common way to simplify schematics. Data, address

and control signals are routed about a schematic by means of busses. In this example we will

route a four-bit data buss, RD0-RD3.

First we create the buss by selecting the Add Buss icon and route it on the schematic as

shown below, using either Enter or right-click and Complete to terminate the buss.

Page 16: Microcontroller Schematic and Layout tutorial · PDF fileMicrocontroller Schematic and Layout tutorial Note: This tutorial is modified from the original tutorial to bring it up to

When prompted for a Buss Name enter RD[0:3] to identify the signals being routed through the

buss and place the buss name along the buss.

Select the Add Connection icon and click on the RD0 pin move the cursor over the buss and

click. An angle connection is added and you are prompted for a connection label as shown

below. Make sure that the connection label is correct and click OK.

Buss Extension

Suppose you add an LED indicator to RD0 through RD3 and need to extend the buss. Select the

Extend buss icon , click on the end of the buss you wish to extend and select Complete

where you wish to terminate it. Connections from buss to component pins are added as before,

taking care to label them properly.

Page 17: Microcontroller Schematic and Layout tutorial · PDF fileMicrocontroller Schematic and Layout tutorial Note: This tutorial is modified from the original tutorial to bring it up to

Off-page connectors

A circuit or system may need to be spread out over several pages due to its complexity or

division of labor within a team. A way of keeping the signals organized between pages is the use

of off-page connections. To do this using the buss illustrated above, begin by adding a

connection as before, but before terminating it right-click and select off-page from the drop-

down as shown below.

If necessary, right-click and select x-mirror and/or alternate to change the symbol as needed. The

Help on this symbol states “The default decal with the right pin is defined as a source pin; the

alternate decal with the left pin is defined as a load pin. This pin type orientation plays a role

when you create a hierarchical symbol of the sheet. All off-page sources are on the left of the

hierarchical symbol outline, and all loads are on the right. You can place the default or right-

click and click Alternate. Optionally, you can rotate or mirror the symbol by using the

appropriate command“.

When satisfied with the placement, click and attach the correct pin name.

Page 18: Microcontroller Schematic and Layout tutorial · PDF fileMicrocontroller Schematic and Layout tutorial Note: This tutorial is modified from the original tutorial to bring it up to

Schematic sheets are managed by clicking Setup > Sheets and using the Sheets window to name

and add sheets as shown. Sheet 1 has the microcontroller so we name it MICROCONTROLLER.

If we plan to have extensive I/O we might have another sheet named INTERFACE that another

team member may be working on.

We create the second sheet and add a connection as before, selecting off-page for the termination

and adding the corresponding net name to associate it with the MICROCONTROLLER sheet, as

shown below. The options offered in the Net Name drop-down box are the same as those

available from Sheet 1 since all sheets relate to the same project or design.

Page 19: Microcontroller Schematic and Layout tutorial · PDF fileMicrocontroller Schematic and Layout tutorial Note: This tutorial is modified from the original tutorial to bring it up to