This week is dedicated to program the Helloboard done during the Week 6.
The Serial Peripheral Interface (SPI) is a synchronous serial communication interface specification.
It works in a Master/Slave configuration in order to exchange bits between systems.
SCLK: is the pin coresponding to the shared clock, since the communication is synchronised, we need to have a common time referential.
MOSI: stands for Master Out Slave In, basicaly it is the transmit pin.
MISO: stands for Master In Slave Out , the recieve pin.
SS1,SS2..: this specifies who the master is talking to, generaly by beeing pulled down .
The major features of AVRDUDE include:
Documentation can be found: here
Because I always forget them, this might be usefull:
And also the pins for the Attiny:
I decided to use the Arduino IDE to program my board
And precisely the ATtiny44:
I needed to tell to the IDE what clock am I using, this will modifie the bootloader accordingly (All the ATtiny chips have an 8Mhz internal clock) .
And also specifie what kind of programmer I was using (the USBtinyISP) :
From there everything was ready to burn the bootloader!
This is a common mistake (on Ubuntu OS), some times there are permissions issues with the serial ports, but no worries, I did found how to change that:
Typing "lsusb" shows all the USB interfaces, you obtain the port and the number of the device: "Bus 004 Device 010 ID..."
To change the permissions setting: " sudo chmod 666 /dev/bus/udb/004/010" (replace my values by yours)
Once the problem was solved I simply uploaded a Blink sketch to my board to test it ( after changing the pin 13 to pin 7!)
And then I modified a little bit to code so I could use my button (which is on pin 6 in my case):
And build a little laser cut casing with a 3D printed button:
I loved this assignment, compared to the Week 4 (FabISP) where I did things without really getting it, ths time things became clearer, I think that using both the Arduino IDE and a terminal gives a good understanding of the process.