If you have USBasp programmer and you would like to program Xmega microconotrollers by Atmel, you need PDI programmer - convertor SPI to PDI. You find the process on this website. The program for PC is GUI4avrdude.
On this website is library - USART, SPI, I2C.