<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>PID controller without floating point for MSPM0</title><link>/technologies/embedded/b/blog/posts/pid-controller-without-floating-point-for-mspm0</link><description>PID controller implementation without using integer arithmetic. Uses TI IQMath lib to replace floating point instructions.





Some of the content is created with AI support. I&amp;#39;ve marked the parts where AI was used.All narrative i...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: PID controller without floating point for MSPM0</title><link>https://community.element14.com/technologies/embedded/b/blog/posts/pid-controller-without-floating-point-for-mspm0</link><pubDate>Mon, 12 Oct 2026 09:01:18 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:8c85e1c3-c4c8-4327-b1ac-d3c5b26670d4</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;TI&amp;#39;s CCS has&amp;nbsp;functionality to show IQMath variables as floating point values.&lt;/p&gt;
&lt;p&gt;In VS Code, you can do this with watch expressions. To show a Q(24):&lt;/p&gt;
&lt;pre&gt;((float)&amp;lt;VARIABLE&amp;gt;) * 0.000000059604644775390625f&lt;/pre&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " height="168" src="/resized-image/__size/998x336/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-8c85e1c3-c4c8-4327-b1ac-d3c5b26670d4/pastedimage1791795643676v1.png" width="499" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;You can also use it for conditional breakpoints. E.g.: break when the measured value gets higher than the target (overshoot):&lt;/p&gt;
&lt;div&gt;
&lt;pre&gt;&lt;span&gt;((&lt;/span&gt;&lt;span&gt;float&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;feedback&lt;/span&gt;&lt;span&gt;) * &lt;/span&gt;&lt;span&gt;0.000000059604644775390625f&lt;/span&gt;&lt;span&gt; &amp;gt; ((&lt;/span&gt;&lt;span&gt;float&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;span&gt;target_command&lt;/span&gt;&lt;span&gt;) * &lt;/span&gt;&lt;span&gt;0.000000059604644775390625f&lt;/span&gt;&lt;/pre&gt;
&lt;div&gt;&lt;span&gt;&lt;img height="75" src="/resized-image/__size/992x150/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-8c85e1c3-c4c8-4327-b1ac-d3c5b26670d4/pastedimage1791796118866v1.png" width="496" alt=" " /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;img src="https://community.element14.com/aggbug?PostID=30291&amp;AppID=7&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>