Before creating the PCB,PCB design we must first draw up the circuit schematic. We will be working from a schematic This schematic will be simplified by removing the push-button switch on MCLR and replacing it with 5V and removing SW1 from pin A0. Let’s begin by starting the EAGLE Layout Editor and select File => New => Schematic. Now let’s start adding components to our schematic by clicking the Add button from the toolbar on the left.
When the Add window pops up, navigate down to the Microchip library and expand it. Then move down to PIC16F8* and upon expanding it, you will find the PIC16F84AP microcontroller. Select this component and hit OK. Place the component somewhere in your schematic window by left clicking the mouse.PCB design
after adding your last component click ESC, which will bring up the Add window again. Then select cancel to finish. Save your schematic when finished as pic16f84a.sch. Your window should now look like the one below.PCB design
To ensure that we are wiring to component pins and not leaving any wires suspended in midair, turn on the Pins layer. Go to View => Display/Hide Layers => Pins => OK. Next, select the Net function from the toolbar on the left and left-click on the OUT pin of the clock and then left-click on the OSC1 pin of the PIC16F84APCB design
you can use the Name tool to label resistor and capacitor values. Upon completion, your schematic should look like the one below. PCB design
Now that we have finished the schematic, we are ready to use the Board tool. From the schematic editor, click on the Board button in the top toolbar. Click Yes when prompted to create the board from the schematic. You should now see a window that shows the packages of all the parts from your schematic (with connections) and a large white rectangle (this is the outline of the PCB).PCB Design
Before moving any parts onto the board, we must first set the grid size. This will ensure that all of our parts are placed on the grid when moved. A good rule of thumb is to locate the part with the smallest pitch (distance between pins) and set the grid size to half of that. For example, the part on our board with the smallest pitch is the microcontroller (pitch = 100 mil or 0.1″). Therefore, our grid size should be set to 50 mil. To do this, click on the grid button in the top left of the Board window. Modify the grid pop-up window to look like the one below.PCB Design
Now that the grid is properly set, use the Move tool to place the parts inside the white outline. Once you have your parts neatly organized and in a confined area, you want to also shrink the size of the board. This can be done again with the Move tool by left-clicking on the edges of the PCB outline. When finished with this step, the board should look like the one below. PCB Design
One main advantage with any recently developed layout software is the autorouter function. This tool is used to automatically route all of the connections shown on your board. Before we start the autorouter, we must specify some design rules. Select Edit => Design Rules and then click on Sizes. Specifying the minimum width of each route will help increase the chances of a fully routed board when using the autorouter tool. This is especially important if you are working with surface mounted packages. This also is dependent on your PCB manufactures (e.g AP Circuits can only fabricate boards with a route width of 7 mil). For now, let’s keep this at 10 mil and click OK. Now we are ready to use the autorouter. Left-click on the autorouter button on the bottom of the toolbar at the left. You will be prompted with the window shown below. Be sure to match the Routing Grid selection with that specified earlier. Click on OK to begin the autorouting process. PCB Design
With more complicated boards, the autorouter will not be able to complete every single connection. The remaining connections are left up to the user to finish manually. Also, the router will sometimes layout connections with 90 degree angles. A good rule of thumb in PCB design is to have all routes bending at 45 degrees. To practice manually routing a connection, let’s first get rid of the connection that was created at 90 degrees. To do this, select the ripup button from the toolbar on the left and click on the two lines shown below with an arrow.
To route this connection manually, select the Route button from the toolbar on the left. To route at 45 degree angles, you must select the appropriate Wire Bend from the toolbar at the top (select the one that is second from the left _/). Also, you want to use a route that is the same width as the other traces on your board. Select the drop down bar next to Width and select 10 mil. Now, left-click on one end of the thin yellow wire on your board and move up to the other end of the yellow wire, while at the same time creating a connection of 45 degrees. Your new route should look like the one shown below. PCB Design
One last piece of useful information for laying out and routing your PCB is using vias. Vias are through-holes which connect routes on the top and bottom layers. To demonstrate their usefulness, lets delete the route we just created using the ripup tool. Again with the simplicity of this board, there was no need for vias, but let’s create a case where there would be. Suppose we want to create the connection shown below.PCB Design
Start by selecting the Route button from the toolbar at the left. And if we started out with a route on the Bottom layer (left-click the drop down box at the top left and select Bottom), we would create a short when passing over the first trace. However, if we created two vias, we could bypass this trace and finish our route.PCB Design
To finish this route we need to create two vias.PCB Design While in the middle of manually routing on the bottom layer, select the layer drop down box at the top left and choose Top. PCB DesignThis will automatically place a via at the specified location and will also change your route from the bottom to the top. PCB Design
The final step in completing your PCB design is to generate the Gerber files. These are the files used by companies to fabricate your PCB. I order PCBs from AP Circuits so this part of the tutorial will be tailored towards their requirements. The first step to creating your Gerber files is to start the CAM Processor by clicking the CAM button in the top toolbar.PCB Design You will see the following window pop up.