<?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: ADC example, different port</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/ADC-example-different-port/m-p/533848#M10716</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by R2D2 on Tue May 06 08:56:46 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Analog2Can&lt;/STRONG&gt;&lt;BR /&gt;and its not working. Do I have to define or change something to also read the other ports?&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;SPAN&gt;Could be useful if you desrcibe what's&amp;nbsp; not working...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Analog2Can&lt;/STRONG&gt;&lt;BR /&gt;Do I have to define or change something to also read the other ports?&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Perhaps you getter a better result after switchting ADC1 pin to AD function? &lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 19:33:21 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T19:33:21Z</dc:date>
    <item>
      <title>ADC example, different port</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/ADC-example-different-port/m-p/533847#M10715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Analog2Can on Tue May 06 08:16:08 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm playing around with the examples of the LPC11C24. I wanted to read all 8 ADC Ports. How do I do that? I just changed the ADC_CH0 to ADC_CH1 and its not working. Do I have to define or change something to also read the other ports?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;/*
 * @brief LPC11xx ADC example
 *
 * @note
 * Copyright(C) NXP Semiconductors, 2012
 * All rights reserved.
 *
 * @par
 * Software that is described herein is for illustrative purposes only
 * which provides customers with programming information regarding the
 * LPC products.&amp;nbsp; This software is supplied "AS IS" without any warranties of
 * any kind, and NXP Semiconductors and its licensor disclaim any and
 * all warranties, express or implied, including all implied warranties of
 * merchantability, fitness for a particular purpose and non-infringement of
 * intellectual property rights.&amp;nbsp; NXP Semiconductors assumes no responsibility
 * or liability for the use of the software, conveys no license or rights under any
 * patent, copyright, mask work right, or any other intellectual property rights in
 * or to any products. NXP Semiconductors reserves the right to make changes
 * in the software without notification. NXP Semiconductors also makes no
 * representation or warranty that such application will be suitable for the
 * specified use without further testing or modification.
 *
 * @par
 * Permission to use, copy, modify, and distribute this software and its
 * documentation is hereby granted, under NXP Semiconductors' and its
 * licensor's relevant copyrights in the software, without fee, provided that it
 * is used in conjunction with NXP Semiconductors microcontrollers.&amp;nbsp; This
 * copyright, permission, and disclaimer notice must appear in all copies of
 * this code.
 */

#include "board.h"
#include &amp;lt;stdio.h&amp;gt;

#if !defined(CHIP_LPC1125)

/*****************************************************************************
 * Private types/enumerations/variables
 ****************************************************************************/

static ADC_CLOCK_SETUP_T ADCSetup;

/*****************************************************************************
 * Public types/enumerations/variables
 ****************************************************************************/

/*****************************************************************************
 * Private functions
 ****************************************************************************/

static void Init_ADC_PinMux(void)
{
#if (defined(BOARD_NXP_XPRESSO_11U14) || defined(BOARD_NGX_BLUEBOARD_11U24))
Chip_IOCON_PinMuxSet(LPC_IOCON, 0, 11, FUNC2);
#elif defined(BOARD_NXP_XPRESSO_11C24)
Chip_IOCON_PinMuxSet(LPC_IOCON, IOCON_PIO0_11, FUNC2);
#else
#error "Pin muxing for ADC not configured"
#endif
}

/*****************************************************************************
 * Public functions
 ****************************************************************************/

/**
 * @briefmain routine for ADC example
 * @returnFunction should not exit
 */
int main(void)
{
uint16_t dataADC;
int j;

SystemCoreClockUpdate();
Board_Init();
Init_ADC_PinMux();

/* ADC Init */
Chip_ADC_Init(LPC_ADC, &amp;amp;ADCSetup);
Chip_ADC_EnableChannel(LPC_ADC, ADC_CH1, ENABLE);

while (1) {

/* Start A/D conversion */
Chip_ADC_SetStartMode(LPC_ADC, ADC_START_NOW, ADC_TRIGGERMODE_RISING);

/* Waiting for A/D conversion complete */
while (Chip_ADC_ReadStatus(LPC_ADC, ADC_CH1, ADC_DR_DONE_STAT) != SET) {}

/* Read ADC value */
Chip_ADC_ReadValue(LPC_ADC, ADC_CH1, &amp;amp;dataADC);

/* Print ADC value */
DEBUGOUT("ADC value port 1 is 0x%x \r\n&amp;nbsp; ", dataADC);


/* Delay */
j = 5000000;
while (j--) {}
}

/* Should not run to here */
return 0;
}

#endif /* !defined(CHIP_LPC1125) */&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:33:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/ADC-example-different-port/m-p/533847#M10715</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:33:20Z</dc:date>
    </item>
    <item>
      <title>Re: ADC example, different port</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/ADC-example-different-port/m-p/533848#M10716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by R2D2 on Tue May 06 08:56:46 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Analog2Can&lt;/STRONG&gt;&lt;BR /&gt;and its not working. Do I have to define or change something to also read the other ports?&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;SPAN&gt;Could be useful if you desrcibe what's&amp;nbsp; not working...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Analog2Can&lt;/STRONG&gt;&lt;BR /&gt;Do I have to define or change something to also read the other ports?&lt;BR /&gt;&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Perhaps you getter a better result after switchting ADC1 pin to AD function? &lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:33:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/ADC-example-different-port/m-p/533848#M10716</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: ADC example, different port</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/ADC-example-different-port/m-p/533849#M10717</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Analog2Can on Tue May 06 09:45:41 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm sorry. I expected it would be a basic thing I did wrong. I never worked with a NXP microcontroller before. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How do I change the ADC1 pin to AD? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As a result of the Code I get :&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;&amp;nbsp; 
&amp;nbsp; ADC value 1 is 0x0 

&amp;nbsp; ADC value 1 is 0x0 

&amp;nbsp; ADC value 1 is 0x0 

&amp;nbsp; ADC value 1 is 0x0 

&amp;nbsp; ADC value 1 is 0x0 &lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:33:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/ADC-example-different-port/m-p/533849#M10717</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: ADC example, different port</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/ADC-example-different-port/m-p/533850#M10718</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by R2D2 on Tue May 06 10:10:13 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Analog2Can&lt;/STRONG&gt;&lt;BR /&gt;I expected it would be a basic thing I did wrong.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Analog2Can&lt;/STRONG&gt;&lt;BR /&gt;I never worked with a NXP microcontroller before.&lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is useful to read the User Manual:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fwww.nxp.com%2Fdocuments%2Fuser_manual%2FUM10398.pdf" rel="nofollow noopener noreferrer" target="_blank"&gt;http://www.nxp.com/documents/user_manual/UM10398.pdf&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;Quote: Analog2Can&lt;/STRONG&gt;&lt;BR /&gt;How do I change the ADC1 pin to AD? &lt;/SPAN&gt;&lt;HR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are several ways to change pin functions...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just in front of you: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;Chip_IOCON_PinMuxSet(LPC_IOCON, IOCON_PIO0_11, FUNC2);&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:33:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/ADC-example-different-port/m-p/533850#M10718</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: ADC example, different port</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/ADC-example-different-port/m-p/533851#M10719</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by Analog2Can on Tue May 06 12:28:04 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 19:33:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/ADC-example-different-port/m-p/533851#M10719</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T19:33:23Z</dc:date>
    </item>
  </channel>
</rss>

