LCD dummy

LCD dummy ni bermaksud lcd yg sengal..haha..
Tulisannya  boleh gerak2..kekanan atau kekiri..

.

Contoh program…:-

#include <18F4550.h> // PIC18F4550 HEADER FILE                                                                           
#fuses HS,NOWDT,NOLVP,NOPROTECT

#use delay (clock=20M) // 20 MHZ CRYSTAL

#include <lcd.c> // LCD DISPLAY HEADER FILE

#define BUTTON1 PIN_B0 // PRESET BUTTON 1

#define BUTTON2 PIN_B1 // PRESET BUTTON 2

#define BUTTON3 PIN_B2 // PRESET BUTTON 3



#define LCD_E PIN_D0 // PIN E

#define LCD_RS PIN_D1 // PIN RS

#define LCD_RW PIN_D2 // PIN RW

#define LCD_D4 PIN_D4 // PIN D4

#define LCD_D5 PIN_D5 // PIN D5

#define LCD_D6 PIN_D6 // PIN D6

#define LCD_D7 PIN_D7 // PIN D7



void main()

{

while(TRUE) // always repeat program below

{

int a;

for(a=1;a<=16;a++)

{

delay_ms(1);

lcd_init();

delay_ms(1);

lcd_gotoxy(a,1);

delay_ms(1);  

lcd_putc("only for noob");     

}

}

}
 



Run the simulation..haha..see what happen.. 




Nngok abjad2 die akan trus berjalan sehingga colum yg terakhir berjalan2..





Popular posts from this blog

Relay

Pendahuluan: Proteus simulasi yg berguna

Electronic component:Resistor