SES, SEO, SEM, Linux and Microcontroller Help, News and Experience sharing Blog
"My PIC Microcontroller Articles are moved to http://picmicrochip.blogspot.com
Tuesday, March 17, 2009
Scrolling LCD Display in CCS C
Most popular 2 x 16 LCD Display HD44780 chipset have a display memory up to 40 charactors.
]Only 16 can display on a line. See the program for display the screen to the left or right shift operation .
#include <16f877.h>
#fuses XT,NOWDT,PUT,NOPROTECT,BROWNOUT,NOLVP
#use delay(clock=4000000)
#include "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 <>
{
backword_dir();
delay_ms(50); // scroll delay
}
for(i = 0; i <>
{
forword_dir();
delay_ms(50);
}
}
}
Labels:
Microcontroller,
PIC
Subscribe to:
Post Comments (Atom)
1 comment:
Sir i have error on ur program.. may u help me... error showed on
#include <16f877.h>
#fuses XT,NOWDT,PUT,NOPROTECT,BROWNOUT,NOLVP
#use delay(clock=4000000)
#include "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 <> //<--- Here
{
backword_dir();
delay_ms(50); // scroll delay
}
for(i = 0; i <> //<-- HERE
{
forword_dir();
delay_ms(50);
}
}
}
ERROR SAID ' A NUMERIC EXPRESSION MUST APPEAR HERE'
HELP ME
Post a Comment