Quote Originally Posted by xpa999 View Post
Define LCD_DREG PORTD
Define LCD_DBIT 8
This is part of your problem. If you are using a 4 bit bus, this would be either 0 or 4 - the starting bit of the D4 line. If an eight bit bus, it would be 0