I tried this and these connections...still midnight.
void lcdCommand( unsigned char cmnd )
{
LCD_DPRT = cmnd; // ready data lines
LCD_CPRT &= ~ (1<<LCD_RS); // RS low (lower line on the timing diagram)to select the Instruction register.
LCD_CPRT &= ~ (1<<LCD_RW); // RW low to write instructions.
delay_us(.020); // Delay 20 ns for address set-up time.
LCD_CPRT |= (1<<LCD_EN); // Enable pin high to latch data on the falling edge.
delay_us(.23); // Enable pin high for 230 ns to enable latching of instruction set.
LCD_CPRT &= ~ (1<<LCD_EN); // LCD_EN pin of PortB low after sending an instruction.
delay_us(.23); // Enable pin low for 230 ns after sending instruction set.
}
//*******************************************************
void lcdData( unsigned char data )
{
LCD_DPRT = data;
LCD_CPRT |= (1<<LCD_RS); // RS pin high (upper line on the timing diagram)to select the Data register.
LCD_CPRT &= ~ (1<<LCD_RW); // RW low to write instructions.
delay_us(.020); // Delay 20 ns for address set-up time.
LCD_CPRT |= (1<<LCD_EN); // Enable pin set to latch data on the falling edge.
delay_us(.23); // Enable pin high for 230 ns to enable latching of data set.
LCD_CPRT &= ~ (1<<LCD_EN); // LCD_EN pin of PortB low after sending data byte.
delay_us(.23); // Delay 230 ns between data sent.
}
Dave.


