Retro CPC Dongle – Part 4

In my last post I evaluated the technical feasibility of memory timing in the expected architecture of the CPC dongle. I’m now confident that the key components that I’ve chosen will work for this project.  I now have to start getting the design into a design tool. This time I will take you through how to get the schematic and pin/pad layouts into your Electronic Design Automation (EDA) tool, such as DesignSpark from RS Components  so that you can produce something like this:

Image courtesy of Designspark

This step  is one of the critical steps in any electronics project, piecing together the components to achieve the outputs that you’re looking for. Even if you don’t intend to build the project yourself, when done properly, you can send these designs to fabrication and assembly labs who can put this device together for you.

A couple of notes about DesignSpark first. This is a first-class (IMHO) piece of software developed by the good folks at RS Components to allow you to develop your schematic diagram and automatically translate that to a set of PCB components and interconnections. It’s closely tied into the RS components web site and you can search for components right in the app. So if  you’re looking for a 10K resistor in 0805 size you can put in your requirements and it will return a list of components that suit.  You select a component from the list, it will download the specifications, the schematic symbol and the PCB footprint (the layout). All you have to do then, is drop the component onto your schematic and ‘wire it up’. Not only that, it will generate a bill of materials, meaning you can get a shopping list to send to RS for your components.  THEN it will allow you to directly place an order for the required components if you wish. This tightly integrated functionality is hard to ignore and RS have made it really easy to order from them. For this reason, the software is available at no cost – good for you RS!

Unfortunately, for our project some of the advanced components are not available as pre-defined footprints. So I will need to create these. The steps are:

  • Create the schematic symbol
  • Add the pins to the schematic
  • Create the PCB  footprint (where the copper pads go)
  • Link the pins in the schematic to the PCB footprint

As tedious as it sounds I will need to define every pin on every device that we’re using and link it to the corresponding pin on the schematic symbol. This is so that when I connect the VCC pin on the schematic to 3.3V, it will have a connection on the PCB layout to the 3.3V network (net).

There are many ways to create components and I have gone through the wrong ways to find the right ways, so I’ll share these with you here and save you the pain.

Review the Data Sheet

That’s right, first I need to read the data sheet, so that I understand if this is the right component as there are many different variants in a product line, each with different pin footprints. If we’re lucky, there’s a schematic symbol in the data sheet usually in the example application schematic. The FTDI FT2232H data sheet is an example of a manufacturers symbol on page 8 and page 51.

With most complex chips, you’ll need to come up with your own schematic symbol. The device we’ll work on is the 93LC66B, a flash chip holding the FT2232 interface configuration.

Open the DesignSpark Library

This is a screen grab from  my CPC2 design project. As you can see from the screen grab, I’ve already completed the design for the FPGA configuration and memory interface, but ignore these for now. We’ll look at those designs in a later post.

The red circle shows the icon you need to edit the DesignSpark libraries. Click this to open the library manager. I created a new library for my CPC2  components so that I can keep these all together. Remember the standard libraries get replaced when DesignSpark gets upgraded, so I’d recommend not amending the existing libraries. A side note, I also suggest copying all components that you need out of the standard library into your new library so that if you open the design file in a new version of DesignSpark, it won’t complain if components are missing. Use the Copy To button for this. But I get ahead of myself.

Here’s what we’re aiming for, the 93LC66B:

The two diagrams in the bottom right are the schematic and the PCB footprint.

Add a schematic symbol

Go to the schematic symbols tab and click ‘Add File’. It will open a new window to allow the structure of the schematic to be drawn and the pad placements to be located.

The structure is drawn simply with a few short lines and boxes:

Consider the size when you’re building these. For a small chip like this, 1CM by 2CM is reasonable on the schematic. Remember that if you don’t have a consistent sizing guide, adding different chips will look odd if they are not representative sizes.

The pads are placed on the end of the short lines, representing the I/O of the device. You can see these in the diagram above as the X on the end of the pin. The label N1 N2 and so on is the location of the pin label. These are important as you need to know which pin you’re connecting up in the schematic editor. I edit each pin to just show the pin name, not the number as the number is not helpful in the schematic. I recommend that you don’t use the net name for most pins as the net name can change as you merge nets or use unnamed nets that look odd on the schematic. The pin name is explicit and unchanging.

Make sure you leave enough space in the direction of the text for the full text of the pin name. The name will be defined later, we’re just defining the shape and location of the pins at this time.

When the shape is created, save the symbol and exit the symbol designer. You’ll have to click on the library icon again to go back and create a PCB footprint.

Add a PCB Symbol

This time, we’re adding the shape and location of the PCB pads into the library. Go back to the library and add a new PCB symbol.

This time, the sizes are dictated by the location of the pads on the chip:

A couple of notes on this. Place the pads on the diagram in the order of the data sheet, usually an anticlockwise pattern. Pin 1 is the first pin placed, so it usually gets set as the diagram origin, represented by the circle and cross above.

Page 14 of the data sheet shows the layout of the pins. The pad size is usually  recommended by the manufacturer in the data sheet, but in this case, I’m just using something a little larger than the pins. I’m using W0.43mm X L1.17mm. To make sure the pads are place correctly, I set the grid to be the pitch of the device. In our case 2.8mm in the X-direction and 0.95mm in the Y-direction. The manufacturer doesn’t always give you this information, so you need a little mathematics to calculate it.

In the diagram to the right,  the following apply:

E = 2.8mm, E1 = 1.63mm, p1 = 1.9mm

From this the pitch is easy, as it’s half of p1, 0.95mm.

The pad centers are more difficult to calculate. We can calculate the sum  of the pin length being E – E1 = 1.17mm. Each pin is therefore half  of this size, (E – E1) / 2 = 0.585mm. I want the pin to reach about half way along the pad, to allow for some wiggle during reflow soldering, so I’m using pads about twice the length of each pin exposure. I want the pad to sit next to but not under the package, so they need to be (E1) apart. DesignSpark  calculates the pads from their center, so if the pad is twice the length of the pin, then the centers need to be (E) apart.

Once the pads are placed, the package outline is added to the silkscreen layer and the entire file is saved.

Add a component

This is where the schematic and the PCB symbol are brought together. Go back into the library manager and add a new component – use ‘New Item’ on the component tab.

RS Components doesn’t sell this device in the SOT23 package, so the RS Number is not correct, but you need to enter something here.

Now the application presents a mapping of the schematic to the PCB footprint. For a simple device like this, we can enter the data manually:

As mentioned in the schematic section, the terminal name will be shown against each pin. I’ve also hinted the net name for VCC and VSS. Note that VSS is likely to be merged with GND in the final schematic, so it’s only a hint at component definition time.

The key columns are the Sch Terminal Number and PCB Symbol Pad Number. As you can see, the pins were defined in the schematic editor in a different order to the PCB editor, so they have to be mapped. Clicking on a cell in the table highlights the pad/pin in the preview on the right, so that you can see what you’re mapping.

The component pin name/number column is usually the same as the pad number column, unless you’re defining a BGA with a row/col naming. On a BGA pin 1 is usually name A1.

We’re finished defining this component, so if you’re following this guide you can save and close the library editor. I will take a moment to discuss a technique I used to define the pin/pad identifiers for the FPGA as this is a big more complex.

Defining FPGA Mappings

The FPGA PCB footprint is really simple, 16 rows and 16 columns of round pads 0.4mm diameter. If you place them into the editor in order, (A1, A2, A3 etc, then B1, B2, B3 etc) it will make the whole job a lot easier.

DesignSpark will allow you to paste data into this table from a spreadsheet, so I recommend you prepare this data in a spreadsheet first. Especially as you can’t save half-finished entries.  The data sheet will refer to the pin by row and column, yet DesignPark only numbers the pins. Using a simple formula will allow you to convert these:


Type the pin name into <cell> and the formula gives you the pin number. If you lay out your spreadsheet so that the columns are the same as the DesignSpark table, you can paste the information directly in and you’re done. The example below shows the mapping that I pasted into DesignSpark.

You can add multiple schematics to a single component to make the process more configurable. I created one schematic for each functional area of the Cyclone Device, configuration, jtag, power rails, gnd, etc. Include these using Add->Gate in the component editor. You can then wire these up separately. I’ll post the DesignSpark library files once I’ve proved them correct.

I’ll complete the design before I make the next post, as this will be on PCB routing.

Finally, apologies on the 3  month wait for this part. I had a baby and changed jobs, so time on my pet projects is limited! Never fear, this project will be finished!

In the next post, I’ll publish the schematics and PCB layout and talk through the process I followed to get to the initial board design for the fab house.


One thought on “Retro CPC Dongle – Part 4

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s