my atmel microcontroller is continuously reseting

A problem I had multiple times was: I reuse software from the internet, but when i use the software / simulate it, it is constantly resetting! The reason why this is happening is (or can be) undefined reset vectors. This means, the hardware raises an interrupt, which is not hadled by your software. Therefore, make sure that all interrupts which might occure are written in the software, like UART, ADC, etc. related interrupts! Sometimes you just need an empty interrupt service routine:

The avr-gcc compiler will default your missing vector to the reset-vector, as it is a sign of buggy code! Another approach is to us a “catch-all” interrupt vector

which catches all undefined interrupts.