<?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>8-bit Microcontrollers中的主题 Re: RC Oscillator - AP16</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/RC-Oscillator-AP16/m-p/138859#M5121</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello Roland,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;The code associated with the output toggle loop should generate a square wave with a half period of 15 bus cycles.&amp;nbsp; If you are getting a half period of about 8.2 us, this is consistent with a bus frequency of about 1.8MHz, what you measured at the OSC2 pin.&amp;nbsp; For a bus frequency of 1.5 MHz, the square wave half period would be 10 us (a frequency of 50 kHz).&amp;nbsp; The value in the MOR would appear to be correct.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;To get closer to the intended bus frequency, you might increase the R-value from 10k to 12k, applicable to the unit under test only.&amp;nbsp; Other devices of the same type may give quite different results, depending on parameter spread.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 04 Jul 2007 18:50:34 GMT</pubDate>
    <dc:creator>bigmac</dc:creator>
    <dc:date>2007-07-04T18:50:34Z</dc:date>
    <item>
      <title>RC Oscillator - AP16</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/RC-Oscillator-AP16/m-p/138856#M5118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Hello!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I´m trying to programm an AP16 Controller with an RC Oscillator.&lt;/DIV&gt;&lt;DIV&gt;I use following values for the components:&lt;/DIV&gt;&lt;DIV&gt;Rext: 10k&lt;/DIV&gt;&lt;DIV&gt;Cext: 10pF&lt;/DIV&gt;&lt;DIV&gt;=&amp;gt; approximately 6MHz&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;On Pin "OSC2" I can measure a frequency from appr. 1,8MHz - is this the bus frequency?&lt;/DIV&gt;&lt;DIV&gt;In the main routine I toggle one Pin and I can measure a puls duration from 8,2µs.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I think with a OSC frequency from about 6MHz the bus frequency should be 1,5MHz (0,7µs) is this wrong?&lt;/DIV&gt;&lt;DIV&gt;I won´t use the PLL because the start up time is very long (270ms).&lt;/DIV&gt;&lt;DIV&gt;Have I a wrong initialization?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;CONFIG1 = 0x01;&lt;/DIV&gt;&lt;DIV&gt;CONFIG2 = 0x08;&lt;BR /&gt;PCTL_PLLON=0;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thank you for your help!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Roland&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jul 2007 20:06:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/RC-Oscillator-AP16/m-p/138856#M5118</guid>
      <dc:creator>Roland</dc:creator>
      <dc:date>2007-07-03T20:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: RC Oscillator - AP16</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/RC-Oscillator-AP16/m-p/138857#M5119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello Roland,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;From the data sheet for the '908AP16, it would seem the Mask Option register (MOR) must also be programmed to select RC oscillator mode.&amp;nbsp; Since this is a flash location, it must be programmed when the application code is programmed.&amp;nbsp; This is in addition to setting CONFIG2 to determine the time base clock source.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;When RC oscillator mode is selected, the OSC2 pin should output the bus frequency.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;It seems you currently have a frequency error of about 20 percent from nominal value.&amp;nbsp; This sort of initial&amp;nbsp;accuracy is probably expected, and there is also likely to be significant variation with voltage and temperature.&amp;nbsp;Stray capacitance at the OSC1 pin would also affect the frequency.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2007 05:30:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/RC-Oscillator-AP16/m-p/138857#M5119</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-07-04T05:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: RC Oscillator - AP16</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/RC-Oscillator-AP16/m-p/138858#M5120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello Mac!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Sorry, I forgot to write the MOR register in my last message.&lt;/DIV&gt;&lt;DIV&gt;I initialized the MOR register as follow:&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;/* MOR: OSCSEL1=1,OSCSEL0=0 */const volatile MORSTR _MOR @0x0000FFCF = { 0xBF };&lt;/PRE&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;I think this is OK.&amp;nbsp;&lt;BR /&gt;But is it normal to have (for example) a puls duration from about 8µs when I toggle one pin?&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="msg_source_code"&gt;&lt;DIV class="text_smallest"&gt;Code:&lt;/DIV&gt;&lt;PRE&gt;for(;;)   {    __RESET_WATCHDOG(); /* feeds the dog */       PTA_PTA6=~PTA_PTA6;      } /* loop forever */&lt;/PRE&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;Kind Regards&lt;/DIV&gt;&lt;DIV&gt;Roland&lt;BR /&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2007 13:15:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/RC-Oscillator-AP16/m-p/138858#M5120</guid>
      <dc:creator>Roland</dc:creator>
      <dc:date>2007-07-04T13:15:33Z</dc:date>
    </item>
    <item>
      <title>Re: RC Oscillator - AP16</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/RC-Oscillator-AP16/m-p/138859#M5121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello Roland,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;The code associated with the output toggle loop should generate a square wave with a half period of 15 bus cycles.&amp;nbsp; If you are getting a half period of about 8.2 us, this is consistent with a bus frequency of about 1.8MHz, what you measured at the OSC2 pin.&amp;nbsp; For a bus frequency of 1.5 MHz, the square wave half period would be 10 us (a frequency of 50 kHz).&amp;nbsp; The value in the MOR would appear to be correct.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;To get closer to the intended bus frequency, you might increase the R-value from 10k to 12k, applicable to the unit under test only.&amp;nbsp; Other devices of the same type may give quite different results, depending on parameter spread.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2007 18:50:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/RC-Oscillator-AP16/m-p/138859#M5121</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-07-04T18:50:34Z</dc:date>
    </item>
  </channel>
</rss>

