I have a program running fine on a Teensy 3.6. One function is to print a table of values to the USB/serial port for display on the host PC. I cannot ever seem to induce a problem viewing the result with the serial monitor in the Arduino environment (1.8.5 with teensyduino 1.41).
But, if I use another terminal program such as RealTerm, Termite, or Tera Term I quite often get errors in the printed data. These intermittent errors typically show up in the same place, suggesting that it is not entirely random. For example, if I print a 256 row table, each with 15 elements, row 238 will sometimes miss some elements (but never on the Arduino serial monitor).
I have found the problem with different PCs, windows 7 and windows 10, and different cables. I have tried many different baud rates and have not found a way to make the problem better or worse.
The one constant seems to be that the serial monitor never ever has a problem, and three other serial programs all show an intermittent problem at similar place in the data...
I start communications with
Serial.begin(19200);
The code that prints the array is
the arrIdx function returns an uint32_t and just deals with some housekeeping. In any case this works perfectly with the arduino serial monitor, and mostly ok with other terminal programs.
I feel that something is getting messed up that has nothing to do with this particular fragment of code, but more to do with how serial communications are handled in general.
Any thoughts?
Doug
But, if I use another terminal program such as RealTerm, Termite, or Tera Term I quite often get errors in the printed data. These intermittent errors typically show up in the same place, suggesting that it is not entirely random. For example, if I print a 256 row table, each with 15 elements, row 238 will sometimes miss some elements (but never on the Arduino serial monitor).
I have found the problem with different PCs, windows 7 and windows 10, and different cables. I have tried many different baud rates and have not found a way to make the problem better or worse.
The one constant seems to be that the serial monitor never ever has a problem, and three other serial programs all show an intermittent problem at similar place in the data...
I start communications with
Serial.begin(19200);
The code that prints the array is
Code:
Serial.println("Data table");
for (int a=0;a<nRows;a++){
Serial.print("Row "); Serial.print(a+1); Serial.print(" : ");
for (int c=0;c<(nCells);c++){
Serial.print(Data[arrIdx(a,c)]/scale);Serial.print(" ");
}
Serial.println();
}
the arrIdx function returns an uint32_t and just deals with some housekeeping. In any case this works perfectly with the arduino serial monitor, and mostly ok with other terminal programs.
I feel that something is getting messed up that has nothing to do with this particular fragment of code, but more to do with how serial communications are handled in general.
Any thoughts?
Doug
Last edited by a moderator: