lpcware

LPC4350 - DAC problem

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by Antony on Fri Oct 05 07:15:54 MST 2012
Hi,
I have some problem with DAC.
After configuring using driver lpc43xx_dac and selecting analog function in ENAIO2 the E3 pin (analog pin ADC0_0/ADC1_0/DAC in LPC4350FET256) remains stable and have 3.0V voltage level.
How do I configure DAC (from lpc43xx_dac driver):
/* Set default clock divider for DAC */
CGU_EntityConnect(CGU_CLKSRC_PLL1, CGU_BASE_APB3);
//Set maximum current output
DAC_SetBias(LPC_DAC,DAC_MAX_CURRENT_700uA);
//Select pin function - DAC
p->ENAIO2 |= (1<<(0));// At that stage pin E3 goes to 3.0V

After configuring I am trying to set some voltages on the DAC output, but the voltage remains the same (3.0V).
tmp = DACx->CR & DAC_BIAS_EN;
tmp |= DAC_VALUE(dac_value);
// Update value
DACx->CR = tmp;


Looks like I have missed something.
Also looks like I stuck:)
I will kindly appreciate any help.
Thanks in advance.

Outcomes