Langsung ke konten utama

Membuat Menu pada LCD dengan Proteus dan CVAVR


Buka Aplikasi proteus 8 lalu buat rangkaian seperti dibawah ini.


Setelah itu buka aplikasi CVAVR klik file dan pilih new. lalu pilih oke.


Setelah itu pilih project.


Pilih yes.

Setelah itu pilih seperti di bawah ini.


Lalu isi ports seperti di bawah ini



Dan pilih Alphanumeric LCD dan isi seperti di bawah ini.


Setelah itu isi codingan seperti di bawah ini
switch (shit)
      {
      case 1:
      lcd_gotoxy(5,0);
      lcd_putsf("MINUMAN");
      lcd_gotoxy(0,1);
      lcd_putsf("1. KOPI");
      lcd_gotoxy(10,1);
      lcd_putsf("2. SUSU");
     
      if (PINC.0==0) {delay_ms(10); lcd_clear(); shit=2;}
      else if (PINC.1==0) {delay_ms(10); lcd_clear(); shit=3;}
      else shit=1;
      break;
     
      case 2:
      lcd_gotoxy(1,0);
      lcd_putsf("1. Rp6000");
      lcd_gotoxy(1,1);
      lcd_putsf("2.Back");
     
      if (PINC.0==0) {delay_ms(10); lcd_clear(); shit=4;}
      else if (PINC.1==0) {delay_ms(10); lcd_clear(); shit=1;}
      else shit=2;
      break;
     
      case 3:
      lcd_gotoxy(1,0);
      lcd_putsf("1. Rp7000");
      lcd_gotoxy(1,1);
      lcd_putsf("2.Back:);
     
      if (PINC.0==0) {delay_ms(10); lcd_clear(); shit=4;}
      else if (PINC.1==0) {delay_ms(10); lcd_clear(); shit=1;}
      else shit=3;
      break;
     
      case 4:
      lcd_gotoxy(1,0);
      lcd_putsf("1.Beli");
      lcd_gotoxy(1,1);
      lcd_putsf("2.MENU UTAMA");
      if (PINC.0==0) {delay_ms(10); lcd_clear(); shit=5;}
      else if (PINC.1==0) {delay_ms(10); lcd_clear(); shit=1;}
      else shit=4;
      break;
     
      case 5:
      lcd_gotoxy(1,0);
      lcd_putsf("THANK");
      lcd_gotoxy(7,1);
      lcd_putsf("YOU");
      if (PINC.0==0) {delay_ms(10); lcd_clear(); shit=5;}
      else if (PINC.1==0) {delay_ms(10); lcd_clear(); shit=1;}
      else shit=5;
      break;
     

      }     

}

Menu pada LCD telah selesai. Selamat mencoba :)

Komentar

Postingan populer dari blog ini

MARRY YOU by: Bruno Mars

It's a beautiful night, We're looking for something dumb to do. Hey baby, I think I wanna marry you. Is it the look in your eyes, Or is it this dancing juice? Who cares baby, I think I wanna marry you. Well I know this little chapel on the boulevard we can go, No one will know, Come on girl. Who cares if we're trashed got a pocket full of cash we can blow, Shots of patron, And it's on girl. Don't say no, no, no, no-no; Just say yeah, yeah, yeah, yeah-yeah; And we'll go, go, go, go-go. If you're ready, like I'm ready. Cause it's a beautiful night, We're looking for something dumb to do. Hey baby, I think I wanna marry you. Is it the look in your eyes, Or is it this dancing juice? Who cares baby, I think I wanna marry you. I'll go get a ring let the choir bells sing like oooh, So whatcha wanna do? Let's just run girl. If we wake up and you wanna break up that's cool. No, I won't blame you; It was fun g...

Wowww

Hari ini 5 mei 2014!!! Pertama kalinya aku menginjak yang namanya kantor BK wkwkw. Lucu ya anak rajin kayak aku gini bisa juga alpa satu hari. Agak deg degan juga sih ya, biasanya kan anak rajin pasti masuk terus tapi akhirnya alpa juga. Sejujurnya aku bukan alpa. Tapi sakit, terus gak ada yang kasih tau sekolah dan akhirnya aku di alpa wkwkwkw. Aku ngerasa di kelas sebelas ini aku jadi lebih bandel. Seumur hidup aku belum pernah terlambat datang ke sekolah dan di kelas sebelas ini aku melakukannya. *Tepuk tangan* Di kelas sebelas ini aku punya target mau naikkin nilai ku yang di semester satu kemaren. Aku gak rela kalau nilai kimia ku turun lagi. Pas nilai semester satu di rapot nilai ku 90an trus pas mid kemaren cuman 80an aja. Hffftt nyesekkkkkk. Semoga nilai ku naik ya! Amin amin amin