Embedded Programming

week 9

Introduction

This week assignment is to read a microcontroller data sheet, program the board to do something. Compare the performance and development work flows for other architectures.

Microcontroller Data Sheet

For the moment there are two relevant data sheets, ATtiny 44 and ATtiny 45. I have going through some of chapter in the ATtiny 44 data sheet.

Eagle and the Hello-44 Board

As in week 7 I use Eagle to redraw the Hello-44 board. I change the board to contain a led and a button. Based on an idea from FabLab in Oulu, in addition to the button I put in a low pass filter, to kill peak voltages coming from any button operation.
I use the Eagle 8.6.3 premium.
To install the MIT fablab library, click on http://academy.cba.mit.edu/classes/electronics_design/index.html, circuits fba.lbr.). Right click on the fba.lbr and save link as, save it to he Eagle folder (I use c:/EAGLE 8.6.3/lbr/.
Now we set up the libraries. Please turn all the libraries off (On the main folder right click and select "Use none". Turn the fab.lbr on (select Use), and in the main (Managed Libraries) turn on the "supply1.lbr" and the "rcl.lbr" libraries (See Figure 1).
Figure1
Figure 1. Libraries management.

I start to create a project (File->New->Project). The projects are stored locally, C:/Users/jdu/Documents/eagle/.

Schematic

Now we are ready to begin the schematic creation. Select File -> New -> Project, which creates a new empty project.
Right click on the created project and select New -> Schematic. This opens the schematic view. In the schematic you can change the imperial units to standard units from, View -> Grid. In there you can select mm and show the grid to make view a little bit more clear (See Figure 2).
Clue: Set Display on and Stylt to Dots.
Figure2
Figure 2. Grid setting in Eagle.

The components are placed on shchematic by choosing Edit -> Add or by choosing Add from the side panel. Selecting that gives you a list of components which you can choose for your schematics.
Before we do that we will open the hello-board from the Fabacademy and make the same layout in EAGLE as Neal make the board.
Go to http://fab.academany.org/2018/schedule.html and select "electronics design" go to assignment and select redraw the echo hello-world board. Click on the board
Some explanation of the board picture. Green letters indicate what types of device. Note that XTAL1 stands for crystal but we will use a resonator (the two capacitors are included)
IC1 is integrated circuits. R1 is a resistor, C1 is a capacitor, J1 is the ISP pin header, and J2 is a jumper (from one board to an other board). The FTDI-cable support the board with power (VCC) and communicate with the computer (Tx and Rx).
Now we can select components from the libraries based on planned component list, double click on the component and place in on the schematic. If you want to delete a component from the schematic, mark it with the mouse and push on the delete button.
From the library we will select:

Now the schematic could lock like as shown in Figure 3 (Without VCC and GND)..
Figure4
Figure 4. How to select a component in the EAGLE schematic.

To move a component on the schematic you need to select and hold the red cross on the component image(see Figure 4).
Figure4
Figure 4. How to select a component in the EAGLE schematic.

Now you can move the component into a proper position.
From the side menu select line or Net to connect the components. Please follow the line from the board created by Neal.
Place labels: Alternative for line drawing from component to component. Draw a half line out from a component and put a label on it (give it a unique name). Do the same with the other component you want to connect. Define the name of the line/label.
For the Hello board we will put label on RESET.
Note if you want to connect two lines you have to use a junction.
Hint: VCC points up, GND points down.
The resonator connection is: 1 to XTAL1, 2 to GNS, and 3 to XTAL2 on the ATTINY44.
Connection all the component you board could look like the board on Figure 5.
Figure5
Figure 5. Hello-44 board.

Save your work.

Make the Board

To create a board select "Generate/switch to board" (See Figure 6), and select "Create from schematic".
Figure5
Figure 6. Switch to board.

Now you have to place the schematic inside the board line.
Hint: IC1 pin 1 upper left corner. Note that pin 1 is not all ways VCC.
Hint: ISP pin 1 upper right corner.
Now to re-arrange the line select "Route". Please change the setting of the lines (See Figure 6 and Figure 7). Select the grid line to 50 mil (1.27 mm) and then select the width to 0.36.
Figure7
Figure 7. Setting the route unit.

Figure8
Figure 8. Setting the route size.

Connect the Route from the middle of the pads. To delete the Route select Ripup from the side menu. Note you can use the Autorouter

Design Rules Settings

Select from the side meny (at the bottom) DRC (Design rule check)

Figure9
Figure 9. Design rules settings: Layers.

Hint: To be more precise with the draving change the setting in the grind set alt to 5, and use the alt = ALT button on the key board.
Hint:You can tweed the line a bit using the eye from the meny and change the line coordinates.
Hint: To continue a Route press alt on the key-board.
Figure 10 shows the final Hello-44 board. Now we have to put some extra components on it.
Figure9
Figure 10. My re-drawing af Neal Hello-44 board.

Extra Components

I want to put a led (with a resistor)to the IC1 and a bottom. Based on the idea from Oulu I want to put the button inside a low pas filter to compress any peak signal that will be connected to the operation of the button. From the library we will select:

Figure 11 shows how I connects the added components, and Figure 12 shows my version to the final board.
Figure11
Figure 11. The schemantic of the Hello-44 board with added components.

Figure12
Figure 12. My final Hello-44 board with added components.

The values of the components is: