1

I just finished testing a haptic device at university, and when I took it home I got the joy of finding the device not working. Here's what I can trace the problem to: when multiple pins are set to output (pin 2~11), pin 3 writes constantly to high and there is nothing I can do to make it stop.

Using a blinker program one pin at a time produces no problems, however when I run a blinker program that cycles through all pins, pin 3 is set to constant high. My actual code is similar in function but more complex. This program below though gets the same error.

void setup()
{
  for (int c =2; c<12; c++){
    pinMode(c, OUTPUT);
  }
}

void loop()
{  
  for (int c =2; c<12 ; c++){
     digitalWrite(c, HIGH);
     delay(100);
     digitalWrite(c, LOW);
     delay(100);
  }  
}

Is this a sign my arduino died? My device had been working for weeks on my prior code with no problem (and no updates).

  • That's a symptom that maybe just the MCU pin 3 is damaged. But it would help to know how your initial circuit (the one that may have caused the damage) and the blinking circuits were wired. Could you please post some schematics? – Ricardo Mar 5 '14 at 17:11
  • If your Arduino board holds the MCU in a socket (like the Uno), and you have a spare ATmega laying around, you can try and replace the MCU and test it again with your blinking program to see if pin 3 makes the LED blink. Just to check, you do have current limiting resistors between your IO pins and your LEDs, and you aren't (and weren't) drawing more than 20mA from each pin and 200mA overall from your MCU, right? – Ricardo Mar 5 '14 at 17:14
  • That's all assuming you're using ATmega's... – Ricardo Mar 5 '14 at 17:15
  • Or, if you don't have a socketed ATmega or an extra one lying around, you may want to acquire a whole other arduino and test with that to see if you can replicate the behavior. You don't necessarily need to buy the exact same model as the one you're experiencing the problem with, but that would be the best way to identify a problem with your code running on your original board. – Steve Cooley Mar 5 '14 at 18:54
  • 1
    @e2r2i2k2 Do you use your voltmeter directly between the pin and the ground? It's not the right way to measure a voltage, you should at least put a resistor between the pin and the ground. – jfpoilpret Mar 6 '14 at 4:07
1

It is probably a dead chip. Try getting a new ATmega chip for the Arduino (easily found online for ~$5) and see if that fixes it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.