Most alphanumeric LCDs work on 5V, with a minimum of 3.7V for Vin_high. This means that to connect an XMEGA working on 3.3V to such a LCD there needs to be a level shifter between the two.
UPDATE: Fixed a small bug in the schematic; updated resistor values. It will work now even with a maximum XMEGA clock, not just at low frequencies.
I love to use Peter Fleury’s library for the HD44780 compatible LCDs. This library reads the busy flag and the status pointer from the LCD. This means that at some point there will be 5V on the XMEGA pins if the level shift isn’t bidirectional.
The schematic above uses common parts. Almost any low power MOSFET will work. The circuits in the upper left of the schematic are inverters made with N MOSFETs and pull-up resistors. There are two in series to keep the same phase at the output.
The octal bus driver 74HCT245 has a much lower Vin_high and can be interfaced directly with the XMEGA pins. The resistors on the An inputs form a voltage divider when the uC reads from the LCD. The values are selected to provide 3.31V output for a 5V input. You can use even 5% resistors for this.
EDIT: I reduced the resistor values to get more speed out of the circuit.