You might wonder what is a Datasheet?
Datasheet is the biography and manual of any electronic component They explain exactly what a component does and how to use it. I do believe that before using any components you must read it's data sheet because it holds important information like Powr supply requirements, Pins Configurations and descriptions, Electrical ratings and Schematic of the IC circuit.
Lastly, I'll tell you what I've read before in a book called "Electronics for dummies 9 in 1" for the author Doug Lowe
He Said: "in datasheet you'll find every detail related to components starting from information you'll need as a hobbiest to information you'll need if you're a rocket scientist".
So I started by reading the ATTiny 44 datasheet, because I'll need it in programming to select the pins. My advice, this Spark Fun tutorial is more than amazing and made for beginners and describes who can a totally newbie get the utmost out of the datasheet.
First of all, the first page is one of the important pages for any component and probably might cause you to judge whether you'll continue reading it or not.
For instance,
Memory:
(2/4/8k) -------respectivley------> ATTiny (24/44/84)
Number of pins:
Operating Voltage:
we use usb port which provides 5V which's OK :D
Pin Configuration:
This's through hole components configuration
Surface mount configuration
You might wonder what's the differece between labels on the pins, and why most of them are separated into 2 categories "PA" and "PB".
These designations are important especially if you are programming with C language, as you'll be required to define the Ports and the data in it. In "Pins description" section you'll find a brief description about each pin.
Pins description:
Lastly, the further you go down the more detailed and technical you get exposed do and most hobbiests tend to use only 3 or 4 pages sometimes they only use the first page.
Before coding you must wire the FabISP and Hello Echo Board.
luckily this's not a hard job to do and here's how :
All you have to do is having either (Female-Female) jumpers or the specialized insulation-displacement contact (IDC) connector which's more neat and organized, especially because this circuit pins are already organized.
Female-Female Connector:
IDC Connector:
You have to connect the each pin header to its similar pin in the other board.
For Example:
V -----> V
GND ---> GND
MOSI --> MOSI
I followed this brilliant and descriptive tutorial for Highlow tech which I highly recommend.
First, you have to install Arduino IDE which's the platform we'll be using to program our attiny44 using ArduinoC language.
However, there's a tedious procedure you must pass through to get the IDE ready to upload on the ATTiny:
int LED = 8; // LED Pin. void setup() { // initialize digital pin (8)---> LED as an OUTPUT. pinMode(LED,OUTPUT); } // the loop function runs over and over again forever void loop() { digitalWrite(LED, HIGH); // turn the LED on (HIGH is the voltage level) delay(100); // wait for a second digitalWrite(LED, LOW); // turn the LED off by making the voltage LOW delay(100); // wait for a second }
int LED = 8; // LED Pin. int var = 0; // Variable variable made to control delay. void setup() { // initialize digital pin (8)---> LED as an OUTPUT. pinMode(LED,OUTPUT); } // the loop function runs over and over again forever void loop() { while ( var != 1000) { // While loop which waits for the condition to be FALSE (ex. 1000,1001,..etc) digitalWrite(LED, HIGH); // turn the LED on (HIGH is the voltage level) delay(var); // wait for a second. digitalWrite(LED, LOW); // turn the LED off by making the voltage LOW. delay(var); // wait for a second. var+=100; // Increments the variable (var) each time the loop works. } if (var == 1000) { // If condition acts as an automatic reset to the Variable (var). var = 0; //set variable (Var) value equal to 0. } }
int LED = 8; // LED Attiny Pin. int PB = 7; // Push Button Attiny Pin. int state = 0; // Variable for the Push button to store its value into. void setup() { // initialize digital pin (8)---> LED as an OUTPUT. pinMode(LED,OUTPUT); // initialize digital pin (7)---> PB as an INPUT. //INPUT_PULLUP uses the internal push up resistor. //when you don't have it in your hardware. pinMode(PB,INPUT_PULLUP); } // the loop function runs over and over again forever void loop() { state = digitalRead(PB); //reads the value of the PushButton pin, if (state == 0){ // If condition acts as a condition to either turn the LED ON or OFF ( "== 0" in our board) means if the condition is met. digitalWrite(LED, HIGH); // turn the LED on (HIGH is the voltage level) delay(2000); // wait for a second. } else { digitalWrite(LED, LOW); // turn the LED off by making the voltage LOW. } }