Hi everyone,
I am working on pic18f4523 and i want to interface lcd with mcu, but lcd is not working.
here is a simple code:
void main()
{
CMCON = 0x07; // turn off comparators
ADCON1 = 0x0F; // AD-Ports as digital I/O
ADCON0= 0x0; // AD-Converter module disabled
TRISB = 0x00;
lcd_config(&portd,4,5,6,3,2,1,0);
Lcd_Cmd(_LCD_CURSOR_OFF); // Cursor off
Lcd_Cmd(_LCD_CLEAR); // Clear display
Lcd_Out(1,1,"Hello World");
Delay_ms(1000);
do
{
Delay_ms(100);
PORTD=~PORTD;
}
while(1);
}
Can anyone please tell me, what is the problem actually?