In the calls I made of the delay function above you will have noticed that there are no numbers. Instead I write things like:

lcd_delay ( PUTCH_DELAY) ;

This is so that I can make my code more readable and flexible. Rather than put numbers in the calls of delay I have used #defined values which the pre-processor will insert for me. I can then indicate what the delay is doing by using an appropriate name and also easily change the value of the number if I change to a faster PICmicro. On the right you can see all the #defined values used in the LCD code.

Note that I have also used #define to indicate bit numbers and masks for use in the code.