I am using a Uno R3 to replace a blown single-chip processor in a logic board. I constucted a small board containing LEDs and buttons to simulate the connections on the older board, to allow be to develop and debug the software. I then developed a sketch to perform the required functions and got it going just fine. I then disconnected the simulator board and plugged the Uno into the older board, connecting a source of 12V DC to power it via the coaxial power connector. The board powers up fine, but the sketch does not run correctly. If I press one of the buttons on the board, the Uno resets. I am sure there is a simple explanation as to why it does not work, can anyone please help?
Your simulator is apparently not doing the same thing as the rest of the board.
How is it wired?
Could the +12v be getting to any of the pins on the Arduino? (maybe the buttons are wired so that pressing them connects them to +12v, or maybe they're pulled up to +12v?)
Thank you for answering. All the pins are interfaced on the older board, they had to be for the old processor which ran on 5 volts. All inputs and outputs are buffered and translated to 5 volt logic. All the buttons are input via opto-isolators.
Well, clearly something is different between the simulator and the actual hardware - I think you need to break out the DMM and start poking around to figure out what that is. I am doubtful that we will be able to figure it out without the hardware in front of us to make measurements on.
It seems implausible that it's a software problem since it works with your simulator (though there could be some latent flaw in the code - but you haven't posted it so we couldn't tell you what it is).
As you say, it is unlikely that the software is the problem. I wonder, is there any difference in the code start point when the USB interface is running, as against when it is not?
Geebax: Thank you for answering. All the pins are interfaced on the older board, they had to be for the old processor which ran on 5 volts. All inputs and outputs are buffered and translated to 5 volt logic.
The Uno runs on 5V anyway so you shouldn't need any level translation.