Arduino gibberish on serial port

Hi,

I’m having some issues with my 5 Volt Arduino. And it’s quite odd. The following sketch:

int count;

void setup() {
  Serial.begin(38400);
  count = 1;
}

void loop() {
  Serial.println(count);
  count++;
  digitalWrite(13, HIGH);
  delay(500);
  digitalWrite(13, LOW);
  delay(500);
}

It works great on my 3.3 Volt Arduino. But my 5 volt one only spits giberish out the serial port:

%ó¥Eø¥<ó¥óeEó%EóKFû%Fó¥Dù¥"ø¥ó¥:ó¥ó[Dû¥Eø%Eó¥>ó¥ó…8

I’ve double checked the baud rate on the serial monitor. I’ve also tried different baud rates in the sketch and the monitor. It does not correct the problem. I thought that maybe I broke my microcontroller or my FTDI. So I purchased new ones, and I am still having this problem. I also tried running this on a different computer. No such luck. I don’t get it. The serial port must be working because it loads sketches on without a problem. And it works fine with my 3.3 volt Arduino and FTDI connector. Any suggestions?

  • Chris

Hehe. Well, I figured it out. I never changed the board selection back in the programmer. So it was programming it for an 8Mhz chip, when it was actually running at 16Mhz. Doh! I won’t make that mistake again.

happicow:
Doh! I won’t make that mistake again.

Just FYI, you will make that mistake again. Probably quite a few times. But now you know where to start looking when you do, and hopefully it will take less time to figure it out the 2nd and 3rd and 458th time. :D