I am attempting to push data over the serial port as fast as possible. Currently, I am limited to about 10,000 bytes/second, which is plausible because the serial port is configured to 14,400 bytes (115,200 bits) per second. Does anyone know how I can increase the speed of the serial connection? Alternatively, if there is some other means besides Serial to pass data to the ARM processor, I could use that. My Arduino sketch is below. As it is, the "Unable to write quickly enough" is printed. If two characters are removed from Serial.println("012345678901"), then it passes. I am using the built in Serial port monitor (Tools -> Serial Monitor). Code: unsigned long sample_period = 1000; //micro seconds. unsigned long current_time = 0; void setup() { Serial.begin(115200); //115200 bits per sec, 14400 bytes per sec current_time = micros(); } void loop() { int wait_count = 0; while(micros() - current_time < sample_period) { wait_count++; } if(wait_count == 0) { Serial.println("Unable to write quickly enough"); } current_time = micros(); Serial.println("012345678901"); }
Did you try to send more data in 1 line? Also the reading side effects the baudrate. You could also use minicom instead of Arduino IDE. Or write your own serial reading program.
Yes, all the data is sent in one line. I'm using a custom C++ reading program, based on http://www.tldp.org/HOWTO/Serial-Programming-HOWTO/x115.html.