Font Size

Screen

Profile

Layout

Direction

Menu Style

Cpanel

Belajar Pemograman Seven Segment

09 Mar 2010

Seven Segment

Penggunaan Seven Segment  di kehidupan sehari-hari banyak kita jumpai, misalnya Jam digital, peralatan digital, elektronik meter seperti frekuensi meter dan tampilan lainnya yang menampilkan bilangan numerik.  Bilangan numerik itu di hasilkan dengan cara mengatur on/off kaki-kaki (pin) Seven segment agar bisa menghasilkan bilangan numerik  yang kita inginkan. sebelum terlalu jauh membahas tentang seven segment, maka berikut akan di perlihatkan bentuk dari seven segment.

 

 

Gambar di sebelah kiri merupakan tampilan tiap segment dari seven segment. Untuk tiap tampilan segment di beri label dengan huruf a sampai dengan g. Sedangkan untuk titik di labeli dengan huruf dp.

 

 

Seven Segment Led

Seven segment ada 2 macam, yaitu Seven segment common cathode dan seven segment commond anode. Untuk Seven Segment Common Cathode terdiri dari led-led dimana semua katode di hubungkan menjadi satu. Lihat gambar berikut.

Sedangkan untuk Seven Segment Common Anode terdiri dari led-led dimana semua anode di hubungkan menjadi satu. Lihat gambar berikut.

Menampilkan angka 1

berikut akan di perlihatkan bagaimana caranya menampilkan angka 1 pada seven segment. Untuk Seven Segment Common Cathode, segment led "b" dan "c" di beri tegaangan 5V dan di pasang resistor 330 Ohm. Lihat gambar berikut.

Sedangkan untuk Seven Segment Common Anoda di lakukan dengan cara memberi tegangan NOL atau ground pada segment "b" dan "c" dan di pasang resistor 330 ohm. Lihat gambar berikut.

Pola input

Contoh di atas merupakan pola input untuk menhasilkan angka 1 pada seven segment. Jika ingin menampilkan angka 0 sampai dengan 9, maka pola inputnya berbeda-beda hal itu juga tergantung dari tipe seven segment. Untuk seven segment common anode pola inputnya kebalikan dari pola input seven segment common cathode. Lihat table berikut.

Untuk Common Cathode

Display Pola Input
 Numerik  dp g  f e d c b a Dalam Hex
 0  0  0 1 1 1 1 1 1  3F
 1  0  0 0 0 0 1 1 0  06
 2  0  1 0 1 1 0 1 1  5B
 3  0  1 0 0 1 1 1 1  4F
 4  0  1 1 0 0 1 1 0  66
 5  0  1 1 0 1 1 0 1  6D
 6  0  1 1 1 1 1 0 1  7D
 7  0  0 0 0 0 1 1 1  07
 8  0  1 1 1 1 1 1 1  7F
 9  0  1 1 0 0 1 1 1  67

Untuk Common Anode

Display Pola Input
 Numerik  dp g  f e d c b a Dalam Hex
 0 1  1 0 0 0 0 0 0  C0
 1 1  1 1 1 1 0 0 1  F9
 2 1  0 1 0 0 1 0 0  A4
 3 1  0 1 1 0 0 0 0  B0
 4 1  0 0 1 1 0 0 1  99
 5 1  0 0 1 0 0 1 0  92
 6 1  0 0 0 0 0 1 0  82
 7 1  1 1 1 1 0 0 0  F8
 8 1  0 0 0 0 0 0 0  80
 9 1  0 0 1 1 0 0 0  98

Interfacing dan Dasar Pemograman

Berikut  ini adalah contoh interfacing seven segment dan dasar pemograman menggunakan bahasa C

Interfacing

Program

#include<AT89X51.h>
unsigned char segment[10]=

{0xC0,0x0F9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0x80,0x98} ;

void delay();

void delay()
{
unsigned int i,j;
for(i=0;i<255;i++)
   for(j=0;j<255;j++);
}

main()
{
unsigned int i;
unsigned char x;
while(1)
{
for(i=0;i<10;i++)
{
 x = segment[i];
 P2 = x ;
 P0 = 0x7F;
 delay();
 P0 = 0xFF;
 delay();
 }
 }

}

 

Sorry ngantuk banget. Besok di lanjutin lagi.



Comments  

 
0 #11 freugg 2012-05-19 06:43
www.officialheatjerseyshop.com: http://www.officialheatjerseyshop.com, http://www.officialthunderjerseyshop.com: http://www.officialthunderjerseyshop.com, www.officialthunderjerseyshop.com: http://www.officialthunderjerseyshop.com, Air Max 2012: http://www.airmaxfreeshipping.com, http://www.airmaxfreeshipping.com: http://www.airmaxfreeshipping.com, http://www.bestchistore.net: http://www.bestchistore.net, Cheap Jerseys: http://www.cheapjerseyschina.biz, cheap vibram five fingers: http://www.vibramfivefingersale.com, www.vipmkoutlet.net: http://www.vipmkoutlet.net, Russell Westbrook Jersey: http://www.officialthunderjerseyshop.com, vibram five fingers: http://www.vibramfivefingersale.com,
Quote
 
 
0 #10 DawsonJack 2012-05-17 06:54
baidu
sina: http://www.sina.com
Quote
 
 
0 #9 New Era Hats 2012-05-16 16:11
Wholesale New Era Hats
I didn't think I New Era Snapback Hats played that bad NFL Snapbacks Hats: http://www.wholesalecheapsnapbackhats.com/snapbacks-hats-nfl-snapbacks-hats-c-6_64.html The final margin ended up Los Angeles Kings Snapback: http://www.newera-snapbackhat.com/los-angeles-kings-snapback-c-6_92_97.html being the fourth-largest in the history of the Oklahoma City Coach Handbags : http://www.wholesalehandbagsmarket.com/handbags-coach-handbags-c-744_750.html franchise, including its years in Seattle The Clippers had Ed Hardy Handbag: http://www.wholesalehandbagsmarket.com/handbags-ed-hardy-handbag-c-744_752.html missed two chances to clinch this series, including an eight-point lead in the fourth quarter Friday wholesale handbags online: http://www.wholesalehandbagsmarket.com/ nightChris Paul played with an aching
Quote
 
 
0 #8 linjinrong 2012-05-02 06:16
http://bezirksschule-zofingen.ch/drupal5/blog/546: http://bezirksschule-zofingen.ch/drupal5/blog/546, http://quotationsworld.net/blog/3418: http://quotationsworld.net/blog/3418, http://community.darpagameworld.com/blog/3912: http://community.darpagameworld.com/blog/3912, http://pgapi.devstaff.org/blog/5617: http://pgapi.devstaff.org/blog/5617, http://drupal.vimukti.com/blog/5576: http://drupal.vimukti.com/blog/5576, http://www.sitedaescola.com/elgg/pg/blog/hineswardjersey: http://www.sitedaescola.com/elgg/pg/blog/hineswardjersey, http://marsabit.kenet.or.ke/blog/10966: http://marsabit.kenet.or.ke/blog/10966, http://www.ethiotopia.com/community/blog/8657: http://www.ethiotopia.com/community/blog/8657
Quote
 
 
0 #7 burberry scarves 2012-04-28 08:01
Most easily with all kinds of color Louis Vuitton bags: http://www.louvoutlotzw.com/ with blue clothes and Louis Vuitton handbags: http://www.louvoutlotzw.com/ with blue clothing, whether Louis Vuitton outlet: http://www.louvoutlotzw.com/ is similar to the black?Louis Vuitton online: http://www.louvoutlotzw.com/ are relatively easy to match,blue Replica Louis Vuitton: http://www.louvoutlotzw.com/ have a good crunch to close the bodyis mad burberry outlet: http://www.bubrloutlot.com choice.
Quote
 
 
0 #6 zanexio 2012-01-06 18:01
itu interface 7 segment atas bawah. masalah kakinya ke samping atau atas bawah itu tidak masalah. yang penting cek kaki a,b,c,d,e,f,g dan COM. itu sama saja. Terima kasih telah mengunjungi zanexio.
Quote
 
 
0 #5 yeni 2012-01-06 08:51
materinya siiip...
mas mw tanya kalo yang di interfacing tu seven segment nya kaki nya kesamping ya, kalo yang kaki seven segment yang atas bawah bisa ga??
Quote
 
 
0 #4 Yanto 2011-12-20 06:28
Pak minta contoh ladder analog input plc mitsubishi.terima kasih
Quote
 
 
0 #3 ryo 2011-02-16 06:09
:-?: mas mnta tolong nich mas,,,,tolong kirimkan lewat email saya program tuk menampilkan bilangan bulat dan genap....pada win 8051...
Quote
 
 
0 #2 zanexio 2010-10-12 09:07
Terima kasih banyak atas commentnya. lanjutan dari materi ini adalah up down counter.silahkan baca, semoga bermanfaat
Quote
 

Add comment


Security code
Refresh

 

Latest Comments

  • www.officialheatjerseyshop.com: http://www.officialheatjerseyshop.com, http://www.officialthunderjer...
  • handmade oil painting canvas oil painting wholesale oil painting
  • baidu sina: http://www.sina.com
 

Tentang Training & Jasa

  • mau tanya,,kaLau saya mnta konsuLtasi ttg program assembler,,coun ter. pakai sensor infraRed dan Pho...
  • biaya training berlaku untuk 1 orang saja. sedangkan peserta training untuk private minimal 2 orang....
  • oia trus yg basic private biaya berapa? itu mulai dari dasar juga?
 

Tanya Bimbingan TA

  • Mas. kalau dari luar jawa cara bimbingan TA-nya gimana ? pengerjaannya butuh berapa lama ? harganya berapa ?
You are here: