For this week assignment, we will have to program a board using the PCB  that we made last week using the CNC router. As well as document are progress along they way using are blog.

In addition we will have to use are programmer that we made in week 4, in order to program are PCB. Before we program are PCB, We first have to set up and connect are PCB and programmer into a MAC Which was available to us within the FAB lab (which has Arduino IDE already installed)

Setup

The programmer was connect to the MAC using a USB 2.0 extension cable. Where the PCB is hooked up to a power supply of 5v volts while making sure the wires VCC and GND on the FTDI are connected correctly. Finally connecting both the programmer and the PCB using a ribbon cable. Make sure that the ribbon cable is connected correctly:

Power supply:

Once set up correctly, we can now open up Arduino and begin.

We first want to adjust and load the correct setting that will be compatible for are PCB in Arduino. This is done by going into “Tools” drop down menu and selecting the right setting, as follows:

  • Board – ATtiny24/44/84
  • Processor – ATtiny44
  • Clock – External 20MHz
  • Programmer – USBtinyISP

Note: Make sure the power supply is on

Once we put the right setting, we now want to Burn the Bootloader. This is done by going into “Tools” drop down menu and selecting the “Burn Bootloader”

Before:

After:

Programming

We first want to test are PCB’s LED to blink, to achieve this, we did this by using an existing program within Arduino by going into “File” drop down menu and selecting the following:

  • Examples – 01.Basics – Blink

This will then open up a window which will contain and display the code that will make the LED on are PCB to blink. and it is are job to define which pin on the ATtiny44 communicates with the LED on are PCB in order for it to work using ARduino.

This was simply solved by looking at a diagram which maps out what each pin is and connected to on various chips. For example PB2 on the ATtiny44 is what communicates the LED on are PCB. Since we are using a Arduino to program it we will have to use 8.

Now we have to change everything that has “LED_BUILTIN” within the code to “8”. Once changed i then went and uploaded (does take a few minutes) on to my PCB.

Here the outcome:

Print Friendly, PDF & Email