LPC4370 DAC problem

cancel
Showing results for 
Search instead for 
Did you mean: 

LPC4370 DAC problem

89 Views
NXP Employee
NXP Employee
Content originally posted in LPCWare by mshrestha789 on Wed Aug 20 19:32:12 MST 2014
Hello friends,

I am trying to implement DAC of LPC4370. I have LPC-link 2 board. I am trying to use EXP_ADC0_DAC for DAC. I have tried some methods but with out any success. Here's DAC part of the code

void dac_init(void){

/*Tri-state the output driver by selecting an input -> added after reading user manual pg 409*/
Chip_SCU_PinMuxSet(4,4,SCU_MODE_FUNC0);
Chip_GPIO_SetPinDIRInput(LPC_GPIO_PORT, 2, 4); // set GPIO port direction register
Chip_SCU_PinMuxSet(4,4,SCU_MODE_INACT); // disable pull up and pull down resistor
LPC_SCU->SFSP[4][4] &= ~(1<<6);//disable receiveing by setting the EZI bit to zero. 

Chip_SCU_DAC_Analog_Config(); //select DAC function
Chip_DAC_Init(LPC_DAC); //initialize DAC
Chip_DAC_SetDMATimeOut(LPC_DAC, 0xFFFF); 
Chip_DAC_ConfigDAConverterControl(LPC_DAC, (DAC_CNT_ENA | DAC_DMA_ENA));
}
void DACTask1(void) {
static uint32_t tmp = 0;
uint32_t i = 0;
while (1) {
tmp++;
if (tmp == DATA_SIZE)) {
tmp = 0;
}
Chip_DAC_UpdateValue(LPC_DAC, sine_wave[tmp]); //update DAC value
while (!(Chip_DAC_GetIntStatus(LPC_DAC))) {}
for(i = 0; i < 10000; i++);
}
}



The code is not working. Did I miss any thing? Please help me regarding this.

Labels (1)
0 Kudos
2 Replies

1 View
NXP Employee
NXP Employee
Content originally posted in LPCWare by starblue on Mon Aug 25 01:12:54 MST 2014

Quote: andersrosvall
The DAC is not available on the 100-ball chip package that is used on the LPC-Link2 board.


The LPC-Link2 schematics mentions the DAC on Pin 4 of J4, which could make people think it is available (according to the UM it's not).

Jürgen
0 Kudos

1 View
NXP Employee
NXP Employee
Content originally posted in LPCWare by andersrosvall on Thu Aug 21 07:43:26 MST 2014
Hi,
The DAC is not available on the 100-ball chip package that is used on the LPC-Link2 board.
Kind Regards,
Anders @ EA Team
0 Kudos