<?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: pin sharing between ADC and IO output in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pin-sharing-between-ADC-and-IO-output/m-p/893031#M52716</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Processor Expert can't understand your requirement. You setting is conflict to each other. You have to manually add you code. You must take care that each time you generate Processor Expert code, it may cover your own code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 May 2019 08:45:15 GMT</pubDate>
    <dc:creator>jingpan</dc:creator>
    <dc:date>2019-05-16T08:45:15Z</dc:date>
    <item>
      <title>pin sharing between ADC and IO output</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pin-sharing-between-ADC-and-IO-output/m-p/893030#M52715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have a question about pin sharing between ADC and IO&lt;/P&gt;&lt;P&gt;My circuit use PTB3 for both ADC and IO output. In start, circuit will check a jumper to choice config PTB3 is ADC input or output.&lt;/P&gt;&lt;P&gt;I setup ADC and IO in figure below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/80995i56D4D6CA112F51D7/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/80996iEFF128E22DB2BA90/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In main(), I Check jumper and set direction of PTB3 is output&amp;nbsp; "CDS_SetOutput()" and blinking it, but It&amp;nbsp;isn't work. The output don't change when I mount a LED in.&lt;/P&gt;&lt;P&gt;How can I do that??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;MCU : MKE02Z16VLC4&lt;/P&gt;&lt;P&gt;CW 10.7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Plus.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 May 2019 03:40:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pin-sharing-between-ADC-and-IO-output/m-p/893030#M52715</guid>
      <dc:creator>duonghiep_set</dc:creator>
      <dc:date>2019-05-14T03:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: pin sharing between ADC and IO output</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pin-sharing-between-ADC-and-IO-output/m-p/893031#M52716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Processor Expert can't understand your requirement. You setting is conflict to each other. You have to manually add you code. You must take care that each time you generate Processor Expert code, it may cover your own code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2019 08:45:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pin-sharing-between-ADC-and-IO-output/m-p/893031#M52716</guid>
      <dc:creator>jingpan</dc:creator>
      <dc:date>2019-05-16T08:45:15Z</dc:date>
    </item>
    <item>
      <title>Re: pin sharing between ADC and IO output</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pin-sharing-between-ADC-and-IO-output/m-p/893032#M52717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jing,&lt;/P&gt;&lt;P&gt;Many thank for your suggestion.&lt;/P&gt;&lt;P&gt;I'm newbie and I am in embarrass&amp;nbsp;that how to setup GPIO and ADC without PE.&lt;/P&gt;&lt;P&gt;I will search and try on my circuit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Plus.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 May 2019 02:59:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pin-sharing-between-ADC-and-IO-output/m-p/893032#M52717</guid>
      <dc:creator>duonghiep_set</dc:creator>
      <dc:date>2019-05-17T02:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: pin sharing between ADC and IO output</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pin-sharing-between-ADC-and-IO-output/m-p/893033#M52718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will have to&amp;nbsp;write code that changes the use of the pin depending on your jumper. My suggestion is to make two configurations (builds) of your project. Each&amp;nbsp;copy will be configured for&amp;nbsp;one of the two specific uses alone. That way you can test that they both work independently. AND even more importantly, you can compare the PE generated code for each build and find&amp;nbsp;see how the PE tool configures the pin and peripherals for each output. (use a freeware tool like Diffmerge to compare the code files in each project directory)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Once you do that, you can make a single project that can run the appropriate configuration code depending on which use you want for PTB3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In general, you need to do &lt;STRONG&gt;two&lt;/STRONG&gt; different things to switch from ADC input to GPIO output. I am using MCUExpresso and the latest Kinteis SDKs, not Processor Expert. So this is purely example code, but I expect that the&amp;nbsp;solution for your situation will be similar.&amp;nbsp;(BTW, Why are you using old tools like PE? I suggest updating to the current toolchain if you want to get the best help on here.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1: Initialize the pin&amp;nbsp;as an output, with an initial state of 0:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;gpio_pin_config_t gpiob_pin38_config = {&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; .pinDirection = kGPIO_DigitalOutput,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; .outputLogic = 0U&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; };&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt; GPIO_PinInit(GPIOB, 3U, &amp;amp;gpiob_pin38_config);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2:&amp;nbsp;Switch the pin MUX to GPIO, this disconnects the port from the ADC and connects it to the GPIO module:&lt;BR /&gt;&lt;STRONG&gt; PORT_SetPinMux(PORTB, 3U, kPORT_MuxAsGpio);&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you wanted to switch back to ADC, you would need to do&amp;nbsp;a similar thing, except&amp;nbsp;set the pin mux to ADC instead of GPIO:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(PORT_SetPinMux(PORTB, 3U, kPORT_PinDisabledOrAnalog);&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jun 2019 14:54:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pin-sharing-between-ADC-and-IO-output/m-p/893033#M52718</guid>
      <dc:creator>andy1</dc:creator>
      <dc:date>2019-06-10T14:54:44Z</dc:date>
    </item>
    <item>
      <title>Re: pin sharing between ADC and IO output</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pin-sharing-between-ADC-and-IO-output/m-p/893034#M52719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank Andrew,&lt;/P&gt;&lt;P&gt;Your suggestion is very helpful. I'm using PE because of many reasons like my company system, team activities..etc.&lt;/P&gt;&lt;P&gt;This project was be pending&amp;nbsp;so&amp;nbsp;my circuit is be in bottom of the cabinet. :smileygrin:&amp;nbsp;&lt;/P&gt;&lt;P&gt;When have time, I will coding in&amp;nbsp;MCUExpresso and try your code.&lt;/P&gt;&lt;P&gt;Regard,&lt;/P&gt;&lt;P&gt;Plus.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2019 01:30:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pin-sharing-between-ADC-and-IO-output/m-p/893034#M52719</guid>
      <dc:creator>duonghiep_set</dc:creator>
      <dc:date>2019-06-12T01:30:03Z</dc:date>
    </item>
  </channel>
</rss>

