This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TLV5608 8-ch,10-bit DAC problem

Other Parts Discussed in Thread: TLV5608

Datasheet  is here http://focus.ti.com/lit/ds/symlink/tlv5608.pdf

I've been confused for a long time.when i select any one channel,all of 8 channels have same analog output,and the voltage value is reasonable.However high 4 bits (0000-0111)indicate the channel 1-8 respectively,and the low 12 bits (d1,d0 are ignored)indicate the digital value needed to be converted,these 16 bits are sent together.

The MCU oscillator is 12 Mhz,and the program:

void DAC_Tlv5608(const unsigned int chan_sel,const unsigned int tem_value)
{
 unsigned char i = 0;
 unsigned int write_value = 0;
 
 write_value = ((chan_sel<<12) | (tem_value<<2));

 LDAC = 0;
 FS = 1;
 FS = 0;


 for( i=0; i<16; i++)
 {
  if(write_value&0x8000)
 {
 DIN = 1;
 }
    else
 {
 DIN = 0;
 }

 SCLK = 1;

 write_value <<= 1;


 SCLK = 0;

 }

 LDAC = 1;
 FS = 1;

}

How does this problem occured commonly?

Thank you very much for your reply.

Tim