The schematic editor window will open. The default name of the schematic is 'untitled.sch' and is stored under the project folder you just created. I will start by doing a 'Save As' and naming the schematic file Atmegaproject1.sch.


Figure 14.4

Let's start by inserting our main component on the schematic, the Atmega16. Click on Library then Use.


Figure 14.5


A window opens displaying all of the library files currently available to the editor. For the Atmega chip, we will select the atmel.lbr by double clicking the file. The window will immediately close and you will again see the schematic page. Selecting a library file loads all of the devices within the file for you to use while reducing the number of components to sort through by not loading any of the library files you do not select. Sometimes you may have to look through several files before determining where the components you want are located.


When the file is loaded, click the add button.


Figure 14.6


A list of the loaded parts is displayed. Click the plus symbol next to atmel and go down to the Atmega161. Click the plus sign next to the Atmega 161 and choose th TQFP Atmega161A option. While we are using the Atmega16, not the 161, the pin layout is the same for the TQFP design as far as the pins we will be using.




Figure 14.7


Click OK and the screen will disappear and you will be moving a schematic representation of the microcontroller around the schematic page. Wherever you click, a microcontroller will be pasted. If you click too many times, just delete the extra components by selecting the delete icon and clicking on the undesired components.


Figure 14.8

Perform the same operation to add the four switches. The switch I used is located in 'switch-misc', DT, DT6. The placement on the schematic is at your discretion. The schematic does not need to look like the final board. In fact, laying out your components in a logical order in the schematic drawing will help you follow your circuit.


Figure 14.9


Now add the LEDs, resistors, capacitors, and the voltage regulator. Also, you will need to add holes to solder the positive and negative inputs to the board. The component locations in the libraries are listed below.


LED 'led', 'LED', 'LEDCHIPLED_1206'

Resistors 'rcl', 'R-US_', 'R-US_R0805

Capacitors 'rcl', 'C-US_', 'C-USC0805'

Voltage Regulator 'linear', '78*', '7805DT'

Hole connectors 'solpad', 'LSP10'


You should have all of the necessary components on the board at this time.


Figure 14.10

Creating a Schematic