Go Down

Topic: Arduino Due - Serial speed? (Read 12 times) previous topic - next topic

Stan09


Coding Badly


Stan09

As I said above, MEGA accepts 2M, but it does not affect communication speed. Speed stopes raising ~ after 250000.
DUE with speed>250000 transmits garbage.

Coding Badly

As I said above, MEGA accepts 2M, but it does not affect communication speed. Speed stopes raising ~ after 250000.


There are two things at play...

1. With the new interrupt driven Serial, the sustained data rate will be lower (overhead of the interrupt service routine) than with the old blocking Serial.

2. The processor is only running at 16 MHz.  If your program is doing anything more than pumping data out the serial port it is unlikely you will get a sustained data rate much past 250K.  The highest sustained data rate I'm seeing is 463611 bits per second and the sketch does nothing but pump data.


Quote
DUE with speed>250000 transmits garbage.


Is an indication that there may be a problem with Serial on the Due.  I suggest you post more details so others can try to reproduce what you are seeing.

Stan09

#9
Nov 17, 2012, 11:22 am Last Edit: Nov 17, 2012, 11:24 am by Stan09 Reason: 1
very simple code:
Code: [Select]
int x;
void setup()
{

Serial.begin(250000);

randomSeed(analogRead(0));
  }
void loop()                 
{
     x=random(300);
     Serial.println(x);     
}


IDE 1.5
The board is connected through the programming port.
Putty shows correct list of numbers coming from virtual COM.

If you increase speed to, say, 252000 or even 251000, Putty shows garbadge.
I played for couple hours trying to find any combination of Arduino/terminal program speed settings >250000 which does not produce garbage, and I failed.
With Arduino MEGA same code generates correct transmission up to 2048000 May be even with bigger numbers, but I feel it does not make sense to go further, because it is not the actual transmission speed. It is just some correct handling of parameters, like, if speed>2500000 then speed=250000.

Go Up