Board Starduino using ATMEL AVR ATmega8 as mikrokontrolernya. Slightly different from the Arduino Duemilanove which has 6 PWM pins fruit, fruit Starduino only has 3 PWM pins. Arduino Duemilanove using the ATmega328. However, except for 3 pin PWM, the function of all pins is the same as the Arduino Starduino Duemilanove.
The following figure shows the pin numbers from each terminal on Starduino Board. The numbers correspond to the pin mapping I / O on the Arduino.
The following figure shows the pin numbers from each terminal on Starduino Board. The numbers correspond to the pin mapping I / O on the Arduino.
Pin terminals numbered 0-7 on the top of the digital pins, as well as pin numbers 8-13 on the bottom terminal. Digital pin 9, 10, and 11 can be used as an output a PWM signal.
Pin 0-5 (Analog In) is the analog input pins ADC0-ADC5 representing. Besides being used as analog input, these pins can also function as a digital pin with the name of A0-A5.
Use of this number is one of the advantages possessed by the Arduino concept. To utilize digital pin, Arduino has some special functions are very easy to understand and use. Here is an example of a simple program accessing digital pin.
void setup()
{
pinMode(7, OUTPUT); //pin 7 sebagai keluaran
}
void loop()
{
digitalWrite(7, HIGH); //pin 7 = HIGH
delay(500); //delay 500ms
digitalWrite(7, LOW); //pin 7 = LOW
delay(500); //delay 500ms
}
It's easy, so although we do not know the pin configuration of ATmega8, we can access these pins directly using the functions provided by the Arduino. Not only easy, Arduino functions have been used and tested by hundreds of thousands or even millions of people, so no need to doubt the quality of its programs.
No comments:
Post a Comment