Arduino Mega 2560

Hello everybody! One short question: When I run the blink code on my Mega. The LED blinks first normal(one sec off, one sec on), but after 7-8 seconds LED turns on for 300-400ms and off the same time . And it happens twice or maybe more, but after it comes it is working well with one sec delay. So for better understanding: LED ON - 1000ms, LED OF - 1000ms, LED ON - 1000ms, LED OF - 1000ms, LED ON - 1000ms, LED OF - 1000ms, LED ON - 1000ms, LED OF - 1000ms, LED ON - 300ms, LED OF - 300ms, LED ON - 300ms, LED OF - 300ms, LED ON - 300ms, LED OF - 300ms, LED ON - 1000ms, LED OF - 1000ms, LED ON - 1000ms, LED OF - 1000ms, LED ON - 1000ms, LED OF - 1000ms..

Have I burn my Arduino? Thanks!

care to post the code?

void setup() {                
  // initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards:
  pinMode(13, OUTPUT);     
}

void loop() {
  digitalWrite(13, HIGH);   // set the LED on
  delay(1000);              // wait for a second
  digitalWrite(13, LOW);    // set the LED off
  delay(1000);              // wait for a second
}

I have all so tried code "blink without delay", it was the same failure.

v odd what are you powering it with? USB batteries?

USB

USB should be able to provide enough power don't suppose you have another mega you could try it with?

No, I don`t.. Could I burn out the chip? Maybe there are a test code for Mega?

I have changed the code to this. I have turn on Serial Monitor to see what happens in that moment. Nothing happened and the blink worked perfect more than 5 minute. Serial printed millis() from 0 to xxxxxx. Everything works well! But when I close Serial Monitor the code don`t work properly(the same story). It seems that the board resets by it self.

void setup() {                
  // initialize the digital pin as an output.
  // Pin 13 has an LED connected on most Arduino boards:
  pinMode(12, OUTPUT);
  Serial.begin(9600);  
}

void loop() {
  Serial.println(millis());
  digitalWrite(12, HIGH);   // set the LED on
  delay(500);              // wait for a second
  digitalWrite(12, LOW);    // set the LED off
  delay(500);              // wait for a second
}

Yes, the board resets by it self.. So I think problem is with power. I will try next to run it from battery.

possibly a broken USB cable? try another?

The LED blinks...

Which LED? The on-board one? Or one you have connected to pin 13?

Do you have anything running on your PC that might be going around and opening serial ports to see if they have certain devices attached? The usual problem is with bluetooth phone support...

Yes, the board resets by it self… So I think problem is with power. I will try next to run it from battery.

When the serial monitor is opened or closed, the Arduino will reset, this is normal.

Thank you for your replays! And so many attention! I have connected the board with battery and everything working just well! So the problem is with my PC or USB port/drivers.. And what is interesting the pc provides enough power to the board when Serial Monitor in arduino IDE is working. But when Seiral Monitor is turned off and board is just connected to PC via USB, it works not properly.. after 7-8 second it resets twice by it self.