I have been working with AD5621. I wrote the code and decided to test the ADC by measuring voltage for every single digital number fed in to it via SPI.
But I am amazed to see that there is a consistent step size of 64. For example, when 3.3V is fed to the DAC and the data bit is incremented every two seconds, I get a voltage change on every 64th step. I am not sure why is that but it is very consistent. Please find below my code that I am using to construct the 2 bytes being sent to the DAC with normal mode of operation. SPI is clocked at 62.5Khz.
void Send_Data_To_DAC(unsigned int Data)
unsigned char temp1, temp2 = 0;
temp1 = (((unsigned char) Data & 0x3F)<<2);
temp2 = (unsigned char) ((Data>>6)& 0x3F);
DAC_CS = 0; // Active Low Chip Select Enabled
DAC_CS = 1; // Disable Chip Select
And the function Call is: