Pages: [1]   Go Down
Author Topic: Valid baud rates for Duemilanove clone  (Read 609 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm having a Duemilanove clone with an pl2303hx chip for usb communication.

Which are valid baud rates for that chip in the Arduino IDE and on Linux? I need baud rates >= 500000, but only can get it working through 230400 (or i receive crap). The chip should support baud rates up to 6M.

Thanks
TheChief
Logged

Offline Offline
Edison Member
*
Karma: 9
Posts: 1016
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It also depends on the wires and the other device (is it to the computer ?) and the USB bus.
Inside a computer the USB port could be shared with other USB ports. This will reduce the maximum speed a lot.

Is the microcontroller a ATmega328P ? If that chip is too slow, the bytes still get transmitted but the gaps between the burst of data is getting larger and larger.

Is the data only being transmitted ? Or is a protocol used that waits for data to be able to transmit the next buch of data ?

Read also other posts about the maximum baudrate:
http://arduino.cc/forum/index.php/topic,98364.0.html
http://mekonik.wordpress.com/2009/03/02/modified-arduino-library-serial/

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
Just a simple sketch:

[code]
void setup() {
  Serial.begin(230400);
}


void loop() {
  if (Serial.available() > 0)
  {
      byte val = Serial.read();
      Serial.write(val);
  }
}

Results are ok, sending 8 bytes.

Code:
Received (after 0ms): 9C DA 00 03 63 60 3B 36
20ms waiting
Sending frame with 3 bytes
Received (after 0ms): 9C DA 00 03 49 0D 44 36
20ms waiting
Sending frame with 3 bytes
Received (after 0ms): 9C DA 00 03 5A 5F 1A 36
20ms waiting

Same procedure with 500k baud rate

Code:
Received (after 0ms): 9C DA 80 83 C9 8D C4 B6
20ms waiting
Sending frame with 3 bytes
Received (after 0ms): 9C DA 80 83 DA DF 9A B6
20ms waiting

First 4 bytes and last byte should always be the same, but with 500k i get different results.

The chipp supports the following baud rates:

75, 150, 300, 600, 1200, 1800, 2400, 3600,4800, 7200, 9600, 14400, 19200, 28800, 38400, 57600, 115200, 230400, 460800, 614400, 921600, 1228800, 2457600, 3000000 and 6000000, but this does not match 500k and 1M used in Arduino.[/code]
« Last Edit: February 05, 2013, 07:29:54 am by TheChief79 » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 9
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

No more ideas to drivethe chip with more than 230400 baud?
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


At a certain moment you can only use whole dividers of the clock speed as only then you can get the timing right over the 10 bits of a byte.

Note that if there is a inaccuracy of 10% you will fail at least one bit (draw a timing/sample diagram) and at higher speeds every cpu ccyle becomes a larger percentage..
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 212
Posts: 13531
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

BTW, Arduino supports far more baud rates when tweaked a little. See - http://arduino.cc/forum/index.php?topic=138497.0 -

I got the Arduino also working on 345600, 400.000 and 500.000 but only for small (<10 ) char bursts, mainly sending.

Teensy2.0 however has the fastest Serial IO I used so far (claims 12 Mbit IIRC)
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Pages: [1]   Go Up
Jump to: