<?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: I don't understand LPC824 analog input behaviour in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/I-don-t-understand-LPC824-analog-input-behaviour/m-p/572991#M18697</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;bump&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 19 Jun 2016 01:07:47 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-19T01:07:47Z</dc:date>
    <item>
      <title>I don't understand LPC824 analog input behaviour</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/I-don-t-understand-LPC824-analog-input-behaviour/m-p/572989#M18695</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by bthomas on Fri Apr 08 08:14:47 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I have built a board with a LPC824. Amongst other things it utilizes 2 analog inputs, ADC_9 and ADC_10. ADC_9 is connected to a potmeter, ADC_10 is connected to an analog multiplexer (4051). The inputs of the analog multiplexer are 0-5V signals. As these exceed 3.3V, there is a voltage divider of 12k (upper) and 22k (lower) on each input.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The behaviour I observe is that, on the selected channel, a voltage appears when the channel is selected and without anything input to the divider.&amp;nbsp; So to simplify this: ADC_10 has a resistor of 22k to ground and a voltage appears on the input of the ADC.&amp;nbsp; I disabled the internal pull-ups and I am sure this works, as the voltage increased quite a lot when I enable the pull-ups. The voltage I measure is ~180mV. I did notice that the analog inputs have a quite low impedance of 100k, but I assume this 100k is to ground so I don't understand where the current comes from that creates this voltage drop over the 22k resistor.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Even a bit more strange, if I enable ADC_9, connected to the potmeter, the voltage on the resistor on ADC_10 changes with the position of the potmeter, thus with the voltage on ADC_9. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I saw messages here and elsewhere of people describing similar behavior but I have not seen any reply that was confirmed to be the solution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone has any idea?&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:12:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/I-don-t-understand-LPC824-analog-input-behaviour/m-p/572989#M18695</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: I don't understand LPC824 analog input behaviour</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/I-don-t-understand-LPC824-analog-input-behaviour/m-p/572990#M18696</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by bthomas on Mon Apr 11 08:33:36 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Additional information: I reduced the hardware to single LPC824 chip, 2 100nF capacitors, FTDI USB uart cable connected to uart, 3.3V supplied by bench power supply. P0_13 connected to 22k resistor connected to ground. There is still a voltage over the 22k resistor and the ADC input value is not anywhere near to 0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV class="j-rte-table"&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca" style="border:1px solid black;background-color:#cacaca;"&gt; &lt;PRE&gt;
UART demo:
build date: Apr 11 2016 build time: 17:14:06
speed 30000000 Hz
entering mainloop
adc: e8021d10
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Software reduced to basically:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;DIV class="j-rte-table"&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca" style="border:1px solid black;background-color:#cacaca;"&gt; &lt;PRE&gt;
int main(void)
{
&amp;nbsp; Chip_SystemInit();
SystemCoreClockUpdate();
UART_Init();
&amp;nbsp; Chip_UART_Init(DEBUG_UART);
&amp;nbsp; Chip_UART_ConfigData(DEBUG_UART, UART_CFG_DATALEN_8 | UART_CFG_PARITY_NONE | UART_CFG_STOPLEN_1);
&amp;nbsp; Chip_Clock_SetUSARTNBaseClockRate((115200 * 16), true);
&amp;nbsp; Chip_UART_SetBaud(DEBUG_UART, 115200);
&amp;nbsp; Chip_UART_Enable(DEBUG_UART);
&amp;nbsp; Chip_UART_TXEnable(DEBUG_UART);

&amp;nbsp; Chip_GPIO_Init(LPC_GPIO_PORT);
ansi_clr_screen();
printf("UART demo:\r\n"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "build date: " __DATE__ " build time: " __TIME__ "\r\n"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "speed %lu Hz\r\n",Chip_Clock_GetSystemClockRate());

&amp;nbsp; /* Enable the clock to the Switch Matrix */
&amp;nbsp; Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_SWM);
&amp;nbsp; Chip_SWM_EnableFixedPin(SWM_FIXED_ADC10); // mux output

&amp;nbsp; Chip_Clock_EnablePeriphClock(SYSCTL_CLOCK_IOCON);
&amp;nbsp; LPC_IOCON-&amp;gt;PIO0[IOCON_PIO13] = 0x80;
&amp;nbsp; Chip_Clock_DisablePeriphClock(SYSCTL_CLOCK_IOCON);

&amp;nbsp; Chip_ADC_Init(LPC_ADC, 0);

&amp;nbsp; /* Need to do a calibration after initialization and trim */
&amp;nbsp; Chip_ADC_StartCalibration(LPC_ADC);
&amp;nbsp; while (!(Chip_ADC_IsCalibrationDone(LPC_ADC))) {}

&amp;nbsp; /* Setup for maximum ADC clock rate using sycnchronous clocking */
&amp;nbsp; Chip_ADC_SetClockRate(LPC_ADC, ADC_MAX_SAMPLE_RATE);
&amp;nbsp; Chip_ADC_SetupSequencer(LPC_ADC, ADC_SEQA_IDX,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (ADC_SEQ_CTRL_CHANSEL(10) | ADC_SEQ_CTRL_MODE_EOS));

&amp;nbsp; /* Disable the clock to the Switch Matrix to save power */
&amp;nbsp; Chip_ADC_SetSequencerBits(LPC_ADC, ADC_SEQA_IDX, ADC_SEQ_CTRL_SEQ_ENA | ADC_SEQ_CTRL_BURST);

/* Enable SysTick Timer */
SysTick_Config(SystemCoreClock / TICKRATE_HZ);

printf("entering mainloop\r\n&amp;gt;");
/* Loop forever */
while (1) {
&amp;nbsp;&amp;nbsp;&amp;nbsp; printf("adc: %x&amp;nbsp; \r", Chip_ADC_GetDataReg(LPC_ADC, 10));
&amp;nbsp; cmdline();
}
&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Schematic of test circuit added as attachment&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 20:12:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/I-don-t-understand-LPC824-analog-input-behaviour/m-p/572990#M18696</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T20:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: I don't understand LPC824 analog input behaviour</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/I-don-t-understand-LPC824-analog-input-behaviour/m-p/572991#M18697</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;bump&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jun 2016 01:07:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/I-don-t-understand-LPC824-analog-input-behaviour/m-p/572991#M18697</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-19T01:07:47Z</dc:date>
    </item>
  </channel>
</rss>

