Pages: [1]   Go Down
Author Topic: Serial trash  (Read 843 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

0
Offline Offline
Faraday Member
**
Karma: 8
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

-j
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 601
Posts: 48543
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

What OS?
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 290
Posts: 25770
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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!  smiley-wink
« Last Edit: October 30, 2009, 06:14:03 am by AWOL » Logged

"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.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Newbie
*
Karma: 0
Posts: 14
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: