<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Other NXP ProductsのトピックPCA9685: problem in setting ON &amp; OFF time</title>
    <link>https://community.nxp.com/t5/Other-NXP-Products/PCA9685-problem-in-setting-ON-OFF-time/m-p/926503#M7643</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using PCA9685 servo controller board to run 3 servo motors from PIC Microcontroller PIC16F1938. I can able run the servo but problem in timing. I am confused on setting ON time &amp;amp; OFF time. For example, pca_write(servo number, on time, off time). pca_write(0, 409, 1648) should run the servo less than pca_write(0, 409, 2235).&lt;/P&gt;&lt;P&gt;On time1: 1648 - 409 = 1239&lt;/P&gt;&lt;P&gt;On time2: 2235 - 409 = 1826&lt;/P&gt;&lt;P&gt;But, in practical, the former on time of the Servo is greater than the latter. Why? Am i missing anything?&lt;/P&gt;&lt;P&gt;Function:&lt;/P&gt;&lt;P&gt;pca_write (unsigned int ServoN, unsigned long on_count, unsigned long off_count) {&lt;/P&gt;&lt;P&gt;I2C_Start();&lt;/P&gt;&lt;P&gt;I2C_Write (pca_address);&lt;/P&gt;&lt;P&gt;I2C_Write ((ServoN * 4) + 6); // LEDn reg&lt;/P&gt;&lt;P&gt;I2C_Write(on_count &amp;amp; 0xFF); // 8 LSB bits&lt;/P&gt;&lt;P&gt;I2C_Write((on_count &amp;amp; 0xF00 &amp;gt;&amp;gt; 8); // 4 MSB bits&lt;/P&gt;&lt;P&gt;I2C_Write(off_count &amp;amp; 0xFF); // 8 LSB bits&lt;/P&gt;&lt;P&gt;I2C_Write((off_count &amp;amp; 0xF00) &amp;gt;&amp;gt; 8); // 4 MSB bits&lt;/P&gt;&lt;P&gt;I2C_Stop();&lt;/P&gt;&lt;P&gt;Any help?&lt;/P&gt;&lt;P&gt;Thank you all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 16 Oct 2019 05:11:22 GMT</pubDate>
    <dc:creator>brunoelectronic</dc:creator>
    <dc:date>2019-10-16T05:11:22Z</dc:date>
    <item>
      <title>PCA9685: problem in setting ON &amp; OFF time</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/PCA9685-problem-in-setting-ON-OFF-time/m-p/926503#M7643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using PCA9685 servo controller board to run 3 servo motors from PIC Microcontroller PIC16F1938. I can able run the servo but problem in timing. I am confused on setting ON time &amp;amp; OFF time. For example, pca_write(servo number, on time, off time). pca_write(0, 409, 1648) should run the servo less than pca_write(0, 409, 2235).&lt;/P&gt;&lt;P&gt;On time1: 1648 - 409 = 1239&lt;/P&gt;&lt;P&gt;On time2: 2235 - 409 = 1826&lt;/P&gt;&lt;P&gt;But, in practical, the former on time of the Servo is greater than the latter. Why? Am i missing anything?&lt;/P&gt;&lt;P&gt;Function:&lt;/P&gt;&lt;P&gt;pca_write (unsigned int ServoN, unsigned long on_count, unsigned long off_count) {&lt;/P&gt;&lt;P&gt;I2C_Start();&lt;/P&gt;&lt;P&gt;I2C_Write (pca_address);&lt;/P&gt;&lt;P&gt;I2C_Write ((ServoN * 4) + 6); // LEDn reg&lt;/P&gt;&lt;P&gt;I2C_Write(on_count &amp;amp; 0xFF); // 8 LSB bits&lt;/P&gt;&lt;P&gt;I2C_Write((on_count &amp;amp; 0xF00 &amp;gt;&amp;gt; 8); // 4 MSB bits&lt;/P&gt;&lt;P&gt;I2C_Write(off_count &amp;amp; 0xFF); // 8 LSB bits&lt;/P&gt;&lt;P&gt;I2C_Write((off_count &amp;amp; 0xF00) &amp;gt;&amp;gt; 8); // 4 MSB bits&lt;/P&gt;&lt;P&gt;I2C_Stop();&lt;/P&gt;&lt;P&gt;Any help?&lt;/P&gt;&lt;P&gt;Thank you all.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 16 Oct 2019 05:11:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/PCA9685-problem-in-setting-ON-OFF-time/m-p/926503#M7643</guid>
      <dc:creator>brunoelectronic</dc:creator>
      <dc:date>2019-10-16T05:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: PCA9685: problem in setting ON &amp; OFF time</title>
      <link>https://community.nxp.com/t5/Other-NXP-Products/PCA9685-problem-in-setting-ON-OFF-time/m-p/926504#M7644</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is this forum active?!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2019 11:40:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Other-NXP-Products/PCA9685-problem-in-setting-ON-OFF-time/m-p/926504#M7644</guid>
      <dc:creator>brunoelectronic</dc:creator>
      <dc:date>2019-10-25T11:40:37Z</dc:date>
    </item>
  </channel>
</rss>

