Hi Alice,
I used the exact same code as given in typical application 1st case. I still do not get the DAC output. :smileysad:
I have quick follow up question.
Since DAC is 12 bit resolution, why is the example code setting 32 bit value?
#########################################################################################
Required component setup:
•Interrupt service/event: Disabled
•D/A resolution: 12 bits
•Data mode: unsigned 32 bits, left justified
•Data buffer: Disabled
•Enabled in init. code: yes
•Methods to enable: SetValue
#########################################################################################
#define DATA_LENGTH 10 /* Output data array length */
LDD_DAC_TData OutputData[DATA_LENGTH] = { /* Output data array */
0x0, 0x1C71C71C,
0x38E38E38, 0x55555554,
0x71C71C70, 0x8E38E38C,
0xAAAAAAA8, 0xC71C71C4,
0xE38E38E0, 0xFFFFFFFC
};
LDD_TError Error;
LDD_TDeviceData *MyDacPtr;
void main(void)
{
...
MyDacPtr = DA1_Init(NULL); /* Initialization of DA1 component */
for (;;) {
for (i = 0; i < DATA_LENGTH; i++) {
Error = DA1_SetValue(MyDacPtr, OutputData[i]); /* Set converter output */
}
}
}