TP 2 MODUL 1


1. Kondisi[Back]
Kondisi 2 Percobaan 13

Tampilkan angka 1,4,7 secara bergantian.

2. Gambar Rangkaian Simulasi[Back]
Rangkaian Kondisi 2 Percobaan 13 
 



Listing Program:
byte pin[]={2,3,4,5,6,7,8,9};
void setup() {
  // put your setup code here, to run once:
for (int i =0; i<9; i++)
{
  pinMode(pin[i], OUTPUT);
  }

}

void loop() {
  // put your main code here, to run repeatedly:
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
digitalWrite(9,LOW);
delay(1000);
digitalWrite(2,LOW);
digitalWrite(3,HIGH);
digitalWrite(4,HIGH);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
digitalWrite(9,LOW);
delay(1000);
digitalWrite(2,LOW);
digitalWrite(3,LOW);
digitalWrite(4,LOW);
digitalWrite(5,LOW);
digitalWrite(6,LOW);
digitalWrite(7,HIGH);
digitalWrite(8,HIGH);
digitalWrite(9,HIGH);
delay(1000);
}

3. Video Simulasi[Back]
    


4. Prinsip Kerja Rangkaian[Back]
Tegangan diumpankan dari kaki 5V ke kaki pin 2,3,4,5,6,7,8,9. Masing-masing kaki pin diteruskan tegangannya ke kaki pin seven segment DP, G, F, E, D, C, B, A. Lalu pada pin 2 di seven segment dihubungkan ke ground.

Agar sevent segment dapat menampilkan angka 1,4,7 secara bergantian maka dibutuhkan program listing arduino dengan cara, pertama membuat "byte pin[]={2,3,4,5,6,7,8,9};" berfungsi mendeklarasikan pin pada seven segment. "void setup()" berfungsi eksekusi semua kode sekali. lalu "for (int i =0; i<9; i++)" berfungsi melakukan perulangan dari 0 sampai kecil dari 9, dimana perulangannya maju. "pinMode(pin[i], OUTPUT);" berfungsi deklarasi pin sebagai output. "void loop() " berfungsi eksekusi semua kode secara berulang. "digitalWrite(2,LOW); digitalWrite(3,LOW);digitalWrite(4,LOW);digitalWrite(5,LOW);
digitalWrite(6,LOW);digitalWrite(7,HIGH);digitalWrite(8,HIGH);digitalWrite(9,LOW)
;delay(1000);" berfungsi menampilkan angka 1. "digitalWrite(2,LOW);
digitalWrite(3,HIGH);digitalWrite(4,HIGH);digitalWrite(5,LOW);
digitalWrite(6,LOW);digitalWrite(7,HIGH); digitalWrite(8,HIGH);
digitalWrite(9,LOW); delay(1000);" berfungsi menampilkan angka 4. "digitalWrite(2,LOW);
digitalWrite(3,LOW);digitalWrite(4,LOW);digitalWrite(5,LOW);digitalWrite(6,LOW);
digitalWrite(7,HIGH);digitalWrite(8,HIGH);digitalWrite(9,HIGH);delay(1000);" berfungsi
menampilkan angka 7.
5. Download[Back]
-File html download file
-File Rangkaian download file
-File Program download file
-File Video download file
-Datasheet Resistor download file
-Datasheet Arduino UNO download file
-Datasheet Keypad download file
-Datasheet Seven Segment download file
-Datasheet LCD download file
-Datasheet LED download file


Tidak ada komentar:

Posting Komentar

  BAHAN PRESENTASI UNTUK MATA KULIAH ELEKTRONIKA   2020/2021 OLEH: Muhammad Iqbal 2010951027 Dosen Pengampu: Darwison, M.T Referensi: 1. Rob...