<?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 MC68HC908JB - Problems with Input and Output in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC68HC908JB-Problems-with-Input-and-Output/m-p/162479#M9933</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Hi! I'm new at this forum and I hope I can get some help here.&lt;/DIV&gt;&lt;DIV&gt;I'm trying to use Port A for input and Output, configurable at realtime. It works if all the pins are outputs or inputs, but when I have both, the&amp;nbsp;outputs don't work. I'm using the inputs as interrupts with KBI. The inputs work correctly but when I try to change an output pin it doesn't work.&lt;/DIV&gt;&lt;DIV&gt;Can anybody help me please?&amp;nbsp; thank you!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 07 Jun 2008 00:39:50 GMT</pubDate>
    <dc:creator>tiagodalmaso</dc:creator>
    <dc:date>2008-06-07T00:39:50Z</dc:date>
    <item>
      <title>MC68HC908JB - Problems with Input and Output</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC68HC908JB-Problems-with-Input-and-Output/m-p/162479#M9933</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Hi! I'm new at this forum and I hope I can get some help here.&lt;/DIV&gt;&lt;DIV&gt;I'm trying to use Port A for input and Output, configurable at realtime. It works if all the pins are outputs or inputs, but when I have both, the&amp;nbsp;outputs don't work. I'm using the inputs as interrupts with KBI. The inputs work correctly but when I try to change an output pin it doesn't work.&lt;/DIV&gt;&lt;DIV&gt;Can anybody help me please?&amp;nbsp; thank you!&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jun 2008 00:39:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC68HC908JB-Problems-with-Input-and-Output/m-p/162479#M9933</guid>
      <dc:creator>tiagodalmaso</dc:creator>
      <dc:date>2008-06-07T00:39:50Z</dc:date>
    </item>
    <item>
      <title>Re: MC68HC908JB - Problems with Input and Output</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC68HC908JB-Problems-with-Input-and-Output/m-p/162480#M9934</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I have not used the KBI module, but I think I read taht if a KBI interrupt was enabled on a Port A pin,&lt;/DIV&gt;&lt;DIV&gt;then it over-rides the output enable bit. So you will have to disable the KBI bit for the port pin before&lt;/DIV&gt;&lt;DIV&gt;making it an output pin.&lt;/DIV&gt;&lt;DIV&gt;Check the data sheet....&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jun 2008 03:31:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC68HC908JB-Problems-with-Input-and-Output/m-p/162480#M9934</guid>
      <dc:creator>donw</dc:creator>
      <dc:date>2008-06-07T03:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: MC68HC908JB - Problems with Input and Output</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MC68HC908JB-Problems-with-Input-and-Output/m-p/162481#M9935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Don is correct, the use of the KBI overrides the data direction register on the port.&lt;/DIV&gt;&lt;DIV&gt;You want to see the note at the end of chapter 14.5.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;To use the part in the way that you describe means that you need to disable the KBI function on that pin with KBIEx = 0, then set the DDR for the pin to output PTADDx = 1.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Now the pin behaves as output.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;To go back to KBI, remember so set the GPIO as an input (PTADDx = 0), and re-enable KBIEx = 1.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Mark&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jun 2008 00:25:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MC68HC908JB-Problems-with-Input-and-Output/m-p/162481#M9935</guid>
      <dc:creator>UK_CF_FAE</dc:creator>
      <dc:date>2008-06-10T00:25:59Z</dc:date>
    </item>
  </channel>
</rss>

