<?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>Kinetis MicrocontrollersのトピックRe: k53 OPAMP Inputs</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k53-OPAMP-Inputs/m-p/292528#M11772</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Matt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for making it public here, too.&lt;/P&gt;&lt;P&gt;We will be waiting for the response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Mar 2013 20:11:51 GMT</pubDate>
    <dc:creator>Monica</dc:creator>
    <dc:date>2013-03-19T20:11:51Z</dc:date>
    <item>
      <title>k53 OPAMP Inputs</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k53-OPAMP-Inputs/m-p/292526#M11770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to use the internal mux on the k53 to switch in two different inputs for signal conditioning before sampling but I can only get one signal to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the k53 Tower board and the OPAMP1 module inside the processor, with processor expert used for initialization.&amp;nbsp; OPAMP1 is configured for High-speed, Inverting PGA, with a gain of -1.&amp;nbsp; The Positive input is set to OP1_DP1 (a.k.a. OPAMP0_Output) for my reference voltage and the output is set to the OP1_Out pin.&amp;nbsp; I am trying to switch my negative input between OP1_DM1 and OP1_DM2 (a.k.a. TRI0_Out) by writing to the OPAMP1_C2 register.&amp;nbsp; I can get the OP1_DM1 to output but when I set the module to look at the other input the output simply goes to the positive input voltage.&amp;nbsp; Below is my code, written for MQXLite.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;while(1) {&lt;/P&gt;&lt;P&gt;&amp;nbsp; if(0x11 == OPAMP1_C2){&lt;/P&gt;&lt;P&gt;&amp;nbsp; Bit1_NegVal(Bit1_DeviceData);&amp;nbsp; // Signal begining of input change&lt;/P&gt;&lt;P&gt;&amp;nbsp; OPAMP1_C2 = 0x12; // Switch Input to OP1_DM2&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; else{&lt;/P&gt;&lt;P&gt;&amp;nbsp; Bit1_NegVal(Bit1_DeviceData); // Signal begining of input change&lt;/P&gt;&lt;P&gt;&amp;nbsp; OPAMP1_C2 = 0x11; // Switch Input to OP1_DM1&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; _time_delay_ticks(1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; counter++;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have also tried using DAC0_Out as my second input and I get the same result.&amp;nbsp; I have also tried disabling the OPAMP, by zeroing out OPAMP1_C0, before making the change to OPAMP1_C2 and then re enabling the module again.&amp;nbsp; Has anyone run into this issue before?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Mar 2013 17:46:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/k53-OPAMP-Inputs/m-p/292526#M11770</guid>
      <dc:creator>MatthewScott_DE</dc:creator>
      <dc:date>2013-03-12T17:46:38Z</dc:date>
    </item>
    <item>
      <title>Re: k53 OPAMP Inputs</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k53-OPAMP-Inputs/m-p/292527#M11771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I sent this same question into Freescale Support on March 13th.&amp;nbsp; On the 15th I got a replay that my question was a bit confusing and referenced the app note dealing with the k53 amplifiers (AN4508)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I replied and told them &lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;I am familiar with the app note you mentioned.&amp;nbsp; It discussing using the opamps with one of the inputs that I could get working, OP1_DP0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My goal is to use several of the Opamp inputs and switch in different signals using the input mux. I intend to look at 6 different signals on my actual application using both Opamps on the k53.&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will update when I get a more solid answer.&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2013 12:49:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/k53-OPAMP-Inputs/m-p/292527#M11771</guid>
      <dc:creator>MatthewScott_DE</dc:creator>
      <dc:date>2013-03-19T12:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: k53 OPAMP Inputs</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k53-OPAMP-Inputs/m-p/292528#M11772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Matt,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for making it public here, too.&lt;/P&gt;&lt;P&gt;We will be waiting for the response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2013 20:11:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/k53-OPAMP-Inputs/m-p/292528#M11772</guid>
      <dc:creator>Monica</dc:creator>
      <dc:date>2013-03-19T20:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: k53 OPAMP Inputs</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k53-OPAMP-Inputs/m-p/292529#M11773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just heard this morning that they are contacting the developer team to get an answer on this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have pretty much decided to use external muxes at this point for my signal routing on this project.&amp;nbsp; But I may still use this feature in the future if it does work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will update again when I hear anything.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Mar 2013 12:31:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/k53-OPAMP-Inputs/m-p/292529#M11773</guid>
      <dc:creator>MatthewScott_DE</dc:creator>
      <dc:date>2013-03-20T12:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: k53 OPAMP Inputs</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/k53-OPAMP-Inputs/m-p/292530#M11774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got an answer from support again,&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;Please accept my apologies for the late response.&lt;/P&gt;&lt;P&gt;If you want to use different input for the OPAMP you only need to set the correct input on the OPAMP1_C2 register, I make a simple modification on the AN4508SW and I add&lt;/P&gt;&lt;P&gt;OPAMP1_C2 = (OPAMP_C2_AMPPSEL(7) | OPAMP_C2_AMPNSEL(7)); vfnThermistor_measuring(); in order to change the input for the OPAMP1 It works without problem. You do not need to disable the OPAMP Please check that the analog input is on the correct range.&lt;/P&gt;&lt;P&gt;I hope this will help you.&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;Please let me know if you have more questions Have a good day.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;I modified my code to use the bitmasks like he suggested:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;while(1) {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if((OPAMP_C2_AMPPSEL(1)|OPAMP_C2_AMPNSEL(1)) == OPAMP1_C2){&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Bit1_NegVal(Bit1_DeviceData);&amp;nbsp; // Signal beginning of input change&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OPAMP1_C2 = (OPAMP_C2_AMPPSEL(1)|OPAMP_C2_AMPNSEL(2)); // Switch Input to OP1_DM2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; else{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Bit1_NegVal(Bit1_DeviceData); // Signal beginning of input change&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OPAMP1_C2 = (OPAMP_C2_AMPPSEL(1)|OPAMP_C2_AMPNSEL(1)); // Switch Input to OP1_DM1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; _time_delay_ticks(1);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; counter++;&lt;/P&gt;&lt;P&gt;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Calibri, sans-serif;"&gt;&lt;SPAN style="font-size: 15px;"&gt;Unfortunately,&lt;/SPAN&gt;&lt;SPAN style="font-size: 11pt;"&gt; I get the same result that I did when I &lt;/SPAN&gt;&lt;SPAN style="font-size: 15px;"&gt;hard-coded&lt;/SPAN&gt;&lt;SPAN style="font-size: 11pt;"&gt; the register values.&amp;nbsp; I know my signals are in the correct range, I have swapped them back and forth and continue to get only one real signal to come out.&amp;nbsp; I don't think I am going to spend anymore time on this since i &lt;/SPAN&gt;&lt;SPAN style="font-size: 15px;"&gt;decided&lt;/SPAN&gt;&lt;SPAN style="font-size: 11pt;"&gt; my design will uses external muxes for more &lt;/SPAN&gt;&lt;SPAN style="font-size: 15px;"&gt;flexibility&lt;/SPAN&gt;&lt;SPAN style="font-size: 11pt;"&gt; anyway.&amp;nbsp; It was a nice dream though.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2013 15:34:13 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/k53-OPAMP-Inputs/m-p/292530#M11774</guid>
      <dc:creator>MatthewScott_DE</dc:creator>
      <dc:date>2013-03-22T15:34:13Z</dc:date>
    </item>
  </channel>
</rss>

