to do this week task i will use atmel studio and arduino ide to write the programs you can go to atmel studio download page clicking here in atmel studio we click on new, then project, then C/C++, then gcc c project, we select the folder and then we click on ok in atmel studio we write the next code we will write our code in the line below "/*replace with your application code*/" line DDRA will set the port "a" , every "1" will enable the bit in the port so, as we have 3 leds we will use 3 bits, we know which bits and port select thanks to the data sheet that will tell us the pin corresponding to each bit in the port. while (1){} will set a infinity loop that will execute the code inside the {} an infinity number of times. there is where we will write the code to set the leds on and off. PORTA =0b00000111; this code will tell the port to light the leds or to turn them off the "1" state is the led on and "0" state is off delay_ms (200); this line will set the delay time in milliseconds between each code execute so our eyes can see the leds flashdelay_ms (200); to write this code in arduino IDE we will use the blink code example and we will modify the port and delay to flash the 3 leds so this is the code
then we will select the folder where is placed the hex file writing cd and the folder address we will write "avrdude -c usbasp -p t44 -v" to test the communication between the programmer, the board and the microcontroller if everything is good we wil see the screen like the next image we will write "avrdude -c usbasp -p t44 -U flash:w:Blink.ino.hex" to write the hex file in the board. if everything is ok we will see the screen like in the next image you can download the atmel studio file clicking here
ABOUT ME
read a microcontroller data sheet program your board to do something with different programming languages and enviroments
here we can read the data sheet of the avr micrococntroller
in the datasheet we can see the pins configuration also that the microcontroller have a internal clock, analog inputs and outputs digital inputs and outputs, memory for the program thanks to this information we see that this microcontroller have all we need for our project. now i will describe you how i did my program in atmel studio in atmel studio we click on new, then project, then C/C++, then gcc c project, we select the folder and then we click on ok. in device selection we pick the attiny family and then we select the attiny 44A microcontroller
to get the hex file we compile the program and at the end of the screen we can find the address were arduino ide create the .hex file in this address this file is the one that we are going to program in the board once we compile the codes we get the hex file this file will tell the microcontroller how to work to write the hex file to the board we will use the icsp port and a icsp programmer i will use the USBasp v2 programer and avrdude runing in microsoft console if all is good soldered and well programed the board will work as we want.
ASSIGNMENTS
week eight embedded programing

/*

 * GccApplication1.c

 * Created: 15/03/2017 12:00:01 p. m.

 * Author : Xpere

 */

 

#include <avr/io.h>

#define F_cpu 1000000UL//1MHz

#include <util/delay.h>

 

int main(void)

{

    /* Replace with your application code */

 DDRA = 0b00000111;

 

    while (1)

    {

  PORTA =0b00000111;

  _delay_ms (200);

  PORTA =0b00000000;

  _delay_ms (200);

  PORTA =0b00000100;

  _delay_ms (200);

  PORTA =0b00000000;

  _delay_ms (200);

  PORTA =0b00000010;

  _delay_ms (200);

  PORTA =0b00000000;

  _delay_ms (200);

  PORTA =0b00000001;

  _delay_ms (200);

  PORTA =0b00000000;

  _delay_ms (200);

    }

}

void setup() {

  pinMode(0, OUTPUT);

  pinMode(1, OUTPUT);

  pinMode(2, OUTPUT);

}

void loop() {

  digitalWrite(0, HIGH);

  digitalWrite(1, HIGH);

  digitalWrite(2, HIGH);

  delay(200);

  digitalWrite(0, LOW);

  digitalWrite(1, LOW);

  digitalWrite(2, LOW);

  delay(200);

  digitalWrite(0, HIGH);

  digitalWrite(1, LOW);

  digitalWrite(2, LOW);

  delay(200);

  digitalWrite(0, LOW);

  digitalWrite(1, LOW);

  digitalWrite(2, LOW);

  delay(200);

  digitalWrite(0, LOW);

  digitalWrite(1, HIGH);

  digitalWrite(2, LOW);

  delay(200);

  digitalWrite(0, LOW);

  digitalWrite(1, LOW);

  digitalWrite(2, LOW);

  delay(200);

  digitalWrite(0, LOW);

 digitalWrite(1, LOW);

  digitalWrite(2, HIGH);

  delay(200);

  digitalWrite(0, LOW);

  digitalWrite(1, LOW);

  digitalWrite(2, LOW);

  delay(200);

}

we have to connect the isp cables to the board using the configuration of the image that we have on the left
FINAL PROJECT
you can go to arduino ide download page clicking here to run the console we will type windows key and r to execute cmd
you can download the arduino ide file clicking here
CONTACT
Carlos Pérez Ramírez