<?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 LPC11U24 ADC problem in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U24-ADC-problem/m-p/1475610#M49215</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm testing ADC portion of LPC11U24. The example code has AD0 working, and I want to trigger additional AD1 working. I modify the code&lt;/P&gt;&lt;P&gt;int main(void)&lt;BR /&gt;{&lt;BR /&gt;uint16_t dataADC;&lt;BR /&gt;uint16_t dataADC1;&lt;BR /&gt;int j;&lt;/P&gt;&lt;P&gt;SystemCoreClockUpdate();&lt;BR /&gt;Board_Init();&lt;BR /&gt;Init_ADC_PinMux();&lt;BR /&gt;DEBUGSTR("ADC Demo\r\n");&lt;/P&gt;&lt;P&gt;/* Setup GPIOs */&lt;BR /&gt;//Chip_GPIO_SetPinDIR(LPC_GPIO, 0, 11, FALSE);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* ADC Init */&lt;BR /&gt;Chip_ADC_Init(LPC_ADC, &amp;amp;ADCSetup);&lt;BR /&gt;Chip_ADC_EnableChannel(LPC_ADC, ADC_CH0, ENABLE);&lt;BR /&gt;Chip_ADC_EnableChannel(LPC_ADC, ADC_CH1, ENABLE);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;while (1) {&lt;BR /&gt;/* Start A/D conversion */&lt;BR /&gt;Chip_ADC_SetStartMode(LPC_ADC, ADC_START_NOW, ADC_TRIGGERMODE_RISING);&lt;/P&gt;&lt;P&gt;/* Waiting for A/D conversion complete */&lt;BR /&gt;while (Chip_ADC_ReadStatus(LPC_ADC, ADC_CH0, ADC_DR_DONE_STAT) != SET) {}&lt;/P&gt;&lt;P&gt;/* Read ADC value */&lt;BR /&gt;Chip_ADC_ReadValue(LPC_ADC, ADC_CH0, &amp;amp;dataADC);&lt;/P&gt;&lt;P&gt;/* Print ADC value */&lt;BR /&gt;DEBUGOUT("ADC value is 0x%x\r\n", dataADC);&lt;/P&gt;&lt;P&gt;while (Chip_ADC_ReadStatus(LPC_ADC, ADC_CH1, ADC_DR_DONE_STAT) != SET) {}&lt;BR /&gt;Chip_ADC_ReadValue(LPC_ADC, ADC_CH1, &amp;amp;dataADC1);&lt;BR /&gt;//DEBUGOUT("ADC value is 0x%x\r\n", dataADC1);&lt;/P&gt;&lt;P&gt;/* Delay */&lt;BR /&gt;j = 500000;&lt;BR /&gt;while (j--) {}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/* Should not run to here */&lt;BR /&gt;return 0;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;#endif /* !defined(CHIP_LPC1125) */&lt;/P&gt;&lt;P&gt;When I run the program into debug mode, the program stop at&amp;nbsp;&lt;/P&gt;&lt;P&gt;"&lt;EM&gt;while (Chip_ADC_ReadStatus(LPC_ADC, ADC_CH1, ADC_DR_DONE_STAT) != SET) {}"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Do you know which step I'm wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Frank&lt;/P&gt;</description>
    <pubDate>Fri, 17 Jun 2022 01:10:21 GMT</pubDate>
    <dc:creator>coolxiangm</dc:creator>
    <dc:date>2022-06-17T01:10:21Z</dc:date>
    <item>
      <title>LPC11U24 ADC problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U24-ADC-problem/m-p/1475610#M49215</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm testing ADC portion of LPC11U24. The example code has AD0 working, and I want to trigger additional AD1 working. I modify the code&lt;/P&gt;&lt;P&gt;int main(void)&lt;BR /&gt;{&lt;BR /&gt;uint16_t dataADC;&lt;BR /&gt;uint16_t dataADC1;&lt;BR /&gt;int j;&lt;/P&gt;&lt;P&gt;SystemCoreClockUpdate();&lt;BR /&gt;Board_Init();&lt;BR /&gt;Init_ADC_PinMux();&lt;BR /&gt;DEBUGSTR("ADC Demo\r\n");&lt;/P&gt;&lt;P&gt;/* Setup GPIOs */&lt;BR /&gt;//Chip_GPIO_SetPinDIR(LPC_GPIO, 0, 11, FALSE);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* ADC Init */&lt;BR /&gt;Chip_ADC_Init(LPC_ADC, &amp;amp;ADCSetup);&lt;BR /&gt;Chip_ADC_EnableChannel(LPC_ADC, ADC_CH0, ENABLE);&lt;BR /&gt;Chip_ADC_EnableChannel(LPC_ADC, ADC_CH1, ENABLE);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;while (1) {&lt;BR /&gt;/* Start A/D conversion */&lt;BR /&gt;Chip_ADC_SetStartMode(LPC_ADC, ADC_START_NOW, ADC_TRIGGERMODE_RISING);&lt;/P&gt;&lt;P&gt;/* Waiting for A/D conversion complete */&lt;BR /&gt;while (Chip_ADC_ReadStatus(LPC_ADC, ADC_CH0, ADC_DR_DONE_STAT) != SET) {}&lt;/P&gt;&lt;P&gt;/* Read ADC value */&lt;BR /&gt;Chip_ADC_ReadValue(LPC_ADC, ADC_CH0, &amp;amp;dataADC);&lt;/P&gt;&lt;P&gt;/* Print ADC value */&lt;BR /&gt;DEBUGOUT("ADC value is 0x%x\r\n", dataADC);&lt;/P&gt;&lt;P&gt;while (Chip_ADC_ReadStatus(LPC_ADC, ADC_CH1, ADC_DR_DONE_STAT) != SET) {}&lt;BR /&gt;Chip_ADC_ReadValue(LPC_ADC, ADC_CH1, &amp;amp;dataADC1);&lt;BR /&gt;//DEBUGOUT("ADC value is 0x%x\r\n", dataADC1);&lt;/P&gt;&lt;P&gt;/* Delay */&lt;BR /&gt;j = 500000;&lt;BR /&gt;while (j--) {}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/* Should not run to here */&lt;BR /&gt;return 0;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;#endif /* !defined(CHIP_LPC1125) */&lt;/P&gt;&lt;P&gt;When I run the program into debug mode, the program stop at&amp;nbsp;&lt;/P&gt;&lt;P&gt;"&lt;EM&gt;while (Chip_ADC_ReadStatus(LPC_ADC, ADC_CH1, ADC_DR_DONE_STAT) != SET) {}"&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Do you know which step I'm wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Frank&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 01:10:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U24-ADC-problem/m-p/1475610#M49215</guid>
      <dc:creator>coolxiangm</dc:creator>
      <dc:date>2022-06-17T01:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11U24 ADC problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U24-ADC-problem/m-p/1475803#M49222</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Please confirm whether connect and configure right ADC channel and pin, also measure whether there is ADC signal.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 07:47:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U24-ADC-problem/m-p/1475803#M49222</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2022-06-17T07:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11U24 ADC problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U24-ADC-problem/m-p/1475840#M49224</link>
      <description>&lt;P&gt;so you think my code has no problem? when I run the code under debug mode, it always stuck at second while (Chip_ADC_ReadStatus(LPC_ADC, ADC_CH1, ADC_DR_DONE_STAT) != SET) {}&lt;/P&gt;</description>
      <pubDate>Fri, 17 Jun 2022 08:30:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U24-ADC-problem/m-p/1475840#M49224</guid>
      <dc:creator>coolxiangm</dc:creator>
      <dc:date>2022-06-17T08:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11U24 ADC problem</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U24-ADC-problem/m-p/1476524#M49240</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;Stuck here meaning A/D conversion not completes.&lt;/P&gt;
&lt;P&gt;About ADC code, recommend you refer to ADC demo under lpcopen.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BR&lt;/P&gt;
&lt;P&gt;Alice&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2022 06:27:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11U24-ADC-problem/m-p/1476524#M49240</guid>
      <dc:creator>Alice_Yang</dc:creator>
      <dc:date>2022-06-20T06:27:25Z</dc:date>
    </item>
  </channel>
</rss>

