Strictly necessary cookies are on by default and cannot be turned off. Functional, Performance and Tracking/targeting/sharing cookies can be turned on below based on your preferences (this banner will remain available for you to accept cookies). You may change your cookie settings by deleting cookies from your browser. Then this banner will appear again. You can learn more details about cookies HERE.
Strictly necessary (always on)
Functional, Performance and Tracking/targeting/sharing (default off)
A %d will convert your value of 65 to the two digits "6" and "5".
This will fill temp with a string of 12 characters. You only show your results sparingly. I would suggest you to connect the
tx_en signal to a pin and monitor it with a logic analyzer or a scope. it will show the exact time needed for transmission.
Additionally I would suggest to set compiler optimization to "speed".
The situation will change completely when you set the Tx Buffer Size to 20..100. While the buffer gets filled the characters are transferred in the background until the buffer is full and the program will wait for room in the buffer. A CyDelay() in main loop can prevent that.
Pure transmission time fot a byte is @115200baud about 100µs,