<?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>LPC MicrocontrollersのトピックPhase locked loop</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Phase-locked-loop/m-p/938237#M37372</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Has anyone tried to make a phase locked loop out of one of the SCT timer? Has anyone succeeded?&lt;/P&gt;&lt;P&gt;I'd like to make SCT0 run in sync with the mains, because using the comparators as zero-cross detectors isn't that great on a noisy mains supply.&lt;/P&gt;&lt;P&gt;I tried computing the phase difference as SIN(2*PI*COUNT/MATCHREL)*COS(sampled input)-COS(2*PI*COUNT/MATCHREL)*SIN(sampled input) and then using the phase difference to adjust MATCHREL, but I can't get it to lock.&lt;/P&gt;&lt;P&gt;Any ideas? Is my sample rate&amp;nbsp;(1600Hz) too low, or is the latency due to the period only updating after the next LIMIT event too long?&lt;/P&gt;&lt;P&gt;(The input is already a sinewave from the mains, and the cosine is found by taking a sample from quarter of a cycle ago.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Aug 2019 10:54:05 GMT</pubDate>
    <dc:creator>ianbenton</dc:creator>
    <dc:date>2019-08-01T10:54:05Z</dc:date>
    <item>
      <title>Phase locked loop</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Phase-locked-loop/m-p/938237#M37372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Has anyone tried to make a phase locked loop out of one of the SCT timer? Has anyone succeeded?&lt;/P&gt;&lt;P&gt;I'd like to make SCT0 run in sync with the mains, because using the comparators as zero-cross detectors isn't that great on a noisy mains supply.&lt;/P&gt;&lt;P&gt;I tried computing the phase difference as SIN(2*PI*COUNT/MATCHREL)*COS(sampled input)-COS(2*PI*COUNT/MATCHREL)*SIN(sampled input) and then using the phase difference to adjust MATCHREL, but I can't get it to lock.&lt;/P&gt;&lt;P&gt;Any ideas? Is my sample rate&amp;nbsp;(1600Hz) too low, or is the latency due to the period only updating after the next LIMIT event too long?&lt;/P&gt;&lt;P&gt;(The input is already a sinewave from the mains, and the cosine is found by taking a sample from quarter of a cycle ago.)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2019 10:54:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Phase-locked-loop/m-p/938237#M37372</guid>
      <dc:creator>ianbenton</dc:creator>
      <dc:date>2019-08-01T10:54:05Z</dc:date>
    </item>
    <item>
      <title>Re: Phase locked loop</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Phase-locked-loop/m-p/938238#M37373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A _jive_internal="true" data-content-finding="Community" data-userid="288229" data-username="ianbenton" href="https://community.nxp.com/people/ianbenton"&gt;Ian Benton&lt;/A&gt; ,&lt;/P&gt;&lt;P&gt;Thank you for your interest in NXP Semiconductor products and&lt;BR /&gt;for the opportunity to serve you.&lt;BR /&gt;Actually, I'm not very clear with your purpose, so I was wondering if you can introduce the scheme in details.&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P style="min- padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Aug 2019 02:04:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Phase-locked-loop/m-p/938238#M37373</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2019-08-02T02:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: Phase locked loop</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Phase-locked-loop/m-p/938239#M37374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;see&amp;nbsp;&lt;A href="https://en.wikipedia.org/wiki/Phase-locked_loop#Implementing_a_digital_phase-locked_loop_in_software"&gt;https://en.wikipedia.org/wiki/Phase-locked_loop#Implementing_a_digital_phase-locked_loop_in_software&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Aug 2019 13:48:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Phase-locked-loop/m-p/938239#M37374</guid>
      <dc:creator>ianbenton</dc:creator>
      <dc:date>2019-08-02T13:48:13Z</dc:date>
    </item>
    <item>
      <title>Re: Phase locked loop</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Phase-locked-loop/m-p/938240#M37375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;A _jive_internal="true" data-content-finding="Community" data-userid="288229" data-username="ianbenton" href="https://community.nxp.com/people/ianbenton"&gt;Ian Benton,&lt;/A&gt; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Thanks for your reply.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;I was wondering if you can share a compile-able demo which can replicate the phenomenon, it can help me to figure it out.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Looking forward to your reply.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Have a great day,&lt;BR /&gt;TIC&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-------------------------------------------------------------------------------&lt;BR /&gt;Note:&lt;BR /&gt;- If this post answers your question, please click the "Mark Correct" button. Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- We are following threads for 7 weeks after the last post, later replies are ignored&lt;BR /&gt; Please open a new thread and refer to the closed one, if you have a related question at a later point in time.&lt;BR /&gt;-------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Aug 2019 06:21:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Phase-locked-loop/m-p/938240#M37375</guid>
      <dc:creator>jeremyzhou</dc:creator>
      <dc:date>2019-08-05T06:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: Phase locked loop</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Phase-locked-loop/m-p/938241#M37376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My guess is that there could be two possibilities:&lt;BR /&gt;1) The mains sinewave has enough distortion that the result of the calculation never equals zero, even when the two signals are in phase.&lt;/P&gt;&lt;P&gt;2) There is too much latency due to MATCHREL only updating MATCH when the counter "limits".&lt;/P&gt;&lt;P&gt;I'll spend some more time experimenting, and possibly try a signal generator instead of the mains reference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Aug 2019 08:32:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Phase-locked-loop/m-p/938241#M37376</guid>
      <dc:creator>ianbenton</dc:creator>
      <dc:date>2019-08-13T08:32:04Z</dc:date>
    </item>
  </channel>
</rss>

