<?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 Re: Update: in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145135#M7080</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hmm, more straneness. In my post #12 above, I noted that that simple test code worked. I'm unable to reproduce this now, which leads me to wonder if maybe I had left the BDM connector on my target while testing. When running the debugger, it would have appeared to be working, since the BDM interface does in fact toggle PTA4 (Background pin) while running to communicate with the target.&lt;BR /&gt;&lt;BR /&gt;With the BDM disconnected, there is no activity on PTA4 though my test code should be.&lt;BR /&gt;&lt;BR /&gt;The following code is a modified version to work with a switch:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="Courier New"&gt;PTADD_PTADD4 = 1; // make PTA4 output&lt;BR /&gt;PTADD_PTADD3 = 1; // make PTA3 output&lt;BR /&gt;&lt;BR /&gt;MINUS_DDR = 0;&lt;BR /&gt;MINUS_PUE = 1;&lt;BR /&gt;PLUS_DDR = 0;&lt;BR /&gt;PLUS_PUE = 1;&lt;BR /&gt;&lt;BR /&gt;for (;&lt;IMG alt=":smileywink:" class="emoticon emoticon-smileywink" id="smileywink" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif" title="Smiley Wink" /&gt;&lt;BR /&gt;{&lt;BR /&gt;__RESET_WATCHDOG(); // Kicks the dog&lt;BR /&gt;if (MINUS == CLOSE)&lt;BR /&gt;{&lt;BR /&gt;PTAD_PTAD3 = 0;&lt;BR /&gt;PTAD_PTAD4 = 0;&lt;BR /&gt;LED_RED = ON;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;PTAD_PTAD3 = 1;&lt;BR /&gt;PTAD_PTAD4 = 1;&lt;BR /&gt;LED_RED = OFF;&lt;BR /&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;With each switch press, I see PTA3 toggle on the scope, PTA4 does not. I verify this behavior on both my target and my DEMO9S08QG8.&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 24 Feb 2007 04:22:25 GMT</pubDate>
    <dc:creator>irob</dc:creator>
    <dc:date>2007-02-24T04:22:25Z</dc:date>
    <item>
      <title>MC9S08QGx + PTA4 dead</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145120#M7065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;SPAN&gt;I have a problem that's &lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fforums.freescale.com%2Ffreescale%2Fboard%2Fmessage%3Fboard.id%3D8BITCOMM%26message.id%3D3246" rel="nofollow" target="_blank"&gt;similar to this tread&lt;/A&gt;&lt;SPAN&gt;, except my PTA4 pin is dead in hardware, not simulator. More &lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fforums.freescale.com%2Ffreescale%2Fboard%2Fmessage%3Fboard.id%3D8BITCOMM%26message.id%3D4615%26query.id%3D5472%23M4615" rel="nofollow" target="_blank"&gt;like this thread&lt;/A&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've found the part of the datasheet that mentions the Background Debug Mode Pin enable in the SOPT1 register. But I still can't toggle that pin.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any other registers I've missed? &lt;/SPAN&gt;&lt;P&gt;Message Edited by irob on &lt;SPAN class="date_text"&gt;2007-02-12&lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;09:08 AM&lt;BR /&gt;&lt;SPAN style="font-size: 1;"&gt;Alban edited part number&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Message Edited by Alban on &lt;SPAN class="date_text"&gt;2007-02-12&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;05:51 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2007 00:06:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145120#M7065</guid>
      <dc:creator>irob</dc:creator>
      <dc:date>2007-02-13T00:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: 9S08QGx + PTA4 dead</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145121#M7066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hello Rob,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I don't think S08QB8 exists. Can you please either modify the thread title or post a reply with correct reference and I'll update.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;HC908QB8 or 9S08QG I imagine&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Cheers,&lt;/DIV&gt;&lt;DIV&gt;Alban.&lt;/DIV&gt;&lt;P&gt;Message Edited by Alban on &lt;SPAN class="date_text"&gt;2007-02-12&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;05:51 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2007 00:23:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145121#M7066</guid>
      <dc:creator>Alban</dc:creator>
      <dc:date>2007-02-13T00:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: 9S08QGx + PTA4 dead</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145122#M7067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;Done.&lt;P&gt;Message Edited by Alban on &lt;SPAN class="date_text"&gt;2007-02-12&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;05:51 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2007 00:32:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145122#M7067</guid>
      <dc:creator>irob</dc:creator>
      <dc:date>2007-02-13T00:32:43Z</dc:date>
    </item>
    <item>
      <title>Re: HC908QBx + PTA4 dead or S08QG</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145123#M7068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Sorry to bother you again irob, but QB does not exist in the S08 family.&lt;/DIV&gt;&lt;DIV&gt;I sound boringly insistant, but that difference is necessary for me to see your issue.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If it has BDM it is S08QG8, if it has MON08 it is HC908QB8.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Cheers, Alban.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2007 01:23:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145123#M7068</guid>
      <dc:creator>Alban</dc:creator>
      <dc:date>2007-02-13T01:23:52Z</dc:date>
    </item>
    <item>
      <title>Re: HC9S08QGx + PTA4 dead</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145124#M7069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;My mistake (again!) I'm using the QG. But I'm not able to edit that first post anymore, not sure why. Thanks,&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2007 01:34:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145124#M7069</guid>
      <dc:creator>irob</dc:creator>
      <dc:date>2007-02-13T01:34:56Z</dc:date>
    </item>
    <item>
      <title>Re: 9S08QGx + PTA4 dead</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145125#M7070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Posts can only be edited with 2 hours of posting. I am doing it, no prob :smileywink:&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2007 01:50:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145125#M7070</guid>
      <dc:creator>Alban</dc:creator>
      <dc:date>2007-02-13T01:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08QGx + PTA4 dead</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145126#M7071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Dear irob,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I've seen a post from Petr stating he saw a mistake in the simulator and not in hardware.&lt;/DIV&gt;&lt;DIV&gt;Is there a remote possibility you've drawn too much current from the I/O and burnt it ?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;A trick on I/Os and how to read levels:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;- If the Data Direction Register (DDR) says input, when you read the Port (PTx), it will return the status of the pin.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;- If the DDR is output, reading PTx returns the content of the register PTx and not the status of the pin.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Have you tried with another MCU to check ?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Cheers,&lt;/DIV&gt;&lt;DIV&gt;Alban.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2007 03:55:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145126#M7071</guid>
      <dc:creator>Alban</dc:creator>
      <dc:date>2007-02-13T03:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08QGx + PTA4 dead</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145127#M7072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hmm, well I just verified that PTA4 works on my DEMO9S08QG8 board.&lt;BR /&gt;&lt;BR /&gt;The problem with my target that isn't working is that PTA4 is also the Background pin. This is probably why I can't single step this and see it happening.&lt;BR /&gt;&lt;BR /&gt;It's not possible that I drew too much power. It's an I2C clock line on my target. I don't even have the I2C peripheral in place, just a scope to watch the lines working.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2007 04:06:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145127#M7072</guid>
      <dc:creator>irob</dc:creator>
      <dc:date>2007-02-13T04:06:43Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08QGx + PTA4 dead</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145128#M7073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hey again,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;May be the MCU is 'frozen'. I don't know if you are certain it is still running with other activity.&lt;/DIV&gt;&lt;DIV&gt;When you have a reset and BKGD pin low, you force the MCU to start in Special Single Chip Mode (SCC).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;It's another supposition to&amp;nbsp;check&amp;nbsp;by leaving&amp;nbsp;PTA4 floating and see it's level.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Anyone else has any idea ?&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Cheers,&lt;/DIV&gt;&lt;DIV&gt;Alban.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2007 04:37:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145128#M7073</guid>
      <dc:creator>Alban</dc:creator>
      <dc:date>2007-02-13T04:37:02Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08QGx + PTA4 dead</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145129#M7074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hello irob&lt;BR /&gt;Since you are using the PTA4 as I2C clock, do you have an external pull-up there? Maybe this pull-up is causing your problems.&lt;BR /&gt;Petr&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2007 16:44:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145129#M7074</guid>
      <dc:creator>petr</dc:creator>
      <dc:date>2007-02-13T16:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: MC9S08QGx + PTA4 dead</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145130#M7075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;True, I do have a 3.3K pullup on PTA4, but it's for the Background pin. Please realize that I'm unable to toggle that pin to 0 when configured as an output.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Feb 2007 06:57:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145130#M7075</guid>
      <dc:creator>irob</dc:creator>
      <dc:date>2007-02-14T06:57:10Z</dc:date>
    </item>
    <item>
      <title>Update:</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145131#M7076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Well, something else must be wrong with my original firmware.&lt;BR /&gt;&lt;BR /&gt;I've made the following real simple test code:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="Courier New"&gt;for (;&lt;IMG alt=":smileywink:" class="emoticon emoticon-smileywink" id="smileywink" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif" title="Smiley Wink" /&gt;&lt;BR /&gt;{&lt;BR /&gt;__RESET_WATCHDOG(); // Kicks the dog&lt;BR /&gt;PTAD_PTAD4 = 1;&lt;BR /&gt;LED_RED = ON;&lt;BR /&gt;Delay (20000);&lt;BR /&gt;PTAD_PTAD4 = 0;&lt;BR /&gt;LED_RED = OFF;&lt;BR /&gt;Delay (20000);&lt;BR /&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;And this works nicely, so I've got to go back to the drawing board. &lt;IMG alt=":smileyhappy:" class="emoticon emoticon-smileyhappy" id="smileyhappy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-happy.gif" title="Smiley Happy" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Feb 2007 07:59:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145131#M7076</guid>
      <dc:creator>irob</dc:creator>
      <dc:date>2007-02-17T07:59:50Z</dc:date>
    </item>
    <item>
      <title>Re: Update:</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145132#M7077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;So strange. I'm unable to duplicate my last post today. PTA4 is no longer working again. I think I may have been looking at PTA3 by accident.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Alban wrote:&lt;BR /&gt;&lt;BR /&gt;&lt;DIV&gt;May be the MCU is 'frozen'. I don't know if you are certain it is still running with other activity.&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;When you have a reset and BKGD pin low, you force the MCU to start in Special Single Chip Mode (SCC).&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;It's another supposition to check by leaving PTA4 floating and see it's level.&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;Here is my setup: I have this target board with a couple LEDs on Port B. I have some very simple test code running right now:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="Courier New"&gt;&lt;BR /&gt;SOPT1_BKGDPE = 0;&lt;BR /&gt;PTADD_PTADD4 = 1;&lt;BR /&gt;PTADD_PTADD3 = 1;&lt;BR /&gt;&lt;BR /&gt;for (;&lt;IMG alt=":smileywink:" class="emoticon emoticon-smileywink" id="smileywink" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif" title="Smiley Wink" /&gt;&lt;BR /&gt;{&lt;BR /&gt;__RESET_WATCHDOG();&lt;BR /&gt;PTAD_PTAD4 = 1;&lt;BR /&gt;PTAD_PTAD3 = 1;&lt;BR /&gt;LED_RED = ON;&lt;BR /&gt;Delay (20000);&lt;BR /&gt;PTAD_PTAD4 = 0;&lt;BR /&gt;PTAD_PTAD3 = 0;&lt;BR /&gt;LED_RED = OFF;&lt;BR /&gt;Delay (20000);&lt;BR /&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;After programming, I remove my BDM cable, so as not to affect the above function. I see my LED toggle nicely, so I know that the program is alive. I also have PTA3 and PTA4 on a scope. Only PTA3 toggles. PTA4 comes up out of POR high, full 3.3V. I'm still unable to drive PTA4 low ever.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Feb 2007 07:29:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145132#M7077</guid>
      <dc:creator>irob</dc:creator>
      <dc:date>2007-02-21T07:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: Update:</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145133#M7078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello iRob,&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;Have you already eliminated the possibility that the device in the target is faulty?&amp;nbsp; Do you get identical behavior with different MCU samples in your target?&amp;nbsp; Does the test code work OK in the demo board?&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;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Feb 2007 10:46:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145133#M7078</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-02-21T10:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: Update:</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145134#M7079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Ok, I've just fired up a second target board with the same above code. I've got PTA4 on the scope and out of POR, it's driven high. Again, this target also has the 3.3K pullup on PTA4. But I refuse to believe that this MCU can't drive that low at all.&lt;BR /&gt;&lt;BR /&gt;There's got to be something fundamental I'm not doing. I thought for sure that the SOPT1 setting would fix this, but it hasn't.&lt;BR /&gt;&lt;BR /&gt;Is there something else I should be doing? Good grief, one of those weeks for me. &lt;IMG alt=":smileysad:" class="emoticon emoticon-smileysad" id="smileysad" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-sad.gif" title="Smiley Sad" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Feb 2007 01:44:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145134#M7079</guid>
      <dc:creator>irob</dc:creator>
      <dc:date>2007-02-24T01:44:46Z</dc:date>
    </item>
    <item>
      <title>Re: Update:</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145135#M7080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hmm, more straneness. In my post #12 above, I noted that that simple test code worked. I'm unable to reproduce this now, which leads me to wonder if maybe I had left the BDM connector on my target while testing. When running the debugger, it would have appeared to be working, since the BDM interface does in fact toggle PTA4 (Background pin) while running to communicate with the target.&lt;BR /&gt;&lt;BR /&gt;With the BDM disconnected, there is no activity on PTA4 though my test code should be.&lt;BR /&gt;&lt;BR /&gt;The following code is a modified version to work with a switch:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="Courier New"&gt;PTADD_PTADD4 = 1; // make PTA4 output&lt;BR /&gt;PTADD_PTADD3 = 1; // make PTA3 output&lt;BR /&gt;&lt;BR /&gt;MINUS_DDR = 0;&lt;BR /&gt;MINUS_PUE = 1;&lt;BR /&gt;PLUS_DDR = 0;&lt;BR /&gt;PLUS_PUE = 1;&lt;BR /&gt;&lt;BR /&gt;for (;&lt;IMG alt=":smileywink:" class="emoticon emoticon-smileywink" id="smileywink" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif" title="Smiley Wink" /&gt;&lt;BR /&gt;{&lt;BR /&gt;__RESET_WATCHDOG(); // Kicks the dog&lt;BR /&gt;if (MINUS == CLOSE)&lt;BR /&gt;{&lt;BR /&gt;PTAD_PTAD3 = 0;&lt;BR /&gt;PTAD_PTAD4 = 0;&lt;BR /&gt;LED_RED = ON;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;else&lt;BR /&gt;{&lt;BR /&gt;PTAD_PTAD3 = 1;&lt;BR /&gt;PTAD_PTAD4 = 1;&lt;BR /&gt;LED_RED = OFF;&lt;BR /&gt;}&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;With each switch press, I see PTA3 toggle on the scope, PTA4 does not. I verify this behavior on both my target and my DEMO9S08QG8.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Feb 2007 04:22:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145135#M7080</guid>
      <dc:creator>irob</dc:creator>
      <dc:date>2007-02-24T04:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: Update:</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145136#M7081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi Rob,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thought I would take a quick look at your little problem here.&lt;/DIV&gt;&lt;DIV&gt;Started with a simple programme from the Quick start examples (GPIO)&lt;/DIV&gt;&lt;DIV&gt;This just echoes two inputs to two outputs.&lt;/DIV&gt;&lt;DIV&gt;Loaded this into my homebrew DemoBoard&lt;/DIV&gt;&lt;DIV&gt;Works!&lt;/DIV&gt;&lt;DIV&gt;Added some lines to disable BKGD pin, enable PTA4 as an output and then just switch it along with one of the existing led outputs.&lt;/DIV&gt;&lt;DIV&gt;Well! what I find is the instant I disable the BKGD function (before enabling it as an output) the pin goes low (0.04V) and there it stays forever (even though there is an external 3k3 pullup there). The other function for this pin (ACMPO) should be disabled out of reset.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Well I found a problem with PTA4! But got the opposite result to you.&lt;/DIV&gt;&lt;DIV&gt;Needs further investigation....&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Feb 2007 20:10:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145136#M7081</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2007-02-24T20:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Update:</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145137#M7082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;DIV&gt;Well, the only problem was me being in a hurry. I was trying to manipulate PTB4 instead of PTA4.&lt;/DIV&gt;&lt;DIV&gt;It work perfectly now.&lt;/DIV&gt;&lt;DIV&gt;The instant drop to 0V is normal because A4 is always an output as soon as the other higher priority functions are disabled and as PTA is cleared on POR you get low.&lt;/DIV&gt;&lt;DIV&gt;Here is my test programme in assembler, the mistake was revealed when I converted it from C.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN class="msg_source_code"&gt;&lt;SPAN class="text_smallest"&gt;Code:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;PRE&gt;$Include "mc9s08qg8.inc" org RomStartstart mov #%11000000,PTBD  ;turn off LED's mov #%11000000,PTBDD ;make outputs mov #%00010000,PTAD  ;make GPIO on BKGD pin high mov #%00010000,PTADD ;set to output (not required, always output) lda #%00001100 sta PTAPE   ;pullup two switches lda #$D0 sta SOPT1   ;disable BKGDloop sta SRS   ;feed the dog brclr 2,PTAD,loop5  ;test switch 1 bset 6,PTBD   ;turn off LED1 bra loop10loop5 bclr 6,PTBD   ;turn on LED1loop10 brclr 3,PTAD,loop15  ;test switch 2 bset 7,PTBD   ;turn off LED2 bset 4,PTAD   ;set GPIO on BKGD pin bra loop20loop15 bclr 7,PTBD   ;turn on LED2 bclr 4,PTAD   ;clear GPIO on BKGD pinloop20 bra loop  org Vreset DW start  ;reset vector&lt;/PRE&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;This will run directly on a DEMOQG8&lt;/DIV&gt;&lt;DIV&gt;I enclose the s19 if you just want to drop it straight in to try it.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 08:46:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145137#M7082</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2020-10-29T08:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: RESOLVED in C</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145138#M7083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Thanks for the help, Peg. I just now found the time to give this a try.&lt;BR /&gt;&lt;BR /&gt;I tried your bit file and sure enough, it works. That's a relief that I didn't kill my DEMO board! In your program, SW1 only turns on LED1, nothing else. Was that to throw me off? &lt;IMG alt=":smileywink:" class="emoticon emoticon-smileywink" id="smileywink" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif" title="Smiley Wink" /&gt;&lt;BR /&gt;&lt;BR /&gt;In looking through your code, I noticed that you allocated the SOPT register all at once. I had been doing it bitwise in C as such:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="Courier New"&gt;SOPT1_COPE = 1; // COP enabled&lt;BR /&gt;SOPT1_BKGDPE = 0; // Change PTA4 from Background mode to output pin&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;I read in the datasheet on page 68, that SOPT is a&lt;BLOCKQUOTE&gt;"write-once register so only the first write after reset is honored... Any subsequent attempt to write to SOPT1 (intentionally or unintentionally) is ignored to avoid accidental changes to these sensitive settings."&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;This explains why my code wasn't working. I had two write attempts in my code. I've replaced those two lines with:&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="Courier New"&gt;SOPT1 = 0b11010000;&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;This now works fine. PTA4 is alive, hurray! But this leads me to a certain amount of frustration with Freescale's C header file for the MC9S08QG8. They have a structure defined for all the individual bits in the SOPT1 register. Those are fine to use if you are only writing that one bit in the whole register. Note to self: &lt;I&gt;read the datasheet for &lt;B&gt;every&lt;/B&gt; register&lt;/I&gt;!&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Mar 2007 04:05:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145138#M7083</guid>
      <dc:creator>irob</dc:creator>
      <dc:date>2007-03-16T04:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: RESOLVED in C</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145139#M7084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello iRob,&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 structure, within the header file, defining the individual bits of SOPT1 is still useful if you need to test the status of a particular bit.&amp;nbsp; I guess it is included on that basis.&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;I agree that you just have to learn which registers have special characteristics, and check the documentation during the programming process.&amp;nbsp; Even the experts can overlook this sort of thing - I recently discovered some code within an application note that attempted to separately set each bit in a&amp;nbsp;write once register.&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>Fri, 16 Mar 2007 10:01:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC9S08QGx-PTA4-dead/m-p/145139#M7084</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-03-16T10:01:59Z</dc:date>
    </item>
  </channel>
</rss>

