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.

DAC8563: About the DAC8563 initialization procedure

Part Number: DAC8563
Other Parts Discussed in Thread: DAC8562

Dear team,
I use DAC8563 in the project, I want to power on the initial output 2.5V, output 2.5-5V. I found a piece of C code online.
Void DAC8562_WriteCmd(uint32_t _cmd)
{
Uint8_t i;
SYNC_0();

For(i = 0; i < 24; i++)
{
If (_cmd & 0x800000)
{
DIN_1();
}
Else
{
DIN_0();
}
SCLK_1();
_cmd <<= 1;
SCLK_0();
}
SYNC_1();
}
Void bsp_InitDAC8562(void)
{
GPIO_InitTypeDef GPIO_InitStructure;

#ifdef SOFT_SPI
SYNC_1(); /* SYNC = 1 */
RCC_AHB1PeriphClockCmd(RCC_SCLK | RCC_DIN | RCC_SYNC, ENABLE);
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_InitStructure.GPIO_Speed ​​= GPIO_Speed_50MHz;

GPIO_InitStructure.GPIO_Pin = PIN_SCLK;
GPIO_Init(PORT_SCLK, &GPIO_InitStructure);

GPIO_InitStructure.GPIO_Pin = PIN_DIN;
GPIO_Init(PORT_DIN, &GPIO_InitStructure);

GPIO_InitStructure.GPIO_Pin = PIN_SYNC;
GPIO_Init(PORT_SYNC, &GPIO_InitStructure);
#endif

/* Power up DAC-A and DAC-B */
DAC8562_WriteCmd((4 << 19) | (0 << 16) | (3 << 0));

/* LDAC pin inactive for DAC-B and DAC-A , Update data without using LDAC pin */
DAC8562_WriteCmd((6 << 19) | (0 << 16) | (3 << 0));

/* Reset 2 DACs to intermediate values, output 2.5V */
DAC8562_SetData(0, 32767);
DAC8562_SetData(1, 32767);

/* Select internal reference and reset the gain of 2 DACs = 2 (internal reference is disabled when reset) */
DAC8562_WriteCmd((7 << 19) | (0 << 16) | (1 << 0));
}


I am  don't understand these code. These are the corresponding register settings on the technical manual.

/* Power up DAC-A and DAC-B */  DAC8562_WriteCmd((4 << 19) | (0 << 16) | (3 << 0));
/* LDAC pin inactive for DAC-B and DAC-A , Update data without using LDAC pin */ DAC8562_WriteCmd((6 << 19) | (0 << 16) | (3 << 0));
/* Select internal reference and reset the gain of 2 DACs = 2 (internal reference is disabled when reset) */ DAC8562_WriteCmd((7 << 19) | (0 << 16) | (1 << 0));

Thank you.