Duemilanove continually resetting.

Hi,

I am using the the code on 5 volt (will post link later!)

to implement an IR receiver and RC5 decoder on a Roboduino (Duemilanove clone).

I have a TSOP2236 IR receiver/demodulator connected to pin8 of the arduino. Whenever I press a button on the remote it seems that the “setup” function is being called continually.

I added a “Serial.write(“Setup”)” to the function to confirm this - and then it occured to me that the serial activity may have been interfering with the interrupts - so I removed it and used the pin13 LED to confirm that the function was being called continuously.

Any data that is printed to the serial port by this program is also corrupt - which I am attributing to the reset.

One thought was that the watchdog timer was causing the reset - so I explcitly disabled this from the “setup()” function - but no improvement.

Does anyone know why this code might cause the arduino to constantly reset?

Mark.

Link to sketch :-

http://www.5volt.eu/wp-content/uploads/2007/12/remote_control_receiver.pde