<?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>topic Problem selecting external crystal as clock source in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Problem-selecting-external-crystal-as-clock-source/m-p/140490#M5639</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;hi,&lt;/DIV&gt;&lt;DIV&gt;I want to run my controller QB8 using external crystal 4.9152MHz&lt;/DIV&gt;&lt;DIV&gt;and not using internal&lt;/DIV&gt;&lt;DIV&gt;i have used the following code as atest but after removing thr crystal also i get the pulses on PTB0 .&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;please check my code and guide me how to use the external cystal as clock&lt;/DIV&gt;&lt;DIV&gt;source&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;this program just makes on/off PTB0&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;#include &amp;lt;hidef.h&amp;gt; /* for EnableInterrupts macro */&lt;BR /&gt;#include &amp;lt;MC68HC908QB8.h&amp;gt; /* include peripheral declarations */&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;//macro defination for BIT wise manupulation&lt;BR /&gt;#define setbit(A,B) A|=(1&amp;lt;&amp;lt;B)&lt;BR /&gt;#define clrbit(A,B) A&amp;amp;=~(1&amp;lt;&amp;lt;B)&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;void main(void)&lt;BR /&gt;{&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;unsigned char a=0,i=0;&lt;/DIV&gt;&lt;DIV&gt;OSCSC=0xC4;&lt;BR /&gt;CONFIG1=0x01;//Disable COP&lt;BR /&gt;DDRA=0x10;&lt;BR /&gt;DDRB=0xFF;&lt;/DIV&gt;&lt;DIV&gt;while(1)&lt;BR /&gt;{&lt;BR /&gt;PTB=0x01;&lt;BR /&gt;for(i=0;i&amp;lt;100;i++);&lt;BR /&gt;PTB=0x00;&lt;BR /&gt;for(i=0;i&amp;lt;100;i++);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Jun 2006 15:27:57 GMT</pubDate>
    <dc:creator>pallavaggarwal</dc:creator>
    <dc:date>2006-06-21T15:27:57Z</dc:date>
    <item>
      <title>Problem selecting external crystal as clock source</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Problem-selecting-external-crystal-as-clock-source/m-p/140490#M5639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;hi,&lt;/DIV&gt;&lt;DIV&gt;I want to run my controller QB8 using external crystal 4.9152MHz&lt;/DIV&gt;&lt;DIV&gt;and not using internal&lt;/DIV&gt;&lt;DIV&gt;i have used the following code as atest but after removing thr crystal also i get the pulses on PTB0 .&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;please check my code and guide me how to use the external cystal as clock&lt;/DIV&gt;&lt;DIV&gt;source&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;this program just makes on/off PTB0&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;#include &amp;lt;hidef.h&amp;gt; /* for EnableInterrupts macro */&lt;BR /&gt;#include &amp;lt;MC68HC908QB8.h&amp;gt; /* include peripheral declarations */&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;//macro defination for BIT wise manupulation&lt;BR /&gt;#define setbit(A,B) A|=(1&amp;lt;&amp;lt;B)&lt;BR /&gt;#define clrbit(A,B) A&amp;amp;=~(1&amp;lt;&amp;lt;B)&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;void main(void)&lt;BR /&gt;{&lt;/DIV&gt;&lt;DIV&gt;&lt;BR /&gt;unsigned char a=0,i=0;&lt;/DIV&gt;&lt;DIV&gt;OSCSC=0xC4;&lt;BR /&gt;CONFIG1=0x01;//Disable COP&lt;BR /&gt;DDRA=0x10;&lt;BR /&gt;DDRB=0xFF;&lt;/DIV&gt;&lt;DIV&gt;while(1)&lt;BR /&gt;{&lt;BR /&gt;PTB=0x01;&lt;BR /&gt;for(i=0;i&amp;lt;100;i++);&lt;BR /&gt;PTB=0x00;&lt;BR /&gt;for(i=0;i&amp;lt;100;i++);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jun 2006 15:27:57 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Problem-selecting-external-crystal-as-clock-source/m-p/140490#M5639</guid>
      <dc:creator>pallavaggarwal</dc:creator>
      <dc:date>2006-06-21T15:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Problem selecting external crystal as clock source</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Problem-selecting-external-crystal-as-clock-source/m-p/140491#M5640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hi pallav,&lt;/P&gt;&lt;P&gt;It appears to me that you should write 0xC4 to OSCSC.&lt;/P&gt;&lt;P&gt;Then wait about 1ms to stabilise.&lt;/P&gt;&lt;P&gt;Then set ECGON in OSCSC.&lt;/P&gt;&lt;P&gt;Then shortly after you should be running on ext xtal.&lt;/P&gt;&lt;P&gt;Refer to 11.3.2.2 of QB8 datasheet.&lt;/P&gt;&lt;P&gt;Regards David&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Jun 2006 17:41:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Problem-selecting-external-crystal-as-clock-source/m-p/140491#M5640</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2006-06-21T17:41:39Z</dc:date>
    </item>
  </channel>
</rss>

