MTK Android Based Phone IMEI Write Tool, DirecTV Now Launch Will Include Zero Rated Bandwidth on the Mobile Network, video entertainment product with a heavy mobile, Smartphone Apps Drive Content Usage, It will not surprise you that smartphones now are the ways most people interact with the Internet, Social Networking Web Server via Arbitrary Code Execution, Released Add New Method FOR Reset FRP Samsung

Tuesday, October 9, 2012

All New Displaying a Word or String in an 16x2 LCD with PIC16F877A and MPLAB X

All New Displaying a Word or String in an 16x2 LCD with PIC16F877A and MPLAB X - do you know that every day there are new gadgets that are created with new advantages to simplify your life, on the blog Gadget Center we will discuss about the latest gadgets and gadgets that have long ranging from speck and price, now we will discuss about All New Displaying a Word or String in an 16x2 LCD with PIC16F877A and MPLAB X we have collected a lot of news to make this article to be really useful for you, please see.

Articles : All New Displaying a Word or String in an 16x2 LCD with PIC16F877A and MPLAB X
full Link : All New Displaying a Word or String in an 16x2 LCD with PIC16F877A and MPLAB X

You can also see our article on:


All New Displaying a Word or String in an 16x2 LCD with PIC16F877A and MPLAB X

We have seen how to interface an LCD with PIC16F877A  . In this we are printing only a letter in the  LCD , now we are going to Display a string on the LCD  for this following steps are followed


First Create a MPLAB X project as in the steps for  Blinking a LED using MPLAB X , PIC16F877A

And check the  Interfacing LCD with PIC16F877A in MPLAB X  to know how to interface a LCD

Components
1.PIC16F877A micro controller
2. 2x16 LCD Display



we are using the following functions 



  • void delay(unsigned int msec) // Time delay function

  • void lcd_cmd(unsigned char item) // Function to send command to LCD

  • void lcd_data(unsigned char item) // Function to send data to LCD

  • void lcd_data_string(unsigned char *str) // Function to send data to string

  • void lcd(unsigned char str[10])




To display the string in  LCD , just call the below lines in main function


 lcd_cmd(0x01);
  lcd_cmd(0x86);
  lcd("STRING TO DISPLAY");


The functions are defined below 




void delay(unsigned int msec) // Time delay function
{
int i,j ;
for(i=0;i<msec;i++)
for(j=0;j<1275;j++);
}
void lcd_cmd(unsigned char item) // Function to send command to LCD
{
dataport = item;
rs= 0;
rw=0;
en=1;
delay(1);
en=0;
return;
}
void lcd_data(unsigned char item) // Function to send data to LCD
{
dataport = item;
rs= 1;
rw=0;
en=1;
delay(1);
en=0;
return;
}
void lcd_data_string(unsigned char *str) // Function to send data to string
{
int i=0;
while(str[i]!='\0')
{
lcd_data(str[i]);
i++;
//delay(10);
}
return;
}
void lcd(unsigned char str[10])
{
lcd_cmd(0x38);
lcd_cmd(0x0e);
lcd_data_string(str);
}



article titled All New Displaying a Word or String in an 16x2 LCD with PIC16F877A and MPLAB X has been completed in the discussion

hopefully information about All New Displaying a Word or String in an 16x2 LCD with PIC16F877A and MPLAB X can provide benefits for you in determining the gadget to suit your needs so much easier in living everyday life.

you just read the article entitled All New Displaying a Word or String in an 16x2 LCD with PIC16F877A and MPLAB X if you feel this information is useful for you and want to bookmark it or want to share it please use link https://mjoaobrum.blogspot.com/2012/10/all-new-displaying-word-or-string-in.html.

Tag :
Share on Facebook
Share on Twitter
Share on Google+
Tags :

Related : All New Displaying a Word or String in an 16x2 LCD with PIC16F877A and MPLAB X

0 comments:

Post a Comment