DAC interfere with ADC

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

DAC interfere with ADC

559 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Cusko on Tue Nov 26 02:05:44 MST 2013
I use ADC pin on P4_3 and DAC pin on P4_3. When I set bit DMA_ENA with DAC_ConfigDAConverterControl() the ADC0_0 show some value even if there is none. If DMA_ENA is not set then the ADC0_0 works fine. Why is this happening?
 
scu_pinmux(4,3, MD_PLN, FUNC0);
LPC_GPIO_PORT->DIR[2] &= ~(1UL<<3);
LPC_SCU->ENAIO0 |= 1<<0;
ADC_Init(LPC_ADC0, 2000, 10);
ADC_ChannelCmd(LPC_ADC0, ADC_CHANNEL_0 ,ENABLE);
//Start burst conversion
ADC_BurstCmd(LPC_ADC0,ENABLE);


  
DAC_CONVERTER_CFG_Type DAC_ConverterConfigStruct;
scu_pinmux(4,4, MD_PLN, FUNC0);
LPC_SCU->ENAIO2 |= 1<<0; 
DAC_Init(LPC_DAC);
DAC_ConverterConfigStruct.CNT_ENA = 0;
DAC_ConverterConfigStruct.DMA_ENA = 1;
DAC_ConfigDAConverterControl (LPC_DAC, &DAC_ConverterConfigStruct);  


If I comment the line  [u]DAC_ConfigDAConverterControl (LPC_DAC, &DAC_ConverterConfigStruct)[/u] ADC works fine, but then DAC_UpdateValue() don't work.
Any idea? Thank you!
Labels (1)
0 Kudos
Reply
2 Replies

531 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Cusko on Tue Nov 26 08:04:30 MST 2013
Ok. Thank you for answer.
0 Kudos
Reply

531 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by starblue on Tue Nov 26 05:25:15 MST 2013
The DAC and ADC0_0/ADC1_0 are connected internally, so you can't use them separately.

http://www.lpcware.com/content/forum/adc-pin-shared-dac-pin-howto-use-adc-pin
0 Kudos
Reply