<?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: LPC1768 accumulate two ADC channels every 1ms  in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-accumulate-two-ADC-channels-every-1ms/m-p/761789#M30694</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out some of the old examples to see if it helps. There is a ADC DMA example:&lt;/P&gt;&lt;P&gt;&lt;A href="http://host.lpcware.com/content/nxpfile/mcb1700-sample-code-bundle-lpc17xx-peripherals-using-keils-mdk-arm"&gt;http://host.lpcware.com/content/nxpfile/mcb1700-sample-code-bundle-lpc17xx-peripherals-using-keils-mdk-arm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Mar 2018 16:59:12 GMT</pubDate>
    <dc:creator>Dezheng_Tang</dc:creator>
    <dc:date>2018-03-15T16:59:12Z</dc:date>
    <item>
      <title>LPC1768 accumulate two ADC channels every 1ms</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-accumulate-two-ADC-channels-every-1ms/m-p/761788#M30693</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to continuously read two ADC channels once every 1ms accumulating 500 values of each channel and perform a calculation every 500ms. I usually at slower speeds just use the ADC interrupt but this looks like a good candidate for DMA or DMA with a timer. What is the best way to do this? Does anyone have a step by step code example?&lt;/P&gt;&lt;P&gt;I would like to set the DMA source as the ADC, but the trigger to start a single ADC read f two of its channels from the timer.&lt;/P&gt;&lt;P&gt;When 500 readings x 2 have finished I expect the DMA interrupt to which I would restart the process but switching between two sets of 500 x 2 ADC values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I configure the DMA to do this?&lt;/P&gt;&lt;P&gt;I guess transferring a single ADC reading is a 32 bit value even though the ADC is only 12bits.&lt;/P&gt;&lt;P&gt;So I would need 500x2x4x2 = 8000 ram bytes.&lt;/P&gt;&lt;P&gt;Any help or suggestions would be appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2018 07:48:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-accumulate-two-ADC-channels-every-1ms/m-p/761788#M30693</guid>
      <dc:creator>kiryat8</dc:creator>
      <dc:date>2018-03-15T07:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1768 accumulate two ADC channels every 1ms</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-accumulate-two-ADC-channels-every-1ms/m-p/761789#M30694</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check out some of the old examples to see if it helps. There is a ADC DMA example:&lt;/P&gt;&lt;P&gt;&lt;A href="http://host.lpcware.com/content/nxpfile/mcb1700-sample-code-bundle-lpc17xx-peripherals-using-keils-mdk-arm"&gt;http://host.lpcware.com/content/nxpfile/mcb1700-sample-code-bundle-lpc17xx-peripherals-using-keils-mdk-arm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Mar 2018 16:59:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-accumulate-two-ADC-channels-every-1ms/m-p/761789#M30694</guid>
      <dc:creator>Dezheng_Tang</dc:creator>
      <dc:date>2018-03-15T16:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: LPC1768 accumulate two ADC channels every 1ms</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-accumulate-two-ADC-channels-every-1ms/m-p/761790#M30695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you but I have read the Keil examples but can not see a way to use DMA to be efficient when I need to sample two consecutive ADC channels. The transfer width is 32 bits for a single ADC reading and there is no way I can see to set it to 64 bit for two readings without using the increment source option. To use the increment source option would mean I would have to set the data transfer to 2 readings and get an interrupt reset the source pointer. This is more code and adds complexity and does not seem to have a real advantage over using the CPU to read the ADC reading and trigger another reading every 1ms.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Is there any other way?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 18 Mar 2018 04:37:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC1768-accumulate-two-ADC-channels-every-1ms/m-p/761790#M30695</guid>
      <dc:creator>kiryat8</dc:creator>
      <dc:date>2018-03-18T04:37:07Z</dc:date>
    </item>
  </channel>
</rss>

