If you have access to an oscilloscope, take a look at the voltage coming off the regulator to see if it is steady and is at the voltage you are expecting.You say that you have 5V coming off your regulator, right? How do you know this? Measurement with a multimeter, oscilloscope, or just faith that the regulator is doing what you think it is doing? What kind of regulator is it anyway? 7805?
You say it keeps restarting, which propably meens that it is resetting.Put a 10 KOhm resistor from reset to 5V, and a 0.1 uF capacitor from 5V to ground as close to the tiny as possible.
1.1.4 RESETReset input. A low level on this pin for longer than the minimum pulse length will generate a reset, even if the clockis not running and provided the reset pin has not been disabled. The minimum pulse length is given in Table 21-4on page 165. Shorter pulses are not guaranteed to generate a reset.The reset pin can also be used as a (weak) I/O pin.
Thank you very much! I will try this!
Your AC/DC adapter is 6V and you're using an LM7805 to drop it to 5V. That's only a 1V difference, and the LM7805 is spec'd at a minimum 2V dropout voltage (the input must be 7V, minimum).