This Thread has a Bascom program which demonstrates 3 methods for flashing an LED.
It uses a Delay in the Main Loop, it uses an Overflow interrupt, and it uses a Capture/Compare interrupt.
Welcome to the Forum.
JC
Edit: Are you using the Bascom Demo or the Paid Version? At least in the past only the paid version had Xmega support.
JC