<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.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/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Logarithm function implementation</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/38278/logarithm-function-implementation</link><description>Hello, we are trying to implement PWM function with an incrementing/ decrementing duty cycle using a logarithmic function rather than linear function. Is there any predefined function for logarithmic operation? Also, what data types are available to denote</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 07 Sep 2018 11:59:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/38278/logarithm-function-implementation" /><item><title>RE: Logarithm function implementation</title><link>https://devzone.nordicsemi.com/thread/147795?ContentTypeID=1</link><pubDate>Fri, 07 Sep 2018 11:59:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:437dff6c-0748-4cae-9ea4-86930fac4885</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;There is no direct way to get a logarithmic function like this. However, you could calculate the samples of your logarithmic functions and store them in a large array. Then you could use the PWM peripheral to simply &amp;quot;play out&amp;quot; the samples using DMA. This requires a bit of space but has the benefit that you can generate any pattern you like.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>