Here is my tested and, I think, well commented code which works on my EasyPIC3 board at 8MHz with text LCD 2x16 with HD44780 controller and PIC18F4550.
Try it, change it and make it works better!
And, of course, share this better results with us.
Try it, change it and make it works better!
And, of course, share this better results with us.