In my project, i am interfacing LCD with PIC18F452. It is working fine in proteus but not on bread board? 
I made a program in mikroC using LCD library .. is there some problem with using built in commads or i m using wrong port for LCD??
Please help me out .. here is the code of the program
I made a program in mikroC using LCD library .. is there some problem with using built in commads or i m using wrong port for LCD??
Please help me out .. here is the code of the program
Rich (BB code):
// LCD module connections
sbit LCD_RS at RD4_bit;
sbit LCD_EN at RD5_bit;
sbit LCD_D4 at RD0_bit;
sbit LCD_D5 at RD1_bit;
sbit LCD_D6 at RD2_bit;
sbit LCD_D7 at RD3_bit;
sbit LCD_RS_Direction at TRISD4_bit;
sbit LCD_EN_Direction at TRISD5_bit;
sbit LCD_D4_Direction at TRISD0_bit;
sbit LCD_D5_Direction at TRISD1_bit;
sbit LCD_D6_Direction at TRISD2_bit;
sbit LCD_D7_Direction at TRISD3_bit;
// End LCD module connections
void main()
{
TRISB = 0xFF;
PORTB = 0x00;
TRISC=0x00;
PORTC=0x00;
Lcd_Init();
Lcd_Cmd(_LCD_CLEAR);
Lcd_Cmd(_LCD_CURSOR_OFF);
Lcd_Out(1, 1, "Waiting..");
Delay_ms(100);
Lcd_Cmd(_LCD_CLEAR);
while(1)
{
Lcd_Out(1, 1, "Project");
}
}
Attachments
-
54 KB Views: 24
Last edited by a moderator: