Go Down

Topic: Serial trash (Read 960 times) previous topic - next topic

dl8rds

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

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

kg4wsv

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

-j

PaulS

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

What OS?

dl8rds

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

dl8rds

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.

dl8rds

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.

AWOL

#6
Oct 30, 2009, 12:10 pm Last Edit: Oct 30, 2009, 12:14 pm by AWOL Reason: 1
One variant of the Pro Mini has a lower clock speed than the 2009 - did you select the correct board in the IDE?

Quote
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!  ;)
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

dl8rds

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! :-))

dl8rds

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.

Go Up