<?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: cant toggle pins with analog functionality on S08</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/cant-toggle-pins-with-analog-functionality-on-S08/m-p/234455#M19461</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you are right, I missed that.. Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Aug 2013 09:52:12 GMT</pubDate>
    <dc:creator>bjarnemichelsen</dc:creator>
    <dc:date>2013-08-02T09:52:12Z</dc:date>
    <item>
      <title>cant toggle pins with analog functionality on S08</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/cant-toggle-pins-with-analog-functionality-on-S08/m-p/234453#M19459</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 have a S08 demo board called DEMO9S08DZ60 where I am trying to develop some code for a display using parallel port.&lt;/P&gt;&lt;P&gt;The problem is that I can't toggle the pins fast enough.&lt;/P&gt;&lt;P&gt;If I toggle a pin with PWM functionality (for example D1), I get a fine square wave on the scope, But if I try to toggle a pin with analog functionality (for exampe A1) I will get a voltage of 2.34V instead of the square wave&lt;/P&gt;&lt;P&gt;I guess there is something I need to disable before using the analog pins?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp; ADCSC1_ADCH = 0b11111; //disable AD module&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; PTASE_PTASE1 = 0; //disable slew rate for A.1 &lt;/P&gt;&lt;P&gt;PTAPS_PTAPS1 = 0; //disable INT pin for A.1 &lt;/P&gt;&lt;P&gt;ACMP1SC_ACME = 0;&amp;nbsp; //disable analog compare&lt;/P&gt;&lt;P&gt;APCTL1 = 0x00; //disable analog&lt;/P&gt;&lt;P&gt;APCTL2 = 0x00; &lt;/P&gt;&lt;P&gt;APCTL3 = 0x00;&lt;/P&gt;&lt;P&gt;PTADD_PTADD1 = 1; //A.1 as output&lt;/P&gt;&lt;P&gt;PTDDD_PTDDD1 = 1;&amp;nbsp;&amp;nbsp; //D.1 as output&lt;/P&gt;&lt;P&gt;PTDSE_PTDSE1 = 0; //disable slew rate for D.1 &lt;/P&gt;&lt;P&gt;while(1)&amp;nbsp;&amp;nbsp; { &lt;/P&gt;&lt;P&gt;PTDD_PTDD1 = 1; &lt;/P&gt;&lt;P&gt;PTAD_PTAD1 = 1;&lt;/P&gt;&lt;P&gt;for(k = 0;k &amp;lt; 5; k++); &lt;/P&gt;&lt;P&gt;PTAD_PTAD1 = 0; &lt;/P&gt;&lt;P&gt;PTDD_PTDD1 = 0; &lt;/P&gt;&lt;P&gt;for(k = 0;k &amp;lt; 5; k++);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what am I missing?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Aug 2013 07:49:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/cant-toggle-pins-with-analog-functionality-on-S08/m-p/234453#M19459</guid>
      <dc:creator>bjarnemichelsen</dc:creator>
      <dc:date>2013-08-01T07:49:30Z</dc:date>
    </item>
    <item>
      <title>Re: cant toggle pins with analog functionality on S08</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/cant-toggle-pins-with-analog-functionality-on-S08/m-p/234454#M19460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Your code is no problem,&lt;/P&gt;&lt;P&gt;The issue is caused by those capacitors on each AD input pins, when one AD pin is toggled as an output port, the capacitor will be charged and uncharged alternately, if you prolong the delay, you can see the process clearly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use PTB3 to have a try, the capacitor on this pin is not installed on the board. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;XWP&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Aug 2013 08:54:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/cant-toggle-pins-with-analog-functionality-on-S08/m-p/234454#M19460</guid>
      <dc:creator>weapon</dc:creator>
      <dc:date>2013-08-02T08:54:29Z</dc:date>
    </item>
    <item>
      <title>Re: cant toggle pins with analog functionality on S08</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/cant-toggle-pins-with-analog-functionality-on-S08/m-p/234455#M19461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you are right, I missed that.. Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Aug 2013 09:52:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/cant-toggle-pins-with-analog-functionality-on-S08/m-p/234455#M19461</guid>
      <dc:creator>bjarnemichelsen</dc:creator>
      <dc:date>2013-08-02T09:52:12Z</dc:date>
    </item>
  </channel>
</rss>

