Tool/software:
Hey i am using the DAC80508ZRTER IC and the output that I am getting is inconsistent : It works when I am outputting a constant value, but when I am trying to output a ramp or a sinusoidal wave it either tends to stay at a constant value or random values and on rare ocassions it gives the right signal. The schematic , code ,SPI configuration and signal output is attached with this post. Another doubt that I have is, while writing what is SDO supposed to output? because at the moment I am getting random values.
for(uint16_t i = 0; i < 65000; i+=1000)
{
dac8050x_writeDacReg(0, i);
HAL_Delay(1000);
}
bool dac8050x_writeDacReg(uint8_t channelNo , uint16_t value)
{
uint8_t tempBufferTransmit[NUM_FOUR] = {INIT_ZERO};
tempBufferTransmit[NUM_ZERO] = 0x00 | (08 + channelNo);
tempBufferTransmit[NUM_ONE] = ((uint16_t)value >> 8);
tempBufferTransmit[NUM_TWO] = ((uint8_t)value);
return (dac8050x_writeRegister(tempBufferTransmit));
}