9. Embedded programming¶
The assignment of this week is to learn how to program our own boards. 1.Reading a microcontroller datasheet. 2.Programming the board
Reading a microcontroller datasheet.
The board we programmed previous assignments contains an ATtiny45 which is a microcontroller.Before writing a program for the board i must understand it well and start programming it.
Microcontroller features
for more information click here
ATtiny45 pin Configuration. For the support information click here
Programming the board
For the programming of the board, i have used Arduino.Our circuit is based on ATtiny45,to program this board we followed this steps.
1.In Arduino go to file/preference/add url for attiny boards use the link here
2.Go to Tools/Boards/Boards manager and download attinycore
3.With this done, we set up the features to program an attiny45 as you can see in the image below:
-Board:ATtiny25/45/85. -procesador:ATtiny45. -Clock:internal 8MHZ. -Programmer:USBtinyISP.
Board:ATtiny 25/45/85
programmer:USBtinyisp(ATTinycore)
4.Time to program the board.
We connected every thing as in the image below checked the code Burned bootloader Upload code using the programmer done
The intent of this program is for turning ON the LED.
int LED = PB4;
int button = PB3;
void setup() {
pinMode(LED, OUTPUT);
pinMode(button, INPUT);
}
void loop() {
digitalWrite(LED, HIGH);
delay(1000);
digitalWrite(LED, LOW);
delay(1000); /
}
MY FILES
Here i am uploading the files that i have been making this week.