Added code for atmega chip.