<?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: reading 8 channel adc, LPC1768, CMSIS</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/reading-8-channel-adc-LPC1768-CMSIS/m-p/1469790#M49064</link>
    <description>&lt;P&gt;Hi, Alex,&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;/P&gt;
&lt;P&gt;return voltage;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;Pls have a try.&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:24:37 GMT</pubDate>
    <dc:creator>xiangjun_rong</dc:creator>
    <dc:date>2022-06-07T07:24:37Z</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/1469530#M49050</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;Hello, my problem is I want to use all adc channels, but I can only do that when 3 of them are activated and the moment I activate the 4th one my code stops. Last time you asked me to upload the intact project because of the api and LPCopen. I once again add the intact project. I understand that you might be busy and that's why you don't answer, but I thought maybe you can't see my posts. Nevertheless, I uploaded the intact project and hope this helps us figure out the problem. If you aren't able to help, I won't ask you anymore I don't want to spam you here.&lt;/P&gt;&lt;P&gt;Thank you in advance,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2022 05:11:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/reading-8-channel-adc-LPC1768-CMSIS/m-p/1469530#M49050</guid>
      <dc:creator>Alexshea</dc:creator>
      <dc:date>2022-06-07T05:11:50Z</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/1469790#M49064</link>
      <description>&lt;P&gt;Hi, Alex,&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;/P&gt;
&lt;P&gt;return voltage;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;Pls have a try.&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:24:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/reading-8-channel-adc-LPC1768-CMSIS/m-p/1469790#M49064</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2022-06-07T07:24:37Z</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/1473819#M49161</link>
      <description>&lt;P&gt;Thank you so much&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jun 2022 17:29:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/reading-8-channel-adc-LPC1768-CMSIS/m-p/1473819#M49161</guid>
      <dc:creator>Alexshea</dc:creator>
      <dc:date>2022-06-14T17:29:05Z</dc:date>
    </item>
  </channel>
</rss>

