simple programe for LCD, but not working.

Status
Not open for further replies.

mrauf57

New Member
Hi every one,

i am using MikroC pro. i m new here. the problem is that i wanna drive my LCD using 18F4550 by MikroC pro. here is the program but not working means not appearing the text i wanna print. Second thing is that just boxes in 1st and 3rd rows are glowing. can any body please help me to find the mistake i m doing here.

sbit LCD_RS at RD2_bit;
sbit LCD_EN at RD3_bit;
sbit LCD_D4 at RD4_bit;
sbit LCD_D5 at RD5_bit;
sbit LCD_D6 at RD6_bit;
sbit LCD_D7 at RD7_bit;
sbit LCD_RS_Direction at TRISD2_bit;
sbit LCD_EN_Direction at TRISD3_bit;
sbit LCD_D4_Direction at TRISD4_bit;
sbit LCD_D5_Direction at TRISD5_bit;
sbit LCD_D6_Direction at TRISD6_bit;
sbit LCD_D7_Direction at TRISD7_bit;
char *text;

void main() {
text = "mikroElektronika";
TRISD=0;
Lcd_Init();

Lcd_Cmd(_LCD_CLEAR);
Lcd_Cmd(_LCD_CURSOR_OFF);
Lcd_out(1, 1, text);
Delay_ms(4000);
}
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…