We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Below is the program for moving message on lcd.....ws not working on chip....if u can help me any modifications..it is for philips P89v51rd2fn lcd is jhd162a
#include<reg51.h> sfr lcd_data_pin=0x90; // port 1 sbit rs=P3^0; // Register select pin sbit rw=P3^1; // Read write pin sbit en=P3^2; // Enable pin
void delay(unsigned int msec) //delay function { int i,j; for(i=0;i<msec;i++) for(j=0;j<1275;j++); }
void lcd_cmd(unsigned char comm) // function to send command to LCD { lcd_data_pin=comm; en=1; rs=0; rw=0; delay(25); en=0; } void lcd_data(unsigned char disp) // function to send data on LCD { lcd_data_pin=disp; en=1; rs=1; rw=0; delay(25); en=0; }
void lcd_puts(unsigned char *s) // function to send string to LCD { while(*s!='\0') { lcd_data(*s); s++; } }
void lcd_ini() //Function to initialize the LCD { lcd_cmd(0x38); lcd_cmd(0x06); lcd_cmd(0x80); lcd_cmd(0x01); lcd_cmd(0x0C); } void main() { lcd_ini(); lcd_cmd(0x81); lcd_puts("HELLO"); delay(25); while(1) { lcd_cmd(0x1C); //Shift the entire display to right delay(50); } }
You have the Hardware and can not find the error. You expect other to just read it an find the Issue. What does "ws not working on chip" Mean? No Display? Check the contrast Boxes in row 1? The Init timing is wrong.