Go Down

Topic: Faster Serial (Read 2 times) previous topic - next topic


The fastest supported speed on the Arduino is 115200. ...

Note that the Arduino can send faster but the IDE is the limiting factor here. Switch to a (real) terminal program like putty.exe or ...

More see - http://arduino.cc/forum/index.php/topic,61381.msg444421.html#msg444421 -
Rob Tillaart

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


Thank you, Rob. That link contains good info and seems to confirm my interpretation of the Atmel 328P datasheet. I wonder if you would have any luck with a 1Mbit/s transfer rate since Atmel seems to indicate this as one of their 'legal' serial speeds. I plan on trying it out tonight...


FWIW, and that is probably purely academic, the Atmels are communicating fine via serial at 1Mbit/s.  XD

The resultant improvement is fairly marginal in impact (~60 additional samples/second, IIRC, for the 328P or about 1.5%) but I'll take the free additional samples... even if there is some impact on usability thanks to the IDE not supporting that speed. Cheers!

Nick Gammon

Glad to hear that. You might look into RS485 for cabling the longer cable runs. Since you are writing to an SD card (an inherently slow operation) I would have thought that really high speed transfers wouldn't really be required. As for SPI, you can deselect the SD card and address another device. My timings indicate you can transfer around 333,333 bytes per second using SPI, but I'm not sure about the long cable runs. Using I2C you should be able to look at around 40,000 bytes per second.


FWIW, and that is probably purely academic, the Atmels are communicating fine via serial at 1Mbit/s.

Which version of the IDE are you using? With 1.0, outgoing serial data is buffered, so the Serial.write() function is no longer blocking. I would think that generating the data to send would take longer than actually moving the data to the buffer, so I'd think that moving the data out of the buffer 8 times as fast would have nearly no impact.

Prior to 1.0, serial output was blocking, so moving it out faster would have a small effect on samples per second.

Go Up