Serial trash

I am trying to interface with my Arduino Mini Pro through a serial interface (what else... :slight_smile:

For this purpose, I have purchased two different types of connectors:

  • FTDI Basic Breakout 5V
  • ArduinoUSB/seriel Converter
    I can upload new code to the board successfully with both connectors.
    The code I am uploading is only some control stuff to let me know that the serial port works:

void setup()
{
Serial.begin(9600);
}

void loop()
{
Serial.println("dadada");
delay(1000);
}

When I want to see on the console what I'm getting back, I only get rubbish:

"
"""

"

1 bb1b"
b "
b
b1
<<<<<<
The Duemillanove works just fine. What can I do? Any ideas how to proceed? I'm quite desparate now, because uploading works, so the serial connection should be fine, but receiving does not work..

Greetings
Markus

Make sure the serial monitor speed matches the speed in Serial.begin().

-j

Is the serial baud rate in the serial monitor window also set to 9600?

What OS?

Yes, the serial speeds are correct and do match. 9k6 on both sides. That's not the cause.

OS is Linux (Ubuntu, Kernel 2.6.19...)
Some days earlier it worked, but I cannot figure out why it should not work now. And it's the same with two different Arduino Mini Pros.

Oh, I seem to understand. I am using IDE version 0016, and the Arduino is 5v / 16 MHz. So presumably the serial speed on the arduino is twice as high :-)) Let me check.

One variant of the Pro Mini has a lower clock speed than the 2009 - did you select the correct board in the IDE?

Yes, the serial speeds are correct and do match. 9k6 on both sides. That's not the cause.

I'll bet they're not and that it is the problem! :wink:

Yes, that's the reason. The crystal is the 16 MHz variant. So I have to pick the double frequency for the serial speed. Got it.

Thanks a lot for making me think! :-))

To be even more precise: This is the solution:
The IDE version 0016 only offers me to compile code for the 5v / 8 MHz. Though, the board clock is double speed.

So even if you write 9600 bit/s in the program, you need to pick the double serial speed, because the Arduino is simply double fast.