WEEK EIGHT
-Embedded programming-
ASSIGMENT: Read a microcontroller data sheet program your board to do something, with as many different programming language and programming environments as possible extra credit: experiment with other architectures
1. Emma, our supervisor, gave us a class about arduino and its characteristics and also she introduced us the existence of C language. But the fisrt day we focused more in to Arduino language.
In order to program my Hello Echo board with the fabISP to do something, some steps needed to be done first:
Install Arduino IDE
Download the ATtiny files support for the board to be visible in the 'Tools > Board' list in the Arduino environment.
Install FTDI drivers and get FTDI cable for the serial communication
First we open Arduino as is the language we are going to use at first and after installing the files, you will see the ATtiny in your boards list and select: Board and processor:ATtiny 44; and then we select the right clock: External 20 MHz. And then we select the last option that says: Burn bootloader.
We are ready to click Burn the Bootloader. It means ready to program it.
What is a bootloader? "Microcontrollers are usually programmed through a programmer unless you have a piece of firmware in your microcontroller that allows installing new firmware using an external programmer. This is called a bootloader."
Program my hello world board using Arduino IDE
So we ca start programing our board. The code you have in arduino with all the orders is called a sketch (Arduino code).
The first sketch I did wastry to blinky the LED (in Examples>Basics>Blink). Looking at my board schematics and the ATtiny documentation, I changed the code so to match the right pin that the LED is attached to (7 in my case).
First ,I looked on my schematic of the hello echo board to see which is the pin of the LED and then find the write connection. (pin6= PA7).
Program my hello world board using C language
I have followed this three steps that I have download from the main page of the week assigment.
We open the Git Bash and we go inside the folder we have our new two files, c and make of our hello.ftdi.44.echo.
To go there trhought Bit Bash we must type the following: cd Desktop/, intro, cd C, pwd, ls
We type the first orange line and putting the right board. So like the following: make-f hello.ftdi.44.echo.c.make
We click intro
Then the second orange step (without tipying SUDO). The following: make -f hello.ftdi.44.echo.c.make program-usbtiny-fuses
We click intro
Then the second orange step (without tipying SUDO). The following: make -f hello.ftdi.44.echo.c.make program-usbtiny
We click intro
We open the serial monitor in order to see if it is doing something and it is correct. And once it is open we must select 4800 baud.
Files
Arduino code