At this time I have an lcd where I hook up a 1k resistor between contrast and ground. As the battery voltage drops, the text on the screen also fades. I could make a manual switch and switch between resistor values to compensate but I want something more automatic. My lcd is a stanndard 5v hd44780 display. Could I get away with a zener in which cathode connects to 5v and anode to contrast pin with resistor in parallel? If so, what values should I use for the resistors and diode connected to lcd contrast pin for optimal display output?
To straight up answer your question we would need a schematic of your existing setup. As an initial guess I would say that a zener in parallel with a resistor is not a suitable method. Zener diodes require a minimum amount of current to operate correctly and this needs to be factored in with the amount of current that the contrast pin can source, etc... It gets way too complicated for getting such a simple LCD display to function correctly.
The HD44780 LCD display can accept a voltage between 0V and 5V (inclusive) at the Vo pin to control the contrast of the display. The optimum voltage value is somewhere around 0.5V. There are a few methods of making this work:
1) Simply connecting the contrast pin to GND gives a workable display on the HD44780.
2) One resistor between Vo and GND as you have described. This does not allow you to adjust the contrast without swapping it out for a different value resistor however.
3) 10k potentiometer between the 5V rail and the Vo pin is a very popular method as it allows you to fine tune the contrast of the display. I suggest this method.
4) A PWM signal from a microcontroller (Arduino is the easiest method) or 555 timer connected to the contrast pin through a RC low pass filter to smooth out the changing voltage and give you a DC voltage between 0 and 5V.
Keep in mind that if you are using an Arduino (very common with the HD44780) then the 5V rail will not be affected by the battery level you are using to power it. The 5V an arduino produces is internally regulated until the battery level drops below ~4V.