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.

DAC8551: Driver problems

Part Number: DAC8551

My code don't work,what's the problem?

void DAC2_Set(u16 value)
{
char i;
DAC_CS1_L;
for(i=8;i>0;i--)
{
DAC_DIN_L;
delay_us(1);
DAC_SCLK_H;
delay_us(1);
DAC_SCLK_L;
}
for(i=16;i>0;i--)
{

if(value&0x8000)
{
DAC_DIN_H;
delay_us(1);
}
else
{
DAC_DIN_L;
delay_us(1);
}
DAC_SCLK_H;
delay_us(1);
DAC_SCLK_L;
value <<= 1;
}
DAC_CS1_H;
}