ADC Vrefn in LPC804

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ADC Vrefn in LPC804

1,935 Views
PK_1114
Contributor II

dear Sir, @nxp

 

Please Provide the information regarding the LPC804 ADC Connection.

in the Datasheet mention that tie the Vrefp to VDD and Vrefn to VSS when ADC is not used.

in case ADC Used VREFP is connected to the ADC reference voltage but VREFN pin is not terminated out side how to connect the Analog Ground to VREFN

What is the consequences if ADC VREFN is connected to the Digital GND internally. what is the Effect on the ADC Readings.

If Possible Please Provide the ADC Application Note for the LPC804 or any Schematic Reference.

Thank You & Regards 

B PAVAN KUMAR 

R&D Efftronics.

  

 

 

0 Kudos
Reply
5 Replies

1,877 Views
PK_1114
Contributor II

Dear Sir,

While  i am Configure the PIO0_7 as the ADC -1 But it read the default 3.3V. without Connecting to the Any Division Circuit.

But it read the 0.5V when connected to the Divider network with out the  any voltage source to the Network how to clear this  condition.

SYSCON->SYSAHBCLKCTRL0 |= ( EN_GPIO0_CLK | EN_CTIMER0_CLK | EN_UART0_CLK | EN_GPIOINT_CLK );
SystemCoreClockUpdate();
current_clkdiv = (SystemCoreClock / 500000) - 1;
SYSCON->SYSAHBCLKCTRL0 |= ( EN_ADC_CLK );
SYSCON->SYSAHBCLKCTRL0 |=(1<<7);
SWM0->PINENABLE0 &= ~(1<<11);
SYSCON->SYSAHBCLKCTRL0 &=~(1<<7);
SYSCON->PDRUNCFG &= ~(ADC_PD);
ADC->CTRL = (current_clkdiv<<ADC_CLKDIV) ;
IOCON->PIO[7] = 0x0400;
SYSCON->PRESETCTRL0 &= (ADC_RST_N);
SYSCON->PRESETCTRL0 |= ~(ADC_RST_N);
current_clkdiv = (SystemCoreClock / (25 * DESIRED_SAMPLE_RATE)) - 1;
ADC->SEQ_CTRL[0] |= (1<<1|1u<<31);
ADC->SEQ_CTRL[0] = (ADC->SEQ_CTRL[0]) | (1 << ADC_START); // It will restarts the ADC
ADC->INTEN |=(1<<0);
NVIC->ISER[0U] = (uint32_t)(1UL << (((uint32_t)(int32_t)16) & 0x1FUL));
vUSART0_Initi(BAUD_RATE,USART_CNFG);
GPIO->DIR[0] |= (1<<20);
SysTick_Config(SystemCoreClock/(1200));

It is the Configuration.

 

Please provide the information to read the data.

 

Thank You & Regards 

B PAVAN KUMAR 

 

  

 

 

 

 

0 Kudos
Reply

1,873 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

HI, KUMAR ,

From hardware connection perspective, you have to connect the ADC Vref pin to VDD.

Regarding the ADC channel voltage which you want to sample, I do not think it make sense to sample a float analog pin of ADC, because the sample is random. If you want to sample an analog pin of ADC, the pin must be driven by external voltage source.

I think you code is correct.

Pls try to connect the ADC_1(PIO0_7) to VDD or GND, what is the result?

BR

XiangJun Rong

 

 

0 Kudos
Reply

1,864 Views
PK_1114
Contributor II

Dear @xiangjun_rong,

Thanks for the quick reply. As mentioned, this testing is already performed and attaching the observations. Please go through them and suggest if any modifications need to be done.

Thank You& Regards

B PAVAN KUMAR

 

0 Kudos
Reply

1,856 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

First of all, pls test if the ADC result is correct.

1)connect the ADC_1 to GND directly, then check if the sample approaches to zero

2)connect the ADC_1 to GND, then check if the sample approaches to 0xFFF

If the above two tests are okay, but your actual application test has issue, I suppose that your external signal conditional has issue. In detail, the 270kohm resistor is too large, This is my suggestion, you can remove the 200 ohm resistor and replace with a buffer based on AMP, then use ADC to have a test for the AMP output.

The ADC input impedance is small.

Hope it can help you

BR

XiangJun rong

 

 

0 Kudos
Reply

1,910 Views
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

For the LPC804 silicon, there is not  VDDA,VSSA pins, the VDDA is connected to VDD internally, the Vrefn, VSSA are connected to VSS internally.

Because LPC804 is a low cost and reduced package processor, the Vrefn and VDDA,VSSA pins are NOT connected to external pads as the following Fig.

 

xiangjun_rong_0-1638149091565.png

 

Regarding the effect of above connection, I think maybe the digital noise take effect on the ADC sample result, but the noise is small.

Hope it can help you

BR

XiangJun Rong

 

 

0 Kudos
Reply