This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Printf

Other Parts Discussed in Thread: CONTROLSUITE

When using the code from the demo (LAUNCHXL-F28377S C2000 Launchpad) values are sent through printf. However, it seems as though printf has a lot of overhead as compared to using the standard transmit buffers so I was wondering if using printf to send data  to the computer at a very high baud rate  is recommended.

Also, when using the transmit buffers directly, I am outputting ASCII values to Teraterm, is there any program out there where  I can convert the ASCII values into decimal or hex instead?

Thanks!

  • Arsh,

    As you noticed, printf takes many cycles.  Worse, it actually halts the processor when it does the transfer (and then resumes code execution).  You absolutely should not use printf in a realtime application (such as motor control, since the motor will get very upset with the processor is halted).

    On your second question, perhaps the IQntoa and atoIQn functions in the IQmath library (available in ControlSuite) will help.

    Regards,

    David