Embedded Programming

For embedded programming, it is a follow up from the Electronics Design assignment. Using our machined hello boards, we were tasked to program the board to do something.

Since my hello board had an ISP header, I used the ISP programmer I made in Electronics Production and connected it to my laptop.
Before I could do any coding, I had to install the core library. The attiny core, made by Spence Konde has what I need.
To add the core, head to file -> preferences -> Additional Boards Manager URLs. In there, paste this link "http://drazzy.com/package_drazzy.com_index.json"
Once done, go to Tools -> Boards -> Board Manager. Wait for the new boards to load and select attiny core to install.


With that done, time to configure the IDE to suit my hello board. The main things to note is the board (attiny25/45/85), chip (attiny85), clock source and programmer (usbtinyisp).
Once done, burn the bootloader to program the board.

Using Mr Steven Chew's sample code, I programmed my board to have 3 functions.
For the first button press, the LED will light up indefinitely when the button is pressed once. Pressing the button a second time, the LED will blink at an interval of 500 milliseconds. When the button is pressed the third time, the LED will blink at an interval of 150 milliseconds.

Once done, verify the program and upload using programmer.
Here is how it works:
As the video size is too large, the video is under this Google Drive link. It is stored under the "Embedded Programming" section.