Hi Peter,

I'm not sure what the problem is, but I ran your program on a 16F877a with all the LCD pins on PORTB, and everything worked fine.
Although, with the pinout you are using ... you don't really need the LCD_AnyPin program (the data bus is on RB4-7).


Name:  877a_AnyPin.JPG
Views: 4355
Size:  185.0 KB

For the config error, see this page ...
http://melabs.com/support/config_defaults.htm