I'm trying to understand the new XMEGA range, in particular the XMEGA32-E5.
I'm using CodeVision AVR (version 3) and I'm trying to wrap my head around setting an interrupt on the timer overflow, something I've done many times with the old MEGA range.
What I want is to set a timer at say 1Mhz, and have it run a bit of code each time it overflows, so I get a bit of code run at regular intervals.
How do I do this?
Come to that, how do I setup an interrupt such that when a pin has a falling edge I can execute a bit of code. Again it doesn't seem obvious.
I am assuming these are related to the event system, but I'm a bit confused, so any example code/useful URLs would be very much appreciated.