AVR template code added. Not tested