char *text = "Hello World";
void main()
{
CMCON |= 0x07; // turn off comparators
ADCON1 |= 0x0F; // turn off analog inputs
TRISA = 0x00;
TRISE = 0x00; // PORTB is output
TRISB = 0x00;
Lcd_Custom_Config(&PORTA,3,2,1,0,&PORTE,2,1,0); // Initialize LCD on PORTB
Lcd_Custom_Cmd(Lcd_CURSOR_OFF); // Turn off cursor
Lcd_Custom_Cmd(LCD_CLEAR);
Lcd_Custom_Out(1, 1, text);
PORTB.F2 = 1;
while(1)
{
Delay_ms(250); // One second pause
Lcd_Custom_Cmd(LCD_SHIFT_RIGHT);
PORTB.F2 = ~PORTB.F2;
}
}