If you prefer do it at Atmel side. repost question at "Programming Questions"
http://forum.arduino.cc/index.php?board=4.0