<?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>Two individual pwm duty cycle control</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/83569/two-individual-pwm-duty-cycle-control</link><description>Hello, I am fairly new to programing with nRF52832, Segger Embedded Studio and SDK52 V17.0.2. 
 I am an EE student, and the majorly of my experience comes from Arduino. 
 I am currently working on creating a small car that will travel very accurate distances</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 17 Jan 2022 13:03:58 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/83569/two-individual-pwm-duty-cycle-control" /><item><title>RE: Two individual pwm duty cycle control</title><link>https://devzone.nordicsemi.com/thread/348046?ContentTypeID=1</link><pubDate>Mon, 17 Jan 2022 13:03:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67436c6e-803b-411f-b0bf-616fd2c3a3b9</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hello again!&lt;/p&gt;
&lt;p&gt;When it comes to questions one, I don&amp;#39;t know if low power PWM is the best option here. It is mainly meant to be used with LEDs. When controlling a motor, you are dependent on a rather high PWM frequency in order to avoid noticeable noise etc. The low power PWM uses a 32 clock, giving you limited frequency and rather bad accuracy.&lt;/p&gt;
&lt;p&gt;So I recommend sticking to the regular PWM library. For an example of how multiple channels can be implemented, &lt;a href="https://devzone.nordicsemi.com/support-private/support/273880#permalink=680686"&gt;take a look .zip shared by Torbjørn here in this thread&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Two individual pwm duty cycle control</title><link>https://devzone.nordicsemi.com/thread/347761?ContentTypeID=1</link><pubDate>Fri, 14 Jan 2022 12:29:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6db019df-1110-4c66-8e1f-0fa46d921076</guid><dc:creator>Elfving</dc:creator><description>&lt;p&gt;Hey Joel! Great, then welcome to the world of Nordic and our products!&lt;/p&gt;
&lt;p&gt;Sounds like you have a very interesting project on your hands.&lt;/p&gt;
[quote user=""]1. Is it possible to have 2 Low Power PWMs in the same code?[/quote]
&lt;p&gt;Yes I think so. I will have to get back to you on this though.&lt;/p&gt;
[quote user=""]2. In order to get my PID controller working is it best to work with the RTC or with the Driver Timers in order to calculate the derivative and the integrals?&amp;nbsp; &amp;nbsp;[/quote]
&lt;p&gt;Well if using low power is important you should consider that RTC is running through the Low frequency clock. The LF isn&amp;#39;t using much current, about 1uA.&lt;/p&gt;
&lt;p&gt;When using TIMER, SPI/TWI, RADIO etc, the HF clock is used in order to get a better &amp;quot;precision&amp;quot;. Though both HFXO and LFXO have an accuracy in the same ball park considering drift in accuracy over time (20-40ppm), you can get a higher resolution using the HF clock. However, the HF uses about 1 mA (a 1000x more than the LF).&lt;/p&gt;
&lt;p&gt;So what you you want to use it for would depend on how accurate/precise you want to be with your sampling. In the context of a PID it doesn&amp;#39;t sound like you need to be that precise.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Elfving&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>