I have a project that uses serial communication to pass data back and forth from a Windows Application and a propeller based board. Currently it uses the JCCogSerial module and runs well at 230400 baud. I recently wanted to increase the throughput and started examining the use of SimpleIDE to compare throughput performance. I have always held the opinion that C code would increase the throughput performance.
I build a very simple C project that echoes a string, i.e. receives a character, add the character to a string, and retransmit that string back to the host when a Carriage return/line feed is received. I used both a C3 unit and a PropStick for the target systems and the Parallax Serial Terminal that comes with the Propeller Tool because it handles baud rates in multiples of 115200 baud. I first used the SimpleIDE build-in FDSERIA driver.. The results were disappointing. the echoed string has many unprintable characters at 230400 baud. Additional testing indicates that it target can send strings reliable a bauds much higher indicating that the problem with the echo is related to the receipt of the code by the target.
I next used Spin2Cpp to convert JDCOGSERIAL and JDCOGSERIALDEMO and used these instead of FDSERIAL. This code started dropping bytes and introducing spurious characters in the echo and 460800 baud. Additional testing indicated the target could repeatedly send a fixed string without with out dropping characters. Again suggesting that the received part of the code is the culprit.
Finally, I used the JDCOGSERIAL spin code as the driver for a spin program to serve as the echo engine. Surprisingly, It would echo strings without dropping and introducing spurious characters up to 921600 baud.
Why did I do this??? It was my intent to convert the Spin Code, in the propeller based board, to C to increase performance. These results suggest that performance may actually be degraded.