à index

Reading the data sheet


This week, we have to program the hello board we did on the electronic design week, for the first time I will be writing software for hardware. I started by reading the datasheet of my attiny44.



I read the datasheet of the attinny44, and also informed myself on the purpose and caractheristic in microcontroller in general, and learn a few things. I did not understood everything, but it was very nice to learn more about the pinout of the chip and what everything is supposed to do.



I also learn that a microcontroller has a cpu with a fixed amount of RAM and ROM, both microcontroller and microprocessor serve the same application, wich is to run real time application program. The microprocessor differs from the microcontroller by the fact that it only contain a CPU, the other peripheral need to be added externally to make them functional. (ex: a computer contain a processor and is wired onto the Motherboard, externally we fixed onto the motherboard the RAM, the GPU and others things.)



Thats why a microcontroller is the best choice to run simple program, its a real compact version of a full functional computer, it's cheap and it only need itself to be fully functionnal.



Here we can see the diferent component that we found inside the chip. I don't know whats everything is supposed to do but we can see the 8-bit databus, an oscillator, some RAM, some registers (32) wich are all connect to the Arithmetic Logic Unit (ALU) that allow two independent register to be accessed in one instruction executed in one clock cycle, this architecture is more code efficient and achieve throughtputs 10 times faster tant a conventional microcontroller.

Also, I saw that the Attiny 45 as an integrated 8 MHz oscillator that makes the 20 MHz crystal on our fabisp not necessary. I also saw with my instructor Raphael that the arduino code does not corespond with the pinout from the Attiny 45, I then find this picture that illustrate how you should use the pinout of an attitiny on an arduino.

Programming my Hello Board


I use the Arduino IDE to program my helloboard, the interface of this IDE is really "noob" friendly and the community behind it is juste immense. So for me, a beginner who is on a deadline, it was a no-brainer to go with this IDE. ("The arduino IDE is a code editor with features such as text cutting and pasting, searching and replacing text, automatic indenting, brace matching, and syntax highlighting, and provides simple one-click mechanisms to compile and upload programs to an Arduino board.") As explained on the "wiki".

It support C and C++ language and using special rules of code structuring. It also provide a software library coming from the Wiring project. It is very similar from the software processing but is mamde for programming hardware such as sensor, microcontroller ans else while processing is made to create interactive interface and GUI.

All I wanted to do with my helloboard is a simple program that blink my led when I press the pushbutton. So looking at my board design I already know wich pin will be used in my code.

We know that I will use my physical pin 5 (pin 8 on the arduino IDE) for my LED, and the physical pin 10 (pin A3 on the arduino IDE) for my Button. « Go back to assigments page

« Go back to assigments page