There is no need to write your own delay functions for a HD44780 LCD driver, unless you are using an antique version of HiTech PICC (well before the Microchip buy-out) or a third party compier with broken or no delay functions.
Microchip XC8 (for PIC) __delay_ms(nn_ms), __delay_us(nn_us) and _delay(nn_Tcy) macros work as expected, provided their parameter is a compile-time constant (e.g. a numeric literal), _XTAL_FREQ is #defined correctly and the delay is less than the maximum limit given in the compiler release notes (currently 50,463,240 instruction cycles, which is over three seconds on the fastest PIC18 available). You can NOT use them for a variable delay, the delay will be extended by any interrupts that are serviced during it, and the delay will be rounded down to the nearest number of whole instruction cycles.
N.B. _XTAL_FREQ must be set to the core clock frequency in Hz, after any PLL multipliers etc. For a PIC16 at 20MHz you'd use:
#define _XTAL_FREQ 20000000UL
which needs to be visible to all source files that use the built-in delays so is probably best defined in a header you can use project-wide.
However there is a trap for young players in the HD44780 LCD controller datasheet: The execution time for each command is given for a nominal oscillator frequency of 270KHz, however the internal oscillator frequency is dependent on supply voltage and a resistor between HD44780 OSC1 and OSC2 pins, chosen by the LCD module manufacturer, so if you are using delays rather than polling the busy bit, its advisable to multiply the execution times from the command descriptions in the data sheet by a factor of 2.2 (to allow for the oscillator to be at its minimum frequency limit)