Pages

Saturday, April 21, 2012

Using Compiler


#include <16f877.h>
#fuses XT,NOWDT,PUT,NOPROTECT,BROWNOUT,NOLVP
#use delay(clock=4000000)
#include "flex_lcd.c"


void forword_dir(void)
{
lcd_send_byte(0, 0X18);
}


void backword_dir(void)
{
lcd_send_byte(0, 0X1E);
}
void main() {
int a,i;


lcd_init(); //lcd initialize
lcd_putc("\f"); //lcd clear
// lcd memory can hold up to 40 characters 
lcd_putc(" http:// shibuvarkala . blogspot . com");


for(;;){
for (i=0;i<14;i++)
//for(i = 0; i <> )
{
backword_dir();
delay_ms(50); // scroll delay
}


for (i=0;i<14;i++)
{
forword_dir();
delay_ms(50);
}
}
}




// Above coding is for scrolling the text on LCD. With this example, we can adjust the code for our project. There are lot of example on internet for coded a PIC. Several link can be use for our study like http://www.edaboard.com/ to implement on project.

No comments:

Post a Comment