Embedded programming

In this assignment we are going to compare the performance between Arduino UNO board, Attiny44, attiny85.

Tools used

We are going to use the Arduino IDE for C and Arduino C programming and display the frequency on the oscilliscope.

The code

The code sets the pin as output and switchs the pin on then off in a loop
Test 1: Attiny85 @ 16.5MHz by Arduino C

We observed a frequency of 147 KHz which is very low. Our guess was that the Arduino libraries are making the switching slower.

Test 2: Arduino Uno @ 16MHz by Arduino C

We observed a square wave with a frequency of 149 KHz which is higher than the results of test 1.

Test 3: Attiny85 programmed by C and Arduino UNO programmed by C.

Now we programmed both boards using C language in which we access the registers directly and observed the difference. the difference is very high. now the frequency of both boards is above 2 MHz.

Attiny44 @ 20MHz

The frequency with arduino libraries is 19KHz meanwhile with C language is 413MHz.