Hi. I'm using a TMS320C6711 EVM with a 5614 EVM daughtercard, which holds 3 chips - all of them DACs with different technical spezifications. I want to use all 3 chips at the same time but I've problems with the driver. Now I'm looking forward to find somebody with experience at this area. If I'm disabling LDAC/CS/PD and send data to the 5614 chip, everything works okay. Then only the MCBSP_write() call is needed. If I send data via MCBSP_write() to all 4 channels (one after another) of the 5614, then the channels A and B get problems. The signal level "flatters" as if something changes the level to another one. So I get black filles signal curves on the scope. The other channels are working okay. What can be the reason of this error? timing problems? I want to use the chip-select function of the daughtercard to use the address decoder to select the chip and send data to it. At first I tried only the TLV 5614 chip. It's a DAC with 4 output lines. Without the chip-select function I'm able to address each of it's channels. With the code below (and the jumpers W10/W12/W14 set) I only get random data without any sense to the output lines. I tried to insert code to wait after changing the address lines as documented in the timing diagram of the chip (slas188.pdf) but nothing improved. Where is the error? Does anybody has an example code or an idea what could be wrong? How can I wait exact values like 8 ns? Here is my (minimized) function for writing a value to the DAC: long data volatile unsigned int *adr; unsigned int val; ... if (dac->chip == TLV_5614) { short a_bit_ldac = 0; // LDAC control. short a_bit_pd = 0; // PD control. short a_bit_cs = 1; // Enable address decoder. short a_bit_16 = 1; // DC_A16. short a_bit_17 = 1; // DC_A17. short d_bit_15 = -1; // Select U5s channel. Will be set later. short d_bit_14 = -1; // Select U5s channel. short d_bit_pwr = 0; // Power control bit. short d_bit_spd = 0; // Speed control bit. switch (dac->channel) { case 1: d_bit_15 = 0; d_bit_14 = 0; break; case 2: d_bit_15 = 0; d_bit_14 = 1; break; case 3: d_bit_15 = 1; d_bit_14 = 0; break; case 4: d_bit_15 = 1; d_bit_14 = 1; break; } val = ((d_bit_15 << 15) + (d_bit_14 << 14) + (d_bit_pwr << 13) + (d_bit_spd << 12) + (data & 0xfff)); a_bit_cs = 1; a_bit_ldac = 0; // Set LDAC low. adr = (unsigned int *)((a_bit_pd << 12) + (a_bit_ldac << 13) + (a_bit_cs << 15) + (a_bit_16 << 16) + (a_bit_17 << 17) + 0xa0000000); *adr = val; a_bit_ldac = 1; // Set LDAC high. adr = (unsigned int *)((a_bit_pd << 12) + (a_bit_ldac << 13) + (a_bit_cs << 15) + (a_bit_16 << 16) + (a_bit_17 << 17) + 0xa0000000); *adr = val; a_bit_cs = 0; // Set CS low. adr = (unsigned int *)((a_bit_pd << 12) + (a_bit_ldac << 13) + (a_bit_cs << 15) + (a_bit_16 << 16) + (a_bit_17 << 17) + 0xa0000000); *adr = val; // Write the data and control value to the McBSP's DXR // ensuring that no overflow is possible. MCBSP_write(dac->serial->mcbsp, (val & 0xffff)); a_bit_cs = 1; // Take CS high again. adr = (unsigned int *)((a_bit_pd << 12) + (a_bit_ldac << 13) + (a_bit_cs << 15) + (a_bit_16 << 16) + (a_bit_17 << 17) + 0xa0000000); *adr = val; ... Thank you for reading until here! |
Programming a TLV 5614 on the C6711 daughtercard
Started by ●October 10, 2003