Previous Page

Home

Next Page

 

Embedded Programming

Week 8

 

Assignment :

 


 

Micro-controller data-sheet :

 

Attiny44 Datasheet

 

 

 

 


 

Pin Codes :

 

In here six pin ISP cable is used to connected the micro-controller and programmer.

 

 

 


 

Programming :

 

I used Arduino to program my board. At the beginning I added the Attiny 44/84 library to the Arduino by using this URL

 

as shown below :

 

 

I opened Arduino , then File>Prefrences.

 

 

 

Then I pasted the url for the attiny library in the Additional Boards Manager URL’s text bar.

 

 


 

Problems :

 

Mistake : Board designed in week 6 had a mistake

 

 

The board I designed in week 6 had a problem which was that I forgot to label Attiny pin # 13 as shown above.


 

What I did :

 

 

I fixed the labeling issue by labeling pin # 13 and redesigned my board.

 

 

 

I rerouted again and the above was my final board.

 

 

 

Then I manually fixed the route of some parts of the design to minimize the risk of errors happening while soldering.

 

 

 

After soldering I had a couple of shorts which resulted in errors when burning the boot loader in Arduino. -F command that forces the compiler to neglect errors.


 

What I did again :

 

 

 

I changed the labeling in my schematic design , especially the switch. To try again to reduce the chances of errors.

 

 

Then I auto rooted the components and after auto-rooting , I manually fixed some of the roots to reduce the risk of having shorts while soldering which is the most difficult thing for me.

 

 

 

Above is my final board after soldering.

 

 

 

Finally I burned the boot loader successfully , as it shows in the blue ribbon down.


 

Programming :

 

 

I used the below code to program my board.

 

 

const int buttonPin = 3; // the number of the pushbutton pin

const int ledPin = 2; // the number of the LED pin

 

// variables will change:

int buttonState = 0; // variable for reading the pushbutton status

 

void setup() {

// initialize the LED pin as an output:

pinMode(ledPin, OUTPUT);

// initialize the pushbutton pin as an input:

pinMode(buttonPin, INPUT);

}

 

void loop() {

// read the state of the pushbutton value:

buttonState = digitalRead(buttonPin);

 

// check if the pushbutton is pressed.

// if it is, the buttonState is HIGH:

if (buttonState == HIGH) {

// turn LED on:

digitalWrite(ledPin, HIGH);

} else {

// turn LED off:

digitalWrite(ledPin, LOW);

}

}


 

Schematic File

 

Board File

 

 

 

Video Link

 

Previous Page

Home

Next Page