<?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 reading 8 channel adc, LPC1768, CMSIS in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/reading-8-channel-adc-LPC1768-CMSIS/m-p/1467296#M48985</link>
    <description>&lt;P&gt;Hello everyone, I'm trying to read 8 adc channels, but I can only read 3 channels and the moment I add the 4th channel the code locks and stops and other lines don't implement the moment read_adc function is called and I don't recieve any data from any of the channels. I added my code here.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/26034"&gt;@xiangjun_rong&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Jun 2022 07:54:18 GMT</pubDate>
    <dc:creator>Alexshea</dc:creator>
    <dc:date>2022-06-01T07:54:18Z</dc:date>
    <item>
      <title>reading 8 channel adc, LPC1768, CMSIS</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/reading-8-channel-adc-LPC1768-CMSIS/m-p/1467296#M48985</link>
      <description>&lt;P&gt;Hello everyone, I'm trying to read 8 adc channels, but I can only read 3 channels and the moment I add the 4th channel the code locks and stops and other lines don't implement the moment read_adc function is called and I don't recieve any data from any of the channels. I added my code here.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/26034"&gt;@xiangjun_rong&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 07:54:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/reading-8-channel-adc-LPC1768-CMSIS/m-p/1467296#M48985</guid>
      <dc:creator>Alexshea</dc:creator>
      <dc:date>2022-06-01T07:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: reading 8 channel adc, LPC1768, CMSIS</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/reading-8-channel-adc-LPC1768-CMSIS/m-p/1467388#M48990</link>
      <description>&lt;P&gt;Hi, Alex,&lt;/P&gt;
&lt;P&gt;I hope you can provide us the intact project so that we can know all the api function definition. Your api function does not appear from LPCOpen package, where did you get it.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 09:54:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/reading-8-channel-adc-LPC1768-CMSIS/m-p/1467388#M48990</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2022-06-01T09:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: reading 8 channel adc, LPC1768, CMSIS</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/reading-8-channel-adc-LPC1768-CMSIS/m-p/1467766#M49007</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/26034"&gt;@xiangjun_rong&lt;/a&gt;&amp;nbsp;Hi, here is the intact project. I use keil and don't know much about LPCopen and the api that isn't in the code.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jun 2022 22:01:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/reading-8-channel-adc-LPC1768-CMSIS/m-p/1467766#M49007</guid>
      <dc:creator>Alexshea</dc:creator>
      <dc:date>2022-06-01T22:01:53Z</dc:date>
    </item>
    <item>
      <title>Re: reading 8 channel adc, LPC1768, CMSIS</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/reading-8-channel-adc-LPC1768-CMSIS/m-p/1469172#M49040</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/26034"&gt;@xiangjun_rong&lt;/a&gt;&amp;nbsp;I uploaded the intact project. Does it help to figure out what is the problem? I was wondering if you check the project and help me solve this problem.&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;</description>
      <pubDate>Mon, 06 Jun 2022 06:33:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/reading-8-channel-adc-LPC1768-CMSIS/m-p/1469172#M49040</guid>
      <dc:creator>Alexshea</dc:creator>
      <dc:date>2022-06-06T06:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: reading 8 channel adc, LPC1768, CMSIS</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/reading-8-channel-adc-LPC1768-CMSIS/m-p/1469784#M49063</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have downloaded the all project, and checked the code, I think you can change the code like:&lt;/P&gt;
&lt;P&gt;uint16_t HW_ADC_Read(uint8_t channel_num)&lt;BR /&gt;{&lt;BR /&gt;uint16_t voltage;&lt;BR /&gt;//disable all channels&lt;BR /&gt;ADC_ChannelCmd(LPC_ADC,ADC_CHANNEL_0,DISABLE);&lt;BR /&gt;ADC_ChannelCmd(LPC_ADC,ADC_CHANNEL_1,DISABLE);&lt;BR /&gt;ADC_ChannelCmd(LPC_ADC,ADC_CHANNEL_2,DISABLE);&lt;BR /&gt;ADC_ChannelCmd(LPC_ADC,ADC_CHANNEL_3,DISABLE);&lt;BR /&gt;ADC_ChannelCmd(LPC_ADC,ADC_CHANNEL_4,DISABLE);&lt;BR /&gt;ADC_ChannelCmd(LPC_ADC,ADC_CHANNEL_5,DISABLE);&lt;BR /&gt;ADC_ChannelCmd(LPC_ADC,ADC_CHANNEL_6,DISABLE);&lt;BR /&gt;ADC_ChannelCmd(LPC_ADC,ADC_CHANNEL_7,DISABLE);&lt;BR /&gt;//enable the sampled channel&lt;BR /&gt;ADC_ChannelCmd(LPC_ADC,channel_num,ENABLE);&lt;BR /&gt;ADC_StartCmd(LPC_ADC,ADC_START_NOW);&lt;BR /&gt;while(ADC_ChannelGetStatus(LPC_ADC,channel_num,ADC_DATA_DONE)!=SET) {}&lt;BR /&gt;voltage=ADC_ChannelGetData(LPC_ADC,channel_num);&lt;BR /&gt;calcVolt=(voltage*3.6F)/4096;&lt;BR /&gt;temp=(calcVolt*1000.0F);&lt;BR /&gt;&lt;BR /&gt;return voltage;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;Pls have a try.&lt;/P&gt;
&lt;P&gt;I am sorry for the delay. Previously, I could not see the api function body, I guess the body, so there was error in the code.&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;XiangJun Rong&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 07:20:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/reading-8-channel-adc-LPC1768-CMSIS/m-p/1469784#M49063</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2022-06-07T07:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: reading 8 channel adc, LPC1768, CMSIS</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/reading-8-channel-adc-LPC1768-CMSIS/m-p/1473807#M49160</link>
      <description>&lt;P&gt;Thank you, it worked&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 17:18:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/reading-8-channel-adc-LPC1768-CMSIS/m-p/1473807#M49160</guid>
      <dc:creator>Alexshea</dc:creator>
      <dc:date>2022-06-14T17:18:43Z</dc:date>
    </item>
  </channel>
</rss>

