<?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>LPC MicrocontrollersのトピックRe: LPC822 ADC Conversion</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC822-ADC-Conversion/m-p/803162#M32282</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A few points to note:&lt;/P&gt;&lt;P&gt;Driving Vrefp from a high impedance source is probably not such a great idea, although the manual says nothing about the current drawn by that pin; but it does say that the midpoint between Vrefp and Vrefn should be half the supply voltage.&lt;/P&gt;&lt;P&gt;I think that the pullup on PIO0_23 remains active on an LPC800 even when in analogue mode, so you should switch it off.&amp;nbsp; (IOCON-&amp;gt;PIO0_23 = 0x80). That pullup current flowing in your resistor input network would account for the offset voltage.&lt;/P&gt;&lt;P&gt;R2 is superfluous, as the impedance at TP1 is about 450k. That does mean you have a low-pass filter on the input with a time constant of 45ms (f cutoff = 3.5Hz) so if that wasn't intended, change the divider impedance.&lt;/P&gt;&lt;P&gt;Measuring down to millivolt level when you have a supply with high-frequency ripple will be very layout-dependent!&lt;/P&gt;&lt;P&gt;What does your circuit mean by "R18=100E"?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Aug 2018 12:43:05 GMT</pubDate>
    <dc:creator>ianbenton</dc:creator>
    <dc:date>2018-08-01T12:43:05Z</dc:date>
    <item>
      <title>LPC822 ADC Conversion</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC822-ADC-Conversion/m-p/803157#M32277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;LPC822 ADC Conversion - Result in ADC Count Varying Continuously. Through polling method i am reading ADC value. For 0V ADC input the system showing 0 to 20 count variation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Someone help me to come out from this error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Code is here:&lt;/P&gt;&lt;P&gt;Adc_Init()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LPC_SYSCON-&amp;gt;PDRUNCFG &amp;amp;= (~(1&amp;lt;&amp;lt;ADC_ON)); &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;LPC_SYSCON-&amp;gt;PRESETCTRL |= (1&amp;lt;&amp;lt;ADC_RST_N);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;LPC_SYSCON-&amp;gt;PRESETCTRL &amp;amp;= ~(1&amp;lt;&amp;lt;ADC_RST_N);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;LPC_SYSCON-&amp;gt;SYSAHBCLKCTRL |= (1&amp;lt;&amp;lt;GPIO)|(1&amp;lt;&amp;lt;SWM)|(1&amp;lt;&amp;lt;IOCON)|(1&amp;lt;&amp;lt;ADC); &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;LPC_SWM-&amp;gt;PINENABLE0 &amp;amp;= ~(1&amp;lt;&amp;lt; (13 + Adc_Channel));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;LPC_ADC-&amp;gt;TRM &amp;amp;= ~(1&amp;lt;&amp;lt;VRANGE);&lt;/P&gt;&lt;P&gt;// Calibration&lt;/P&gt;&lt;P&gt;SystemCoreClockUpdate();&lt;BR /&gt;&amp;nbsp; current_clkdiv = (SystemCoreClock / 500000) - 1;&lt;/P&gt;&lt;P&gt;LPC_ADC-&amp;gt;CTRL = ( (1&amp;lt;&amp;lt;ADC_CALMODE) | (0&amp;lt;&amp;lt;ADC_LPWRMODE) | (current_clkdiv&amp;lt;&amp;lt;ADC_CLKDIV) );&lt;/P&gt;&lt;P&gt;while (LPC_ADC-&amp;gt;CTRL &amp;amp; (1&amp;lt;&amp;lt;ADC_CALMODE));&lt;/P&gt;&lt;P&gt;#define desired_sample_rate 1200000&lt;BR /&gt; current_clkdiv = (SystemCoreClock / (25 * desired_sample_rate)) - 1;&lt;/P&gt;&lt;P&gt;LPC_ADC-&amp;gt;CTRL = ( (0&amp;lt;&amp;lt;ADC_CALMODE) | (0&amp;lt;&amp;lt;ADC_LPWRMODE) | (current_clkdiv&amp;lt;&amp;lt;ADC_CLKDIV) );&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Adc_Conversion()&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;LPC_ADC-&amp;gt;CTRL &amp;amp;= 0x00000000;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;LPC_ADC-&amp;gt;SEQB_CTRL |= (1&amp;lt;&amp;lt;ADC_3);&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;Delay_mSec(10);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;LPC_ADC-&amp;gt;DAT[3] &amp;amp;= 0;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;LPC_ADC-&amp;gt;SEQB_CTRL |= 0x80040000;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LPC_ADC-&amp;gt;SEQB_CTRL |= (1&amp;lt;&amp;lt;26);&lt;/P&gt;&lt;P&gt;while(LPC_ADC-&amp;gt;SEQB_GDAT &amp;amp; (0x80000000));&amp;nbsp;&lt;/P&gt;&lt;P&gt;return((LPC_ADC-&amp;gt;DAT[3] &amp;gt;&amp;gt; 4) &amp;amp; 0xfff);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2018 06:21:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC822-ADC-Conversion/m-p/803157#M32277</guid>
      <dc:creator>kaarthick</dc:creator>
      <dc:date>2018-07-31T06:21:48Z</dc:date>
    </item>
    <item>
      <title>Re: LPC822 ADC Conversion</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC822-ADC-Conversion/m-p/803158#M32278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is connected to the A/D input? And how is it connected? Where does your power supply come from, and how is it regulated?&lt;/P&gt;&lt;P&gt;20 counts in 4096 is a little under 0.5%, so it could easily be noise on the signal or ripple on the power supply.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2018 15:52:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC822-ADC-Conversion/m-p/803158#M32278</guid>
      <dc:creator>ianbenton</dc:creator>
      <dc:date>2018-07-31T15:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: LPC822 ADC Conversion</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC822-ADC-Conversion/m-p/803159#M32279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Power supply is SMPS and from same i gave ADC input. Is there any problem with my code?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2018 17:11:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC822-ADC-Conversion/m-p/803159#M32279</guid>
      <dc:creator>kaarthick</dc:creator>
      <dc:date>2018-07-31T17:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: LPC822 ADC Conversion</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC822-ADC-Conversion/m-p/803160#M32280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Most likely not. At a quick glance it looks OK, but the fault just looks like noise on the input.&lt;/P&gt;&lt;P&gt;A variation from 0 to 20, with a mean of 10 is an average DC voltage on the input of 16mV, with 5.6mV rms of noise. You say that the input is connected to 0V. &lt;EM&gt;Where&lt;/EM&gt; is it connected to 0V? If it doesn't go &lt;EM&gt;exactly&lt;/EM&gt; and &lt;EM&gt;only&lt;/EM&gt; to a Vss pin on the chip you could easily have a DC offset of 16mV due to the current flowing out of the Vss pin. If there any length of track, and the input isn't connected to 0V with a very low impedance, and doesn't have a low-pass filter on the input then the 5.6mV rms noise could quite easily have been picked up from the PSU, and what you are seeing is an alias of the PSU ripple.&lt;/P&gt;&lt;P&gt;Good analogue design and/or a basic IIR filter on the data will probably solve it.&lt;/P&gt;&lt;P&gt;Are you just experimenting, or are you trying to measure something in particular?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2018 20:43:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC822-ADC-Conversion/m-p/803160#M32280</guid>
      <dc:creator>ianbenton</dc:creator>
      <dc:date>2018-07-31T20:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: LPC822 ADC Conversion</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC822-ADC-Conversion/m-p/803161#M32281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Capture.JPG"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/73229i628C6C5016E3E425/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.JPG" alt="Capture.JPG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2018 04:12:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC822-ADC-Conversion/m-p/803161#M32281</guid>
      <dc:creator>kaarthick</dc:creator>
      <dc:date>2018-08-01T04:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: LPC822 ADC Conversion</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC822-ADC-Conversion/m-p/803162#M32282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A few points to note:&lt;/P&gt;&lt;P&gt;Driving Vrefp from a high impedance source is probably not such a great idea, although the manual says nothing about the current drawn by that pin; but it does say that the midpoint between Vrefp and Vrefn should be half the supply voltage.&lt;/P&gt;&lt;P&gt;I think that the pullup on PIO0_23 remains active on an LPC800 even when in analogue mode, so you should switch it off.&amp;nbsp; (IOCON-&amp;gt;PIO0_23 = 0x80). That pullup current flowing in your resistor input network would account for the offset voltage.&lt;/P&gt;&lt;P&gt;R2 is superfluous, as the impedance at TP1 is about 450k. That does mean you have a low-pass filter on the input with a time constant of 45ms (f cutoff = 3.5Hz) so if that wasn't intended, change the divider impedance.&lt;/P&gt;&lt;P&gt;Measuring down to millivolt level when you have a supply with high-frequency ripple will be very layout-dependent!&lt;/P&gt;&lt;P&gt;What does your circuit mean by "R18=100E"?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2018 12:43:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC822-ADC-Conversion/m-p/803162#M32282</guid>
      <dc:creator>ianbenton</dc:creator>
      <dc:date>2018-08-01T12:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: LPC822 ADC Conversion</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC822-ADC-Conversion/m-p/803163#M32283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That 100E not placed in PCB.&amp;nbsp; And I found that there is problem due to noise only. By adjusting RC Filter i get fine output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for supporting me to find out problem and proper solution.&lt;/P&gt;&lt;P&gt;Thanks Mr.Ian Benton&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Aug 2018 12:57:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC822-ADC-Conversion/m-p/803163#M32283</guid>
      <dc:creator>kaarthick</dc:creator>
      <dc:date>2018-08-01T12:57:27Z</dc:date>
    </item>
  </channel>
</rss>

